how_arr=array("Please Select","Home Phone","Work Phone","e-Mail"); $contact->when_arr=array("Please Select","Mornings","Afternoons","Evenings"); $contact->referred_arr=array("Please Select","Mailer","Advertisement","Web Browser","Mortgage Originator","Real Estate Agent","Other"); $contact->prod_interest_arr=array( "Please Select", "Custom corporate Web site", "PM2 Platform", "Online Store", "Mortgage Originator sites", "Real estate agent sites", "Corporate site with employee sites", "Site design", "Hosting", "General comments" ); if ($_SERVER["REQUEST_METHOD"]=="POST") { $contact->full_name = $_POST["full_name"]; $contact->email = $_POST["email"]; $contact->work_number = $_POST["work_number"]; $contact->url = $_POST["url"]; $contact->prod_interest = $_POST["prod_interest"]; $contact->how = $_POST["how"]; $contact->when = $_POST["when"]; $contact->referred = $_POST["referred"]; $contact->referred_text = $_POST["referred_text"]; if (isset($submit)) { $msg_err = ""; if ($contact->validate($msg_err)) { $test_arr = array($_POST["email"]); if (injectAttempt($test_arr)) exit; include_once("includes/classes/MainMail.php"); $mail = new MainMail(); $mail->full_name = stripslashes($_POST["full_name"]); $mail->email = stripslashes($_POST["email"]); $mail->work_number = stripslashes($_POST["work_number"]); $mail->url = stripslashes($_POST["url"]); $mail->prod_interest = $contact->prod_interest_arr[$_POST["prod_interest"]]; $mail->how = $contact->how_arr[$_POST["how"]]; $mail->when = $contact->when_arr[$_POST["when"]]; $mail->referred = $contact->referred_arr[$_POST["referred"]]; $mail->referred_text = stripslashes($_POST["referred_text"]); $contact->msg = array($mail->send_contact_form_email()); unset($contact->full_name); unset($contact->email); unset($contact->work_number); unset($contact->url); unset($contact->prod_interest); unset($contact->how); unset($contact->when); unset($contact->referred); unset($contact->referred_text); } else { $contact->msg = $msg_err; } } } require(ROOT_DIR."/includes/skins/header.tpl.php"); $contact->display(); require(ROOT_DIR."/includes/skins/footer.tpl.php"); ?>