#!/usr/local/bin/perl require "/home/easyhelp/public_html/cgi-bin/config.pl"; require "/home/easyhelp/public_html/cgi-bin/unix_mail.pl"; #!/usr/local/bin/perl read(STDIN, $ce7i, $ENV{'CONTENT_LENGTH'}); @fm5i = split(/&/, $ce7i); foreach $h3fd (@fm5i) { ($flh8, $i1bo) = split(/=/, $h3fd); $i1bo =~ tr/+/ /; $i1bo =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; if ($k8ok{$flh8}) { $k8ok{$flh8} = $k8ok{$flh8}.",".$i1bo; } else { $k8ok{$flh8} = $i1bo; } } $aioc = "2.04.02"; $b4ff = $ENV{'SCRIPT_NAME'}; $hfd7 = $ENV{'QUERY_STRING'}; @ce53 = ('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday'); @i4jp = ('01','02','03','04','05','06','07', '08','09','10','11','12'); @b44b = ('January','February','March','April','May','June','July','August','September','October','November','December'); ($ef8e,$b7f1,$c29i,$jh10,$ak10,$feba,$ahdk) = (localtime(time))[0,1,2,3,4,5,6]; $glgh = sprintf("%02d:%02d:%02d",$c29i,$b7f1,$ef8e); $feba += 1900; $cj77 = "$i4jp[$ak10]/$jh10/$feba"; if ($k8ok{'parse'}) {&ahh; } elsif ($k8ok{'setpwd'}) {&agi; } elsif ($k8ok{'dowhat'}) {&ahe; } elsif ($k8ok{'editprofile'}) {&ae9; } elsif ($k8ok{'find'}) {&aei; } elsif ($hfd7 eq account_finder) {&ahg; } else {&adg; } sub adg{ print "Content-type: text/html\n\n"; unless (-e "$memaccess") { &aac; print qq—

Commission Cart Status:
Enter Your Username/Password

If you do not yet have a Username/Password account with $orgname, use the Commission Cart posting request form.

\n\n\n
User Name
Password

