\n"; foreach($_POST as $key=>$value) { $value=stripslashes($value); $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'\\1', $value); $value=nl2br($value); if($key != "Submit" && $key != "subject" && $key != "required_fields" && $key != "required_email_fields" && $key != "recipient_group" && $key != "error_page" && $key != "thanks_page" && $key != "send_copy" && $key != "copy_subject" && $key != "copy_tomail_field" && $key != "mail_type" && $key != "mail_priority" && $key != "return_ip") { $message=$message." \n \n "; } } if($return_ip==1) { $message=$message." \n \n "; } $message=$message."\n
".$key."".$value."
Sender IP".$user_ip."
"; } else if($mail_type=="horz_table") { $message=" \n "; foreach($_POST as $key=>$value) { if($key != "Submit" && $key != "subject" && $key != "required_fields" && $key != "required_email_fields" && $key != "recipient_group" && $key != "error_page" && $key != "thanks_page" && $key != "send_copy" && $key != "copy_subject" && $key != "copy_tomail_field" && $key != "mail_type" && $key != "mail_priority" && $key != "return_ip") { $message=$message."\n "; } } if($return_ip==1) { $message=$message." "; } $message=$message." \n \n"; foreach($_POST as $key=>$value) { $value=stripslashes($value); $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'\\1', $value); $value=nl2br($value); if($key != "Submit" && $key != "subject" && $key != "required_fields" && $key != "required_email_fields" && $key != "recipient_group" && $key != "error_page" && $key != "thanks_page" && $key != "send_copy" && $key != "copy_subject" && $key != "copy_tomail_field" && $key != "mail_type" && $key != "mail_priority" && $key != "return_ip") { $message=$message."\n "; } } if($return_ip==1) { $message=$message." "; } $message=$message."\n \n
".$key."Sender IP
".$value."".$user_ip."
"; } else { $message="Form Results"; foreach($_POST as $key=>$value) { $value=stripslashes($value); $value=nl2br($value); if($key != "Submit" && $key != "subject" && $key != "required_fields" && $key != "required_email_fields" && $key != "recipient_group" && $key != "error_page" && $key != "thanks_page" && $key != "send_copy" && $key != "copy_subject" && $key != "copy_tomail_field" && $key != "mail_type" && $key != "mail_priority" && $key != "return_ip") { $message=$message."\n".$key.": ".$value; } } if($return_ip==1) { $message=$message."Sender IP: ".$user_ip; } } // $extra="From: ".$_POST[$reply_to_field]."\n"; $extra="From: ".$reply_to."\n"; $extra.="X-Priority: $mail_priority\n"; $cc_tomail=$cc_tomail[$recipients]; $bcc_tomail=$bcc_tomail[$recipients]; if($cc_tomail!="") { $extra.="Cc: $cc_tomail;\n"; } if($bcc_tomail!="") { $extra.="Bcc: $bcc_tomail[$recipients]\n"; } if($mail_type=="horz_table" || $mail_type=="vert_table") { $extra.="MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n"; } $subject=$_POST["subject"]; $tomail=$tomail[$recipients]; mail ("$tomail", "$subject", "$message", "$extra"); if($send_copy=="yes") { $copy_extra="From: $Name<$Email>\nX-Priority: $mail_priority\n"; if($mail_type=="horz_table" || $mail_type=="vert_table") { $copy_extra.="MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n"; } $copy_address=$_POST[$copy_tomail_field]; mail ("$copy_address", "$copy_subject", "$message", "$copy_extra"); } if($thanks_page=="") { # echo "

$thanks_page_title

"; # echo "

$thanks_page_text

ERROR - Missing Fields "; if($_POST["already_member"]=="No") {virtual ("/cgi-bin/members/sendcode.cgi?email={$Email}&area=Members&secret=xlmr8&return=http://www.templeinstitute.org/main.htm"); } } else { ob_end_clean(); $redirect="Location: ".$thanks_page; header($redirect); } } else { if($error_page=="") { echo ""; echo " "; include('../header.htm'); echo "

$error_page_title

"; echo $error_message; echo "

$error_page_text

"; include('../footer.htm'); } else { ob_end_clean(); $redirect="Location: ".$error_page; header($redirect); } } } else { echo "

We're sorry, but this is an invalid request.

"; } } else { echo "

Error

"; echo "

No form data has been sent to the script

"; } ob_end_flush(); ?>