관리-도구
편집 파일: promo2017.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/engagement-pic.jpg" width="571" height="190" /></p> <h1 align="center" >Become Arizona’s FINEST engaged couple! </h1> <form id="freewedding" name="contact us" method="post" action="process_promo2017.php" enctype="multipart/form-data"> <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="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="photographer">Engagement Photographer Name: </label> <input name="photographer" id="photographer" class="text" type="text" value="" /> </li> <li> <label for="photographer">Name of Location or venue where photos were taken: </label> <input name="location" id="location" class="text" type="text" value="" /> </li> <li> <label for="weddingdate">Wedding Date: </label> <input name="weddingdate" id="weddingdate" class="text" type="text" value="" /> </li> <li><label for="reception">Wedding/Reception site</label> <input name="reception" id="reception" class="text" type="text" value="" /> <br> </li> <li><label for="reception">How did you hear about us?</label> <select name="hear" id="hear"> <option selected="selected">Select One</option> <option value="Social Media">Social Media</option> <option value="Print">Print Magazine</option> <option value="Website">Website</option> </select> <br> </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> <li>Upload 3 of your best photos in JPEG format only:</li> </ol> <p> <input type="file" name="file[]" /><br> <input type="file" name="file[]" /><br> <input type="file" name="file[]" /> </p> <input class="submit" type="submit" value="Submit Form" /> </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>A full page feature in the magazine for the 2017-2018 issue debuting June 4th 2018, that includes photos from your Professionally photographed Engagement Session.</li> <li>A small story of how you met and /or your proposal.<br /> </li> </ul> <h2>Contest Rules: </h2> <ul class="normaltext"> <li>No purchase necessary </li> <li>Must be an engaged couple getting married in Arizona.</li> <li>One entry per couple.</li> <li>Publication has exclusive rights to choose from the photos submitted those that will be featured in the magazine.</li> <li>Entrants must be U.S. residents, 18 years or older and planning a wedding by June 30, 2018. </li> <li>Winners will be notified within 10 days of drawing date. Failure to respond within 2 days will result in forfeiture and selection of new winner. </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 contest. </li> <li>Employees of Arizona’s Finest Wedding Sites and Services 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>Winner is based on information given on entry form and images submitted at time of entering the contest. If any of the information changes, entrant may have to forfeit prize and another couple will be chosen.</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"); } ?>