관리-도구
편집 파일: promo2015test.php
<? include_once('includes/root.php'); 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['free_wedding']['date_month'] = date('n'); $_SESSION['free_wedding']['date_day'] = date('j'); $_SESSION['free_wedding']['date_year'] = date('Y'); } $page_title = COMPANY_NAME." : Free Arizona Wedding 2015 | Arizona Wedding Vendors"; 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/contest-photo.jpg" width="571" height="" alt=""/></p> <h1 align="center" >Win Engagement Photos! </h1> <form id="freewedding" name="contact us" method="post" action="free_wedding-process_2015test.php"> <input name="form_token" type="hidden" value="<?=$form_token;?>" /> <input name="form_return" type="hidden" value="<?=$PHP_SELF;?>" /> <fieldset> <legend> Enter to Win! </legend> <br /> <span class="form_bold">All fields must be complete for eligibility. </span> <ol> <li> <label for="firstname" class="<? print((is_array($_SESSION['error']))&&($_SESSION['error']['firstname'] == true))? "form_er" : "form"; ?>"> First Name: </label> <input name="firstname" class="text" type="text" id="firstname" value="<?=$_SESSION['free_wedding']['firstname'];?>" /> </li> <li> <label for="lastname" class="<? print((is_array($_SESSION['error']))&&($_SESSION['error']['lastname'] == true))? "form_er" : "form"; ?>"> Last Name: </label> <input name="lastname" class="text" type="text" id="lastname" value="<?=$_SESSION['free_wedding']['lastname'];?>" /> </li> <li> <label for="address"> Address: </label> <input class="text" name="address" type="text" id="address" value="<?=$_SESSION['free_wedding']['address'];?>" /> </li> <li> <label for="city"> City: </label> <input class="text" name="city" type="text" id="city" value="<?=$_SESSION['free_wedding']['city'];?>" /> </li> <li> <label for="state"> State: </label> <select class="text" name="state" id="state"> <option value=""<? if(!isset($_SESSION['free_wedding']['state'])){ print " selected"; } ?>> Choose State </option> <? foreach ($states as $id => $result){ ?> <option value="<?=$result[1];?>"<? if((isset($_SESSION['free_wedding']['state']))&&($_SESSION['free_wedding']['state'] == $result[1])){ print " selected"; } ?>> <?=$result[1];?> </option> <? } ?> </select> </li> <li> <label for="zipcode"> Zipcode: </label> <input class="text" name="zipcode" type="text" id="zipcode"value="<?=$_SESSION['free_wedding']['zipcode'];?>" /> </li> <li> <label for="phone" class="<? print((is_array($_SESSION['error']))&&($_SESSION['error']['phone'] == true))? "form_er" : "form"; ?>"> Telephone: </label> <input class="text" name="phone" type="text" id="phone" value="<?=$_SESSION['free_wedding']['phone'];?>" /> </li> <li> <label for="emailaddress" class="<? print((is_array($_SESSION['error']))&&($_SESSION['error']['emailaddress'] == true))? "form_er" : "form"; ?>"> Email address: </label> <input name="emailaddress" class="text" type="text" id="emailaddress" value="<?=$_SESSION['free_wedding']['emailaddress'];?>" /> </li> <li> <label for="weddingdate"> Your Wedding Date: </label> <input name="weddingdate" id="weddingdate" class="text" type="text" value="" /> </li> <li> <label for="referral"> How did you hear about us?: </label> <select class="form_fields" name="referral" id="referral"> <option value=""<? if(!isset($_SESSION['free_wedding']['referral'])){ print " selected"; } ?>> Choose </option> <? foreach ($referral as $id => $result){ ?> <option value="<?=$result[1];?>"<? if((isset($_SESSION['free_wedding']['referral']))&&($_SESSION['free_wedding']['referral'] == $result[1])){ print " selected"; } ?>> <?=$result[1];?> </option> <? } ?> </select> </li> <li> <label for="comments">Please indicate Wedding/Reception <br /> site (if known):<br /> </label> <textarea class="text" name="comments" cols="30" rows="5"><?=$_SESSION['free_wedding']['comments'];?> </textarea> </li> <li style="text-align:center"> <input name="chkspecialoffers" id="chkspecialoffers" type="checkbox" value="Yes" checked="checked" /> Leave checked if you want to receive special offers from our vendors. </li> </ol> <ol> <li> <input class="submit" type="submit" value="Submit Form" /> </li> </ol> </fieldset> </form> <p class="title"> <? if(is_array($_SESSION['error'])){ ?> </p> <p class="form_er">We had trouble processing your form.<br /> To make it easier to see the problem(s),<br /> we've bolded them.</p> <? } ?> <h2>Winner Will Receive:</h2> <ul class="normaltext"> <li>Engagement photo sessions from <a href="http://www.finestweddingsites.com/vendors/photographers_cwlifephoto.php">CWLIFE Photography</a> valued at $375.00! </li> <li>Prize includes a 1 hour session </li> <li>Couple's choice of 15 retouched images </li> <li>Slideshow link to share with family and friends<br /> </li> </ul> <h2>Contest Rules: </h2> <ul class="normaltext"> <li>No purchase necessary </li> <li>Engement photo session must be within 25 miles of the CWLIFE Photography studio.</li> <li>Must be an engaged Bride or Groom getting married in Arizona.</li> <li>One entry per person.</li> <li>Entrants must be U.S. residents, 18 years or older and planning a wedding by June 30, 2017. </li> <li>Four winners per year. </li> <li>Winners will be notified within 10 days of drawing date. Failure to respond within 5 days will result in forfeiture and selection of new winner. </li> <li>Engagement session must be booked to take place within three months of winning.</li> <li>Winner must provide proof of wedding venue contract or marriage license application within 30 days prior to prize fulfillment. </li> <li>Arizona’s Finest Wedding Sites & Services reserves the right to use winner’s name for publicity purposes. </li> <li>The number of entries received determines the odds of winning this drawing. </li> <li>Employees of Arizona’s Finest Wedding Sites and Services or CWLIFE Photography are not eligible. </li> <li>CWLIFE Photography is an independent entity and solely responsible for the fulfillment of said prize. </li> <li>Holiday or other date restrictions may apply.</li> </ul> </div> </div></div> <? $_SESSION['error'] = NULL; $_SESSION['free_wedding'] = NULL; // This is done so the checkboxes are cleared too // Token saved back into the session $_SESSION['free_wedding']['form_token_s'] = $form_token; if (file_exists($DOCUMENT_ROOT."/includes/footer-promo1.php")) { include_once($DOCUMENT_ROOT."/includes/footer-promo1.php"); } else { header("location: /error.php"); } ?>