iCGI ERROR (LiveDemo.pl): Can't locate Filter/Decompress.pm in @INC (you may need to install the Filter::Decompress module) (@INC contains: perl /usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd /usr/local/lib/perl5 .perllib/ /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at licenser line 1. main::BEGIN --- (eval) --- (eval) licenser --- (eval) package main; no strict; local ($^W) = 0 ; #!/usr/bin/perl use lib 'perl'; do 'licenser' or die "do licenser: $! $@\n"; sub fetch_User { $dbh->selectrow_hashref("SELECT * FROM Register WHERE id_reg=?",undef,$_[0]); } sub fetch_Edu_User { $dbh->selectrow_hashref("SELECT * FROM Edu_Register WHERE id_reg=?",undef,$_[0]); } sub Newpartner { local ($FName, $LName, $Title, $eMail, $Telephone, $CName, $CAddr1, $CAddr2, $CCity, $CState, $CZip, $CCountry, $Curl, $CeMail, $CTel, $CFax, $CComments) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(FName LName CName CTel); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; Email("Newpartner.txt", { email => $Vars{"partner-email"}, FName => $FName, LName => $LName, Title => $Title, eMail => $eMail, Telephone => $Telephone, CName => $CName, CAddr1 => $CAddr1, CAddr2 => $CAddr2, CCity => $CCity, CState => $CState, CZip => $CZip, CCountry => $CCountry, Curl => $Curl, CeMail => $CeMail, CTel => $CTel, CFax => $CFax, CComments => $CComments}); } sub Support { local ($Company, $FName, $LName, $eMail, $Telephone, $Question) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(FName LName Question); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; Email("Support.txt", { email => $Vars{"support-email"}, Company => $Company, FName => $FName, LName => $LName, eMail => $eMail, Telephone => $Telephone, Question => $Question}); } sub Defect { local ($Company, $FName, $LName, $eMail, $Telephone, $Component, $OperSys, $Database, $Defect, $Instructions, $May_We_Contact) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(FName LName Component OperSys Database Defect); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; Email("Defect.txt", { email => $Vars{"defect-email"}, Company => $Company, FName => $FName, LName => $LName, eMail => $eMail, Telephone => $Telephone, Component => $Component, OperSys => $OperSys, Database => $Database, Defect => $Defect, Instructions => $Instructions, May_We_Contact => $May_We_Contact}); } sub Suggestion { local ($Company, $FName, $LName, $eMail, $Telephone, $Enhancement, $Reason, $May_We_Contact) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(FName LName Enhancement); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; Email("Suggestion.txt", { email => $Vars{"suggestion-email"}, Company => $Company, FName => $FName, LName => $LName, eMail => $eMail, Telephone => $Telephone, Enhancement => $Enhancement, Reason => $Reason, May_We_Contact => $May_We_Contact}); } sub License40 { my ($id_reg, $users, $ORAinstances, $MSSQLinstances, $MSSQLDatabases, $DB2instances, $expires, $CompName, $skipdb) = @_; my $now = $dbh->selectrow_array('SELECT NOW()'); $expires = $dbh->selectrow_array("SELECT DATE_FORMAT(DATE_ADD(?, INTERVAL $expires), '%Y-%m-%d')", undef, $now) if $expires =~ /^\s*[+-]?\d+\s+(?:DAY|MONTH|YEAR)\s*$/; return if $expires !~ /^(?:U|\d\d\d\d-\d\d-\d\d)$/ or $users !~ /^(?:U|\d+)$/ or $ORAinstances !~ /^(?:U|\d+)$/ or $MSSQLinstances !~ /^(?:U|\d+)$/ or $MSSQLDatabases !~ /^(?:U|\d+)$/ or $DB2instances !~ /^(?:U|\d+)$/ or not $dbh->selectrow_array('SELECT id_reg FROM Register WHERE id_reg=?', undef, $id_reg); my $ser_no = $now; $ser_no =~ s/\D//g; $ser_no="$id_reg-$ser_no"; $dbh->do('INSERT INTO License SET id_reg=?, ser_no=?, users=?, ORAInstances=?, MSSQLInstances=?, MSSQLDatabases=?, DB2Instances=?, DB2Databases=?, expires=?, CompName=?, _cdate=?', undef, $id_reg, $ser_no, $users, $ORAinstances, $MSSQLinstances, $MSSQLDatabases, $DB2instances, undef, $expires, $CompName, $now); my $id_lic = $dbh->selectrow_array('SELECT LAST_INSERT_ID()'); my $filename = $ser_no.".".$id_lic; use LWP::Simple; # my $license = get('http://test.mobile-dba.com:85/cgi-bin/licenser40.cgi?'. # 'FileName='.$filename. # '&ser_no='.$ser_no. # '&users='.$users. # '&ORAinstances='.$ORAinstances. # '&MSSQLinstances='.$MSSQLinstances. # '&MSSQLDatabases='.$MSSQLDatabases. # '&DB2instances='.$DB2instances. # '&expires='.$expires. # '&CompName='.$CompName. # '&Preview='.$skipdb); my $license = generate_license_40( $ser_no, map({ uc $_ eq 'U' ? undef : $_ } $users, $ORAinstances, $MSSQLinstances, $MSSQLDatabases, $DB2instances, $expires, ), $CompName ); $dbh->do("DELETE FROM License WHERE id_lic=?", undef, $id_lic), return unless $license; $dbh->do("DELETE FROM License WHERE id_lic=?", undef, $id_lic), return $license if $skipdb; $dbh->do("UPDATE License SET license=? WHERE id_lic=?",undef,$license,$id_lic); return $license; } sub License { my ($id_reg, $users, $ORAinstances, $MSSQLinstances, $MSSQLDatabases, $DB2instances, $MYSQLinstances, $MYSQLDatabases, $expires, $CompName, $skipdb) = @_; my $now = $dbh->selectrow_array('SELECT NOW()'); $expires = $dbh->selectrow_array("SELECT DATE_FORMAT(DATE_ADD(?, INTERVAL $expires), '%Y-%m-%d')", undef, $now) if $expires =~ /^\s*[+-]?\d+\s+(?:DAY|MONTH|YEAR)\s*$/; return if $expires !~ /^(?:U|\d\d\d\d-\d\d-\d\d)$/ or $users !~ /^(?:U|\d+)$/ or $ORAinstances !~ /^(?:U|\d+)$/ or $MSSQLinstances !~ /^(?:U|\d+)$/ or $MSSQLDatabases !~ /^(?:U|\d+)$/ or $DB2instances !~ /^(?:U|\d+)$/ or $MYSQLinstances !~ /^(?:U|\d+)$/ or $MYSQLDatabases !~ /^(?:U|\d+)$/ or not $dbh->selectrow_array('SELECT id_reg FROM Register WHERE id_reg=?', undef, $id_reg); my $ser_no = $now; $ser_no =~ s/\D//g; $ser_no="$id_reg-$ser_no"; $dbh->do('INSERT INTO License SET id_reg=?, ser_no=?, users=?, ORAInstances=?, MSSQLInstances=?, MSSQLDatabases=?, DB2Instances=?, DB2Databases=?, MYSQLInstances=?, MYSQLDatabases=?, expires=?, CompName=?, _cdate=?', undef, $id_reg, $ser_no, $users, $ORAinstances, $MSSQLinstances, $MSSQLDatabases, $DB2instances, undef, $MYSQLinstances, $MYSQLDatabases, $expires, $CompName, $now); my $id_lic = $dbh->selectrow_array('SELECT LAST_INSERT_ID()'); my $filename = $ser_no.".".$id_lic; my $license = generate_license_50( $ser_no, map({ uc $_ eq 'U' ? undef : $_ } $users, $ORAinstances, $MSSQLinstances, $MSSQLDatabases, $DB2instances, $MYSQLinstances, $MYSQLDatabases, $expires, ), $CompName ); $dbh->do("DELETE FROM License WHERE id_lic=?", undef, $id_lic), return unless $license; $dbh->do("DELETE FROM License WHERE id_lic=?", undef, $id_lic), return $license if $skipdb; $dbh->do("UPDATE License SET license=? WHERE id_lic=?",undef,$license,$id_lic); return $license; } sub Download { my ($filename, $id_reg, $ip) = @_; local (*FILE, $/); open FILE, $filename or die $!; $dbh->do("INSERT INTO Download SET id_reg=?, datetime=NOW(), ip=?, filename=?", undef, $id_reg, $ip, $filename); $dbh->do("UPDATE Register SET down_count=down_count+1, down_last=NOW(), down_first=if(down_first IS NULL,NOW(),down_first) WHERE id_reg=?", undef, $id_reg); my %data = %{ $dbh->selectrow_hashref("SELECT * FROM Register WHERE id_reg=?", undef, $id_reg) }; $data{ip} = $ip; $data{filename} = $filename; #Email("Download.txt", {%data, email => $Vars{"download-email"}}); if ($data{down_count} == 1) { my $l = License($id_reg, @Vars {lic_users, lic_ORAInstances, lic_MSSQLInstances, lic_MSSQLDatabases, lic_DB2Instances, lic_MYSQLInstances, lic_MYSQLDatabases, lic_expires, lic_CompName}); if ($l) { Email("License_ok_client.txt", {email=>$data{eMail}, license=>$l}); Email("License_ok_notif.txt", {%data, email=>$Vars{"download-email"}, license=>$l}); } else { Email("License_err_notif.txt", {%data, email=>$Vars{"download-email"}, pass=>$Vars{Admin_password}, id_reg=>$id_reg, users=>$Vars{lic_users}, ORAinstances=>$Vars{lic_ORAInstances}, MSSQLinstances=>$Vars{lic_MSSQLInstances}, MSSQLDatabases=>$Vars{lic_MSSQLDatabases}, DB2instances=>$Vars{lic_DB2Instances}, MYSQLinstances=>$Vars{lic_MYSQLInstances}, MYSQLDatabases=>$Vars{lic_MYSQLDatabases}, CompName=>$Vars{lic_CompName}, expires=>EncUri($Vars{lic_expires})}); } } else { Email("License_2_client.txt", {%data, email => $data{eMail}}); Email("License_2_notif.txt", {%data, email => $Vars{"download-email"}}); } $|=1; undef $ENV{PATH_TRANSLATED}; print "Content-Type: application/octet-stream\n"; print "Content-Length: ".(-s $filename)."\n\n"; my ($n, $buf) = (0, q{}); while ($n = sysread FILE, $buf=q{}, 102400) { print $buf; } die "read: $!" if !defined $n; close FILE or die $!; POWER::iCGI::_print(); } sub AdminLogin { my ($pass) = @_; $ERR{bad_pass}++, return if $pass ne $Vars{Admin_password}; return $pass; } sub Register { local ($Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(Company FName LName Telephone); $ERR{bad_eMail}++ if not Check_Email($eMail); $eMail=~/\Q$_\E$/ and $ERR{free_eMail}++ for split " ", $Vars{free_email}; return if keys %ERR; $ERR{user_exists}++, return if not $dbhNoErr->do("INSERT INTO Register SET Company=?, FName=?, LName=?, eMail=?, Addr1=?, Addr2=?, Telephone=?, Fax=?, Comments=?, register_date=NOW()", undef, $Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments); return $dbhNoErr->selectrow_array("SELECT LAST_INSERT_ID()"); } sub DemoLogin { my ($eMail) = @_; $ERR{bad_login}++, return if not my $id_reg = $dbh->selectrow_array( "SELECT id_reg FROM Register WHERE eMail=?", undef, $eMail); $dbh->do("UPDATE Register SET demo_count=demo_count+1, demo_last=NOW(), demo_first=if(demo_first IS NULL,NOW(),demo_first) WHERE eMail=?", undef, $eMail); $dbh->do("INSERT INTO DemoLogin SET id_reg=?, datetime=NOW()", undef, $id_reg); return $id_reg; } sub DownLogin { my ($eMail) = @_; $ERR{bad_login}++, return if not my $id_reg = $dbh->selectrow_array( "SELECT id_reg FROM Register WHERE eMail=?", undef, $eMail); # $dbh->do("UPDATE Register SET down_count=down_count+1, down_last=NOW(), # down_first=if(down_first IS NULL,NOW(),down_first) WHERE eMail=?", # undef, $eMail); # $dbh->do("INSERT INTO Download SET id_reg=?, datetime=NOW(), ip=?", undef, # $id_reg, $ENV{REMOTE_ADDR}); return $id_reg; } sub DownEduLogin { my ($eMail) = @_; $ERR{bad_login}++, return if not my $id_reg = $dbh->selectrow_array( "SELECT id_reg FROM Edu_Register WHERE eMail=?", undef, $eMail); return $id_reg; } sub Feedback { local ($Category, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(Category FName LName); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; $dbh->do("INSERT INTO Feedback SET Category=?, FName=?, LName=?, eMail=?, Addr1=?, Addr2=?, Telephone=?, Fax=?, Comments=?, datetime=NOW()", undef, $Category, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments); Email("Feedback.txt", { email => $Vars{"feedback-email"}, Category => $Category, FName => $FName, LName => $LName, eMail => $eMail, Addr1 => $Addr1, Addr2 => $Addr2, Telephone => $Telephone, Fax => $Fax, Comments => $Comments}); } sub RequestInfo { local ($Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Dba, $MDba, $Product, $OS, $Database, $Request, $HearClient, $HearNewsletter, $HearPost, $HearReferral, $HearAd, $HearTrade, $HearArticle, $HearWeb) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(FName LName); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; $dbh->do("INSERT INTO RequestInfo SET Company=?, FName=?, LName=?, eMail=?, Addr1=?, Addr2=?, Telephone=?, Fax=?, Dba=?, MDba=?, Product=?, OS=?, DB=?, Request=?, HearClient=?, HearNewsletter=?, HearPost=?, HearReferral=?, HearAd=?, HearTrade=?, HearArticle=?, HearWeb=?, datetime=NOW()", undef, $Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Dba, $MDba, $Product, $OS, $Database, $Request, $HearClient, $HearNewsletter, $HearPost, $HearReferral, $HearAd, $HearTrade, $HearArticle, $HearWeb); my %parm = ( Company => $Company, FName => $FName, LName => $LName, eMail => $eMail, Addr1 => $Addr1, Addr2 => $Addr2, Telephone => $Telephone, Fax => $Fax, Dba => $Dba, MDba => $MDba, Product => $Product, OS => $OS, Database => $Database, Request => $Request, HearClient => $HearClient, HearNewsletter => $HearNewsletter, HearPost => $HearPost, HearReferral => $HearReferral, HearAd => $HearAd, HearTrade => $HearTrade, HearArticle => $HearArticle, HearWeb => $HearWeb ); Email("RequestInfo.txt", { %parm, email => $Vars{"requestinfo-email"} }); # Email("RequestInfoAccepted.txt", { %parm, email => $eMail }); } sub Register_To_Win { local ($Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Updates) = @_; print LOG "Registering to win".$eMail."\n"; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(FName LName); $ERR{bad_eMail}++ if not Check_Email($eMail); return if keys %ERR; $dbh->do("INSERT INTO RegisterToWin SET Company=?, FName=?, LName=?, eMail=?, Addr1=?, Addr2=?, Telephone=?, Updates=?, datetime=NOW()", undef, $Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Updates); } sub EduRegister { local ($Institution, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(Institution FName LName); $ERR{bad_eMail}++ if not Check_Email($eMail); $eMail=~/\Q$_\E$/ and $ERR{free_eMail}++ for split " ", $Vars{free_email}; return if keys %ERR; $ERR{user_exists}++, return if not $dbhNoErr->do("INSERT INTO Edu_Register SET Institution=?, FName=?, LName=?, eMail=?, Addr1=?, Addr2=?, Telephone=?, Fax=?, Comments=?, register_date=NOW()", undef, $Institution, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments); return $dbhNoErr->selectrow_array("SELECT LAST_INSERT_ID()"); } sub EduLicense { my ($id_reg, $users, $instances, $expires, $skipdb) = @_; my $now = $dbh->selectrow_array('SELECT NOW()'); $expires = $dbh->selectrow_array("SELECT DATE_FORMAT(DATE_ADD(?, INTERVAL $expires), '%Y-%m-%d')", undef, $now) if $expires =~ /^\s*[+-]?\d+\s+(?:DAY|MONTH|YEAR)\s*$/; return if $expires !~ /^(?:U|\d\d\d\d-\d\d-\d\d)$/ or $users !~ /^(?:U|\d+)$/ or $instances !~ /^(?:U|\d+)$/ or not $dbh->selectrow_array('SELECT id_reg FROM Edu_Register WHERE id_reg=?', undef, $id_reg); my $ser_no = $now; $ser_no =~ s/\D//g; $ser_no="edu-$id_reg-$ser_no"; $dbh->do('INSERT INTO Edu_License SET id_reg=?, ser_no=?, users=?, instances=?, expires=?, _cdate=?', undef, $id_reg, $ser_no, $users, $instances, $expires, $now); my $id_lic = $dbh->selectrow_array('SELECT LAST_INSERT_ID()'); my $filename = $ser_no.".".$id_lic; use LWP::Simple; my $license = get('http://test.mobile-dba.com:85/cgi-bin/licenser.cgi?'. 'FileName='.$filename.'&ser_no='.$ser_no.'&users='.$users. '&instances='.$instances.'&expires='.$expires.'&Preview='.$skipdb); $dbh->do("DELETE FROM Edu_License WHERE id_lic=?", undef, $id_lic), return unless $license; $dbh->do("DELETE FROM Edu_License WHERE id_lic=?", undef, $id_lic), return $license if $skipdb; $dbh->do("UPDATE Edu_License SET license=? WHERE id_lic=?",undef,$license,$id_lic); return $license; } sub EduDownload { my ($filename, $id_reg, $ip) = @_; local (*FILE, $/); open FILE, $filename or die $!; my $data = ; close FILE or die $!; $dbh->do("INSERT INTO Edu_Download SET id_reg=?, datetime=NOW(), ip=?, filename=?", undef, $id_reg, $ip, $filename); $dbh->do("UPDATE Edu_Register SET down_count=down_count+1, down_last=NOW(), down_first=if(down_first IS NULL,NOW(),down_first) WHERE id_reg=?", undef, $id_reg); my %data = %{ $dbh->selectrow_hashref("SELECT * FROM Edu_Register WHERE id_reg=?", undef, $id_reg) }; $data{ip} = $ip; $data{filename} = $filename; #Email("Download.txt", {%data, email => $Vars{"download-email"}}); if ($data{down_count} == 1) { my $l = EduLicense($id_reg, @Vars{edu_lic_users,edu_lic_instances,edu_lic_expires}); if ($l) { Email("Edu_License_ok_client.txt", {email=>$data{eMail}, license=>$l}); Email("Edu_License_ok_notif.txt", {%data, email=>$Vars{"download-email"}, license=>$l}); } else { Email("Edu_License_err_notif.txt", {%data, email=>$Vars{"download-email"}, pass=>$Vars{Admin_password}, id_reg=>$id_reg, users=>$Vars{edu_lic_users}, instances=>$Vars{edu_lic_instances}, expires=>EncUri($Vars{edu_lic_expires})}); } } else { Email("Edu_License_2_client.txt", {%data, email => $data{eMail}}); Email("Edu_License_2_notif.txt", {%data, email => $Vars{"download-email"}}); } $|=1; print "Content-Type: application/octet-stream\n"; print "Content-Length: ".length($data)."\n\n"; print $data; POWER::iCGI::_print(); } sub RslrLogin { my ($eMail,$Rslr_Id) = @_; $ERR{bad_login}++, return if not my $rslr_id = $dbh->selectrow_array( "SELECT rslr_id FROM Reseller_Register WHERE eMail=? and rslr_id=?",undef,$eMail,$Rslr_Id); return $rslr_id; } sub RslrLicense { my ($euser_id, $rslr_id, $users, $instances, $expires, $lictype) = @_; my $now = $dbh->selectrow_array('SELECT NOW()'); $expires = $dbh->selectrow_array("SELECT DATE_FORMAT(DATE_ADD(?, INTERVAL $expires), '%Y-%m-%d')", undef, $now) if $expires =~ /^\s*[+-]?\d+\s+(?:DAY|MONTH|YEAR)\s*$/; return if $expires !~ /^(?:U|\d\d\d\d-\d\d-\d\d)$/ or $users !~ /^(?:U|\d+)$/ or $instances !~ /^(?:U|\d+)$/ or not $dbh->selectrow_array('SELECT rslr_id FROM Reseller_Register WHERE rslr_id=?', undef, $rslr_id); my $ser_no = $now; $ser_no =~ s/\D//g; $ser_no="$rslr_id-$ser_no"; $dbh->do("INSERT INTO Reseller_License SET rslr_id=?, euser_id=?, ser_no=?, users=?, instances=?, expires=?, _cdate=?", undef, $rslr_id, $euser_id, $ser_no, $users, $instances, $expires, $now); my $id_lic = $dbh->selectrow_array('SELECT LAST_INSERT_ID()'); my $filename = $ser_no.".".$id_lic; use LWP::Simple; my $license = get('http://test.mobile-dba.com:85/cgi-bin/licenser.cgi?'. 'FileName='.$filename.'&ser_no='.$ser_no.'&users='.$users. '&instances='.$instances.'&expires='.$expires.'&Preview=Y'); $dbh->do("DELETE FROM Reseller_License WHERE id_lic=?", undef, $id_lic), return unless $license; $dbh->do("UPDATE Reseller_License SET license=? WHERE id_lic=?",undef,$license,$id_lic); $dbh->do("UPDATE Reseller_End_User SET lic_count = lic_count + 1 WHERE euser_id=?",undef,$euser_id); if ($lictype == T) {$dbh->do("UPDATE Reseller_Register SET trial_count = trial_count + 1 WHERE rslr_id=?",undef,$rslr_id)}; if ($lictype == P) {$dbh->do("UPDATE Reseller_Register SET lic_count = lic_count + 1 WHERE rslr_id=?",undef,$rslr_id)}; return $license; } sub RslrRegisterEndUser { local ($rslr_id, $Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments) = @_; ${$_} !~ /\S/ and $ERR{"no_".$_}++ for qw(Company FName LName Addr1 eMail Telephone); $ERR{bad_eMail}++ if not Check_Email($eMail) && not keys %ERR; $eMail=~/\Q$_\E$/ and $ERR{free_eMail}++ for split " ", $Vars{free_email}; return if keys %ERR; $ERR{user_exists}++, return if not $dbhNoErr->do("INSERT INTO Reseller_End_User SET rslr_id=?, Company=?, FName=?, LName=?, eMail=?, Addr1=?, Addr2=?, Telephone=?, Fax=?, Comments=?, register_date=NOW()", undef, $rslr_id, $Company, $FName, $LName, $eMail, $Addr1, $Addr2, $Telephone, $Fax, $Comments); return $dbhNoErr->selectrow_array("SELECT LAST_INSERT_ID()"); } sub BulkEmail { local ($listname, $emailbody) = @_; $filename = "mail_logfile.txt"; open (LOG, ">$filename") or die "Couldn't open $filename: $!"; print LOG "list_file = $listname \n"; print LOG "email_file = $emailbody \n"; open (FILE, "$emailbody") || die "cannot open email $emailbody for reading: $!"; close FILE or die $!; open (IN, $listname) || die "cannot open list $listname for reading: #$!"; while (defined($line = )){ print LOG "$line"; my $data = {email => "$line"}; Email($emailbody, $data); } close LOG; } --- POWER::iCGI::required ---