관리-도구
편집 파일: askexpert-thanks_test.php
<? include_once('includes/root.php'); session_start(); include_once("constants.php"); require_once("classes/class-formval.php"); require_once("classes/class-sanitizer.php"); // Report simple running errors error_reporting (E_ERROR | E_WARNING | E_PARSE); $_SESSION['error'] = null; //Create an array of the form information while (list($key,$val)=each($HTTP_POST_VARS)){ if(isset($_SESSION['askexpert'][$key])){ $_SESSION['askexpert'][$key] = NULL; } $_SESSION['askexpert'][$key] = $val; } // Process The Form Cleaner $sanitizer_obj = & new sanitizer; $_SESSION['askexpert'] = $sanitizer_obj->cleandata( $_SESSION['askexpert']); //cleandata( $process_info, $hacker, $spamer, $badword, $phone ) // Check the form validation //print '<pre>'; print_r($error); print '</pre>'; //print '<pre>'; print_r($contact_info); print '</pre>'; if ( $_POST[name] == "" ) { $_SESSION['error']['name'] = true; } if ( $_POST[email] == "" ) { $_SESSION['error']['email'] = true; } if ( $_POST[tel] == "" ) { $_SESSION['error']['tel'] = true; } if(is_array($_SESSION['error'])){ header("location: " . "askexpert-test.php"); exit; } $sender = $_POST['email'] ; $mailer = str_replace(' ', '', $sender); $to = 'guy@azimpact.com,lisa@mungias.com'; $subject = 'Ask Our Expert'; $message = '<html><body>'; $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; $message .= "<tr><td><strong>Name:</strong> </td><td>" . $_POST['name'] . "</td></tr>"; $message .= "<tr><td><strong>Email Address:</strong> </td><td>" . $sender . "</td></tr>"; $message .= "<tr><td><strong>Phone:</strong> </td><td>" . $_POST['tel'] . "</td></tr>"; $message .= "<tr><td><strong>Preferred City:</strong> </td><td>" . $_POST['preferredcity'] . "</td></tr>"; $message .= "<tr><td><strong>Wedding Date:</strong> </td><td>" . $_POST['weddingdate'] . "</td></tr>"; $message .= "<tr><td><strong>Number of Guests:</strong> </td><td>" . $_POST['guests'] . "</td></tr>"; $message .= "<tr><td><strong>Comments</strong> </td><td>" . $_POST['comments'] . "</td></tr>"; $message .= "</table>"; $message .= "</body></html>"; $headers = "From: askexpert@finestweddingsites.com\r\n"; $headers .= "Reply-To: ".$sender."\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; if (mail($to, $subject, $message, $headers)) { echo ''; } else { echo 'There was a problem sending the email.'; } session_start(); include_once("constants.php"); include_once("classes/class-world_db.php"); require_once("classes/class-formval.php"); // Create Token for Honey Pot (session) $validator_obj = & new formval; $form_token = $validator_obj->issue_token(); //$order_info['form_token_s'] = $form_token; // Token saved in the session at bottom $states_obj = & new world(); $states = $states_obj->get_states(); $tour_obj = & new world(); $tour = $tour_obj->get_tour(); $referral_obj = & new world(); $referral = $referral_obj->get_referral(); // set the date to today if not in error if(!is_array($_SESSION['error'])){ $_SESSION['askexpert']['date_month'] = date('n'); $_SESSION['askexpert']['date_day'] = date('j'); $_SESSION['askexpert']['date_year'] = date('Y'); } $page_title = COMPANY_NAME." : Free Arizona Wedding | Arizona Wedding Vendors | AZ Wedding Sites | Home"; if (file_exists($DOCUMENT_ROOT."/includes/header_vendors.php")) { include_once($DOCUMENT_ROOT."/includes/header_vendors.php"); } else { header("location: /error.php"); } ?> <div id="topbanner"> </div> <div id="wrapper"> <div id="content"> <p class="title"><img src="images/expert-banner.jpg" width="571" height="157" alt=""/></p> <h1 align="center" >Thank you! Our wedding expert, Jennifer Starr, will contact you within 24 hours.</h1> <p class="title"> </p><h2> </h2> </div> </div></div> <? $_SESSION['error'] = NULL; $_SESSION['askexpert'] = NULL; // This is done so the checkboxes are cleared too // Token saved back into the session $_SESSION['askexpert']['form_token_s'] = $form_token; if (file_exists($DOCUMENT_ROOT."/includes/footer.php")) { include_once($DOCUMENT_ROOT."/includes/footer.php"); } else { header("location: /error.php"); } ?>