\n—;&abc; exit; } &ah7; } sub ah7{ &aac; print qq—\n
\n

\n \n \n \n \n \n
\n \n

Commission\n Cart Status:
\n Enter Your Username/Password

\n \n

If you do not yet\n have a Username/Password account with $orgname, use the Commission\n Cart posting request form.

\n \n

If you do not\n remember your Username/Password , use our built-in\n Account Finder™.


\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n User Name\n
Password

\n
\n—;&abc; exit; } sub ae0{ open (PASSWORD, "$passfile/password.txt"); if ($LOCK_EX){ flock(PASSWORD, $LOCK_EX); } $d291 = ; close (PASSWORD); chop ($d291) if ($d291 =~ /\n$/); if ($k8ok{'pwd'}) { $bkk8 = crypt($k8ok{'pwd'}, aa); } else { print "Content-type: text/html\n\n"; &aac; print qq—

\n

Commission Cart Status: Password Error!

\n

Please enter your password!

\n
\n—;&abc; exit; } unless ($bkk8 eq $d291) { print "Content-type: text/html\n\n"; &aac; print qq—

\n

Commission Cart Status: Password Error!

\n

Incorrect password! Please enter the correct password.

\n
\n—;exit; } &abl; } sub abl{ &acm; print "Content-type: text/html\n\n"; &aac; print qq—
Main MenuActive\nUsers: $j2eiAwaiting\nApproval: $k0gd
CGI Script Center's
Commission Cart \n$aioc

\n
Add/Delete Awaiting Approval \nAccountsView/Delete/Edit Active Users\nSearch for User by\nUsername/PasswordE-mail all customer bills now\n
Mass Mail all users
\n—;&abc; exit; } sub ahh{ unless (-e "$passfile/password.txt") { &abj; } open (PASSWORD, "<$passfile/password.txt"); $d291 = ; close (PASSWORD); chop ($d291) if ($d291 =~ /\n$/); if ($k8ok{'password'}) { $bkk8 = crypt($k8ok{'password'}, aa); } else { print "Content-type: text/html\n\n"; print qq—Commission Cart: Password Error!

\n

Commission Cart Status: Password Error!

\n

Please enter your password!

\n
\n—;exit; } unless ($bkk8 eq $d291) { print "Content-type: text/html\n\n"; print qq—Commission Cart: Password Error!

\n

Commission Cart Status: Password Error!

\n

Incorrect password! Please enter the correct password.

\n
\n—;exit; } } sub ahf{ open (FILE,"<$af6k/pageheader.txt"); @ia9g = ; close(FILE); print PAGEHTML "\n"; foreach $gcda(@ia9g) { print PAGEHTML "$gcda"; } } sub ahd{ open (FILE,"<$fi4k/pagefooter.txt"); @edh5 = ; close(FILE); foreach $gcda(@edh5) { print PAGEHTML "$gcda"; print PAGEHTML ""; } } sub abj{ print "Content-type: text/html\n\n"; print qq—Commission Cart: Set Password!

\n

Commission Cart Status: Set Password!

\n

You have not yet set your\nadministration password! Please enter your password below, once to set the\npassword and the second time to confirm it.

\n
password\nconfirmation\n


\n
\n—;exit; } sub agi{ print "Content-type: text/html\n\n"; unless ($k8ok{'pwd'} && $k8ok{'pwd2'}) { print qq—Commission Cart: Password Error!

\n

Commission Cart Status: Password Error!

\n

Please enter your password twice. Once to set it, and once to confirm it.

\n
password\nconfirmation\n


\n
\n—;exit; } if ($k8ok{'pwd'} && $k8ok{'pwd2'}) { if ($k8ok{'pwd'} ne $k8ok{'pwd2'}) { print qq—Commission Cart: Password Mismatch!

\n

Commission Cart Status: Password Mismatch!

\n

The confirmation password you entered did not match the orginal password. Please try again.

\n
password\nconfirmation\n


\n
\n—;exit; } } chop ($kcnj) if ($kcnj =~ /\n$/); $bkk8 = crypt($k8ok{'pwd'}, aa); open (PASSWORD, ">$passfile/password.txt"); print PASSWORD "$bkk8"; close (PASSWORD); print qq—Commission Cart: Password Success!

\n

Commission Cart Status: Password Success!

\n

Your Administration password has been set! You will not be able to send mail without your password, so please write it down.

\n

To post your Commission Carts, use your built-in form.

\n
\n—;exit; } sub aac{ open (FILE,"<$header/header.txt"); if ($LOCK_EX){ flock(FILE, $LOCK_EX); } @b2oc = ; close(FILE); print "\n"; foreach $gcda(@b2oc) { print "$gcda"; } } sub abc{ open (FILE,"<$footer/footer.txt"); if ($LOCK_EX){ flock(FILE, $LOCK_EX); } @ja0g = ; close(FILE); foreach $gcda(@ja0g) { print "$gcda"; } if (lc $link eq "partial_credit") { print qq—

© 1998 - 2002 Diran Alemshah
Commission Cart™ Professional $aioc\n


\n\n—;} elsif (lc $link eq "no_credit") { print qq—\n—;} else { print qq—

© 1998 - 2002 Diran Alemshah
$orgname maintained with
Commission Cart™ Professional $aioc\n


\n\n—;} } sub ahe{ unless (-e "$memaccess") { print "Content-type: text/html\n\n"; print "No affiliates yet exist
"; exit; } unless ($k8ok{'pwd'} && $k8ok{'username'}) { print "Content-type: text/html\n\n"; &aac; print qq—

\n

Commission Cart Status:
Incorrect Username/Password Combination!

\n

If you do not yet have a Username/Password account with $orgname, use the Commission Cart posting request form.

\n
\nUser Name \n
\nPassword
\n
\n—;&abc; exit; } open (DAT, "<$memaccess"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); } @fj1o = ; close (DAT); foreach $he12(@fj1o) { chomp $he12; @geo1 = split(/\:/,$he12); if (($k8ok{'pwd'}) && ($k8ok{'username'})) { $bkk8 = crypt($k8ok{'pwd'}, aa); } else { print "Content-type: text/html\n\n"; &aac; print qq—

\n

Commission Cart Status:
Incorrect Username/Password Combination!

\n

If you do not yet have a Username/Password account with $orgname, use the Commission Cart posting request form.

\n
\nUser Name \n
\nPassword
\n
\n—;&abc; exit; } if (($k8ok{'username'} eq $geo1[0]) && ($bkk8 eq $geo1[1])) {last; } } unless (($k8ok{'username'} eq $geo1[0]) && ($bkk8 eq $geo1[1])) { print "Content-type: text/html\n\n"; &aac; print qq—

\n

Commission Cart Status:
Incorrect Username/Password Combination!

\n

If you do not yet have a Username/Password account with $orgname, use the Commission Cart posting request form.

\n
\nUser Name \n
\nPassword
\n
\n—;&abc; exit; } &ac7; sub ac7{ open (FILE, "<$library_path/comcart.db"); if ($LOCK_EX){ flock(FILE, $LOCK_EX); } @fj1o = ; close (FILE); foreach $he12(@fj1o) { @geo1 = split(/\:/,$he12); if ($k8ok{'username'} eq $geo1[0]) {last; } } unless (-e "$memberinfo/$geo1[29].db") { print "Content-type: text/html\n\n"; &aac; print qq—
\n
CGI Script Center's
Commission Cart Professional $aioc

View / Read Affiliate Statistics Tutorial / Manual
Affiliate Statistics

\n
Welcome to the $orgname Commission Cart Affiliate Statitics Viewer, $geo1[3].

Your statistics will be available as soon as you have uploaded your unique HTML link code sent to you when you signed up for this account. Make sure to click on the link at least once. This will activate your account with our Commission Cart program. Once you do so, your statistics will appear on this page.

If you would like a tutorial on how to understand and use your Commission Cart statistics, you will always find a link available at the top of this page.

Thank you for joining our program, and please let us know if you need assistance.

$orgname Support
\n—;&abc; exit; } opendir (DIR, "$memberinfo"); @d866 = grep (!/.payhist/ && !/.inactive/, grep { /^$id/} readdir(DIR)); close (DIR); foreach $h3j3(@d866) { open (USERACCOUNTS, "<$memberinfo/$h3j3"); if ($LOCK_EX){ flock(USERACCOUNTS, $LOCK_EX); } @kick= ; close (USERACCOUNTS); foreach $hj2a(@kick) { chomp $hj2a; @j8en = split(/\|/,$hj2a); } if ($geo1[29] eq $j8en[4]) {last; } } $b4pc = $j8en[3]; $jo97 = $j8en[2]; $b55n = $j8en[4]; $h40b = $j8en[3]; $fn74 = $j8en[2]; print "Content-type: text/html\n\n"; &aac; print qq—
\n\n\n\n
CGI Script Center's
Commission Cart Professional $aioc
\n
\nView / Read Affiliate Statistics Tutorial / Manual\n
Affiliate StatisticsAccount Name: $geo1[29]
Total Affiliate Paid to Date: \n—;printf("$currency%.2f",$j8en[9]); print qq—
Total Affiliate Owed: \n—;printf("$currency%.2f",$j8en[6]); print qq—

\n
\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Account Name:$geo1[29]
Your Affiliate Link:$redeemurl?$geo1[29]
Date Account Created:$geo1[30]
First Name:
Last Name:
Company Name:
Address:
Address 2:
City:
State:
Postal Code:
Make Check Payable To:
Social Security #
or Tax ID:
Email Address:
Main Referring Page:$j8en[1]
Total Clicks:$h40b
Total Unique Clicks:$fn74
Date of Last Click:$j8en[8]
Pay Rate
By Unique Click:
goes here
Total # of Sales Made:$j8en[7]
Percent of Sales from Unique Clicks:\n—;$fh93 = $j8en[7] / $fn74; $ge18 = $fh93 * 100; printf("%.0f",$ge18); print qq—%\n
Total Sales Volume Awaiting Approval:\n—;&adl; printf("$currency%.2f",$dnp4); print qq—
Total Commission Volume Awaiting Approval:\n—;printf("$currency%.2f",$j70k); print qq—
Total Sales Volume:
Approved/Paid & Unpaid
\n—;printf("$currency%.2f",$j8en[5]); print qq—
Total Commission Volume:
Approved/Paid & Unpaid
\n—;$h4a8 = $j8en[6] + $j8en[9]; printf("$currency%.2f",$h4a8); print qq—
Unpaid Commission Volume:\n—;printf("$currency%.2f",$j8en[6]); print qq—
Store Credit Earned:goes here
\n
\n
Affiliate Statistics
\n
\n
Main Menu Return
\n—;&abc; exit; } } sub adl{ opendir (DIR, "$purchaseinfo"); @il1n = grep { /.infotmp/} readdir(DIR); close (DIR); $dnp4 = 0; $j70k = 0; foreach $i37k(@il1n) { open (FILE5, "<$purchaseinfo/$i37k"); if ($LOCK_EX){ flock(FILE5, $LOCK_EX); } @iapj = ; close (FILE5); foreach $kh0l(@iapj) { chomp $kh0l; @eh8h = split(/\:/,$kh0l); $em02 = $eh8h[34]; $em02 =~ s/.db//; if ($em02 eq $b55n) { $dnp4 += $eh8h[35]; unless ($eh8h[34] eq storesale) { $j70k += $eh8h[36]; } } } } } sub ae9{ open (FILE, "<$library_path/comcart.db"); if ($LOCK_EX){ flock(FILE, $LOCK_EX); } @fj1o = ; close (FILE); open (FILE, ">$library_path/comcart.db"); if ($LOCK_EX){ flock(FILE, $LOCK_EX); } foreach $he12(@fj1o) { @geo1 = split(/\:/,$he12); if ($k8ok{'affiliateusername'} eq $geo1[0]) { $geo1[3] = $k8ok{'fname'}; $geo1[4] = $k8ok{'lname'}; $geo1[32] = $k8ok{'company'}; $geo1[33] = $k8ok{'address'}; $geo1[34] = $k8ok{'address2'}; $geo1[14] = $k8ok{'city'}; $geo1[15] = $k8ok{'state'}; $geo1[16] = $k8ok{'zip'}; $geo1[35] = $k8ok{'checkto'}; $geo1[31] = $k8ok{'ssn'}; $geo1[2] = $k8ok{'email'}; } $dggb = join ("\:",@geo1); chomp($dggb); print FILE "$dggb\n"; } close (FILE); $k8ok{'update'} = $k8ok{'affiliateusername'}; &ac7; } sub ahg{ print "Content-type: text/html\n\n"; &aac; print qq—
\n

\n \n \n \n \n \n
\n \n

Commission\n Cart Professional Status:
\n Account Finder™

\n \n

If you do not\n remember your Username/Password , please enter the E-mail address that\n you registered as an Affiliate with. Your Username and Password will\n be automatically E-mailed back to you, at the E-mail address that we\n have on file for your account.
\n
\n If you do not remember the E-mail address you used, or it has changed\n since you registered as an Affiliate, please contact $orgname\n Support

\n
\n \n \n \n \n
E-mail\n Address
\n
\n
\n—;&abc; exit; } sub aei{ &aan; open (DAT,"<$library_path/comcart.db"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); } @fj1o = ; close (DAT); foreach $he12(@fj1o) { @geo1 = split(/\:/,$he12); &aak; if ($geo1[2] eq $fp3b) {last; } } unless ($geo1[2] eq $fp3b) { print "Content-type: text/html\n\n"; &aac; print "

Your $orgname account information was not found in our database. Please make sure that you used the same email address that you created your account with.

Please contact $orgname Support for your account information.

"; &abc; exit; } print "Content-type: text/html\n\n"; &aac; print "

Your $orgname account information has been emailed to you at: $k8ok{'email'}.

Please contact $orgname Support if you need any further assistance.

"; &abc; $hl4c = ""; $hl4c .= "$cj77\n"; $hl4c .= "You requested your $orgname account information:\n\n"; $hl4c .= "Your $orgname User ID is: $geo1[0]\n"; $hl4c .= "Your $orgname password is: $geo1[1]\n\n"; $hl4c .= "please contact $orgname support at: $orgmail\n"; $hl4c .= "if you have any questions.\n\n"; $hl4c .= "$orgname Support Team\n"; &afa("$geo1[2]","$orgmail","$orgname Account Information","$hl4c"); exit; } sub aan{ $k8ok{'email'} =~ s/\s//g; unless ($k8ok{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(,)/ || $k8ok{'email'} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) { $e88l = 1; } else { $e88l = 0; } if ($e88l !~ 1) { print "Content-type: text/html\n\n"; &aac; print qq—

Commission Cart Status:
Please Enter Your E-Mail Address.

Please don't forget to enter your E-mail address in our service request form.

If you need further assistance, please contact $orgname Support.

\n—;&abc; exit; } } sub aba{ $ipba = $k8ok{'username'}; $he12 =~ tr/A-Z/a-z/; $ipba =~ tr/A-Z/a-z/; } sub ab6{ $ipba = $k8ok{'username'}; $geo1[0] =~ tr/A-Z/a-z/; $ipba =~ tr/A-Z/a-z/; } sub aak{ $fp3b = $k8ok{'email'}; $geo1[2] =~ tr/A-Z/a-z/; $fp3b =~ tr/A-Z/a-z/; }