/* CUSTOMIZE THE FOLLOWING: */ $database="camelcityC"; /* The msql database to open */ $table="ads"; /* The msql table to use */ $order="order by Ad_ID"; /* How to order results from msql select */ $home_url=$PHP_SELF; /* Pointer to this script for HREFs etc */ /* END OF CUSTOMIZABLE SECTION */ $main_url="/classifieds.htm"; /* Pointer main menu */ setType($sql,"string"); /* The sql query to send to msql */ > Function Add ( global $database,$home_url,$sql,$table,$Ad_ID,$Creation_Date; global $First_name,$Last_name,$Address_1,$Address_2,$City,$State,$Country,$Zip; global $E_mail_1,$Telephone_1,$Fax,$Personal_web,$Ad_type,$Text_for_ad; global $Remote_host,$I_name,$I_address,$I_telephone_1,$I_fax,$I_e_mail_1,$I_web; global $hour,$min,$mon,$day,$year; /* Assign an Ad_ID */ $temp1=date("U"); $Creation_Date=$temp1; $temp2=getmypid(); $Ad_ID="A"+strval($temp1)+strval($temp2); $Expire_Date=MkTime($hour,$min,0,$mon,$day,$year); $sql = "insert into $table values ('$Ad_ID',"; $sql=$sql+"$Creation_Date,$Expire_Date,'$First_name','$Last_name','$Address_1','$Address_2',"; $sql=$sql+"'$City','$State','$Country','$Zip','$E_mail_1','$Telephone_1',"; $sql=$sql+"'$Fax','$Personal_web','$Ad_type', '$Text_for_ad',"; $sql=$sql+"'$Remote_host',"; $sql=$sql+"'$I_name','$I_address','$I_telephone_1',"; $sql=$sql+"'$I_fax','$I_e_mail_1',"; $sql=$sql+"'$I_web')"; echo($sql); msql($database,"$sql"); >
"; $msg=$msg+"
\n"; endif; $row++; endwhile; $msg=$msg+"