$self=$_SERVER['PHP_SELF']; $name=$_REQUEST['TeamLeader']; $password=$_REQUEST['password']; $method="get"; // $method="post"; $TEAMLEADERS="teamLeaders.lst"; //list of team leaders, etc $fp=fopen($TEAMLEADERS,"r"); if (!$fp) {echo "
Unable to open remote file.
"; exit;} $cnt=0; while (!feof($fp)) { $line=trim(fgets($fp, 4096)); $T=substr($line,0,1); if ($T=="T"){ //look for valid lines $A=explode("|",$line); if($A[3]<>null){ //save only lines with passwords $cnt++; $NAME[$cnt]=$A[1]; //build an array of valid names if (strtoupper($A[3])==strtoupper($password)){ //look for password match $TEAM=$A[0]; //if so save team $PASS=strtoupper($A[3]); //and save password }//end if }//end if A[3] }//end if not # }//end while fclose($fp); if(!isset($name)&&!isset($password)) { // if no name or password passed //Visitor needs to enter a name and password print "";
print " ";
print "";
print " |
";
$PAYPAL="PAYPAL/MadDashPayPal.csv";
$fp=fopen($PAYPAL,"r");
while (!feof($fp)) {
$line=trim(fgets($fp, 4096));
if (strpos($line,$TEAM)>0){
$A=explode("|",$line);
if ($A[4]>0.50){ // ignore small amout used in testing
print "Team:$A[9]; ";
print "Date:$A[1]; ";
print "Amount:\$$A[4]; ";
print "Email:$A[6] "; print "Donor:$A[7] "; }//end if >.50 }//end if TEAM }//end while fclose($fp); $MAILIN="PAYPAL/mailin.csv"; $fp=fopen($MAILIN,"r"); if (!$fp) {echo " Unable to open mail-in file. "; exit;} while (!feof($fp)) { $line=trim(fgets($fp, 4096)); if (strpos($line,$TEAM)>0){ $A=explode("|",$line); if ($A[2]>0.50){ // ignore small amout used in testing print "Team:$A[1]; "; print "Date:$A[5]; "; print "Mail-in Amount:\$$A[2]; "; print "Donor:$A[3];$A[4]"; }//end if >.50 }//end if TEAM }//end while fclose($fp); print " |