$WORKSHOP=$_REQUEST['WORKSHOP']; $WORKSHOP=substr($WORKSHOP,0,1); $NAME=$_REQUEST['NAME']; $ADDR=$_REQUEST['ADDR']; $PHONE=$_REQUEST['PHONE']; $EMAIL=$_REQUEST['EMAIL']; $saveData=$_REQUEST['saveData']; // save as flag for each code section $showData=$_REQUEST['showData']; // save as flag for each code section $gigText=$_REQUEST['gigText']; // line of data $url=$_SERVER['PHP_SELF']; $datFile="../NO_SYNC/workshops.csv"; $savFile="../NO_SYNC/workshops.csv"; $xmlFile="../workshops.xml"; $tgs=array("UniqueKey","name","date","time","instructor","location","donation","description","comments","maximum"); $DATA=loadDATA($xmlFile,$tgs,"workshop",$tgs[0]); foreach ($DATA as $index=> $v){ $I=explode(",",$index);$i=$I[0]; //get key if ($index==$i.",".$tgs[0]){ $WS[$i]=$DATA[$i.",".$tgs[1]].", ".$DATA[$i.",".$tgs[4]].", ".$DATA[$i.",".$tgs[3]]; $MAX[$i]=$DATA[$i.",".$tgs[9]]; }//end if index }//foreach DATA print "
";
//////////////////////// show pay page (final page) /////////////////////////
if ($NAME!=""){getPay($WORKSHOP,$NAME,$ADDR,$PHONE,$EMAIL);}
else if($_REQUEST['descWS']!=""){
$descWS=$_REQUEST['descWS'];
print $DATA[$descWS.",description"]." "; print " print" "; print"
"; print "Details"; }//if WORKSHOP getForm($WORKSHOP,$NAME); print " |
$str | ||
| P.O. Box 252 Grand Coteau, LA 70541 |
Unable to open remote file(".$savFile.").
"; exit;} while (!feof($fp)) { $line = fgets($fp, 2048); $L=explode('|', $line); $DATA[++$c]=$L[3]."; ".$L[2]; }//end while fclose($fp); for ($i=0;$iUnable to open remote file(".$savFile.").
"; exit;} $c=0; while (!feof($fp)) { $line = fgets($fp, 2048); $L=explode('|', $line); if ($L[0]==$num)++$c; }//end while fclose($fp); return $MAX[$num]-$c; }//end getCount function saveData($txt){ global $datFile,$savFile; $txt=fixChars($txt); $outFile=fopen($savFile,'a') or die("Cannot open ".$savFile); fwrite($outFile,$txt."\n"); fclose($outFile); $TS=date('Ymd_H_i_s',filemtime($datFile)); //make timestamp from inFile Mtime $buFile=$datFile."_".$TS; //create backup name copy($datFile,$buFile); //copy to backup $str=""; // echo ""; }//end saveData function getDesc($n){ global $WS,$MAX; if ($n==1){ print "Unable to open remote file.
"; exit;} while (!feof($fp)) { $line = fgets($fp, 2048); for ($i=0;$i