관리-도구
편집 파일: promo2014.php
<?php session_start(); include_once('includes/root.php'); include_once("includes/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." : Win our Bridal Hair and Makeup Package | Arizona Wedding Venues"; 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_center"><img src="images/banners/contest-banner.jpg" width="571" height="190" /></p> <h1 align="center" >Win our Bridal Hair and Makeup Package! </h1> <form id="freewedding" name="contact us" method="post" action="free_wedding-process_2014.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> <div class="phone">( <input name="areacode" type="text2" class="phone text" id="areacode" value="<?=$_SESSION['free_wedding']['areacode'];?>" size="4" maxlength="3" /> ) - <input name="three" type="text2" class="text" id="three" value="<?=$_SESSION['free_wedding']['three'];?>" size="4" maxlength="3" /> - <input name="four" type="text" class="text" id="four" value="<?=$_SESSION['free_wedding']['four'];?>" size="4" maxlength="4" /> </div></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="bridesmaids"> No. of Bridesmaids: </label> <input name="bridesmaids" id="bridesmaids" 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><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 the Babydoll Weddings package:</h2> <ul class="normaltext"> <li>Customized bridal updo created by one of Babydoll Weddings’ bridal stylists — includes trial consulation and day-of service.</li> <li>Customized bridal makeup including airbrush and luxurious lash application by Babydoll Weddings’ top bridal makeup artists — includes trial consultation and day-of service.</li> <li>Hair styling for one member of your bridal party.</li> <li>Complementary bottle of Champagne </li> <li>Beauty product swag bag <br /> </li> </ul> <h2>Contest Rules: </h2> <ul class="normaltext"> <li>No purchase necessary </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 May 31, 2019. </li> <li>Three 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>Services provided will take place at Babydoll Weddings location.</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 winning couples name and images for publicity purposes on social media and website. </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 Babydoll Weddings salon are not eligible. </li> <li>By entering Arizona’s Finest Wedding Sites & Services contest, you are agreeing to receive online communications from us and our wedding related service providers. You may unsubscribe yourself at any time.</li> <li>Babydoll Weddings is an independent entity and solely responsible for the fulfillment of said prize. </li> <li>Holiday or other date restrictions may apply.</li> <li>Winner is based on information given on entry form at time of entering the contest. If any of the information changes, entrant may have to forfeit prize. </li> </ul> </div> </div></div> <?php $_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-promo.php")) { include_once($DOCUMENT_ROOT."/includes/footer-promo.php"); } else { header("location: /error.php"); } ?>