
![]() << Previous | Next >>
if (!isset($_POST['action'])) {
$action="none";
} ELSE {
$action=$_POST['action'];
}
if (isset($_POST['name'])) {
$name=mysql_escape_string($_POST['name']);
}
if (isset($_POST['liame'])) {
$liame=mysql_escape_string($_POST['liame']);
}
if (isset($_POST['phone'])) {
$phone=mysql_escape_string($_POST['phone']);
}
if (isset($_POST['zip'])) {
$zip=mysql_escape_string($_POST['zip']);
}
if (isset($_POST['comments'])) {
$comments=mysql_escape_string($_POST['comments']);
}
if($_POST['StayLoggedin']==1){ $StayLoggedinUrl = '?log=1'; }
$category='newsletter';
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$comments=str_replace ("'", "", $comments);
$comments=str_replace ('"', '', $comments);
if($_POST['starttime']){
$starttime=$_POST['starttime'];
$endtime = microtime();
$endarray = explode(" ", $endtime);
$endtime = $endarray[1] + $endarray[0];
$totaltime = $endtime - $starttime;
$totaltime = round($totaltime,5);
//echo "Total time: $totaltime";
}
$http_referrer = getenv( "HTTP_REFERER" );
$ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
switch($action){
case 'insert':
if (eregi('http', $comments)) {
die ("
Sorry, we do not allow urls in the comment field. Please go back to correct it. "); } if(((($liame) && strstr($liame,"@") && strstr($liame,"."))||($RequireEmail=='0')) && ($totaltime>='2')){ if($InsertDB == 1) { $newid = insert($name,$phone,$liame,$comments,$category,$http_referrer,$ip); } // sendEMail($emailto,$subject,$name,$phone,$liame,$comments,$category,$http_referrer,$ip,$newid); message("Thank you for signing up."); }else{ echo ' There was an error submitting this form. Please contact our office. (TT-'.$totaltime.') '; } break; default : showFrm($category); } function showFrm($category) { ?> $message "; } ?> |
||||||||||||
© 2026 Misaskim Website Design by Duvys.com
|