<?php require "giftcards_common.php"; if (!empty($_POST)) { $val = $_POST['AccountEmail']; $Order_Deadline = $_POST['Order_Deadline']; if (filter_var($val, FILTER_VALIDATE_EMAIL)) { if (isSuperEmail($val)) { header("Location: http://giftcards.surreyknights.net/giftcards_report.php?SuperEmail=" . $val . '&Deadline=' . $Order_Deadline); die; } else { session_start(); $_SESSION['AccountEmail'] = $val; $_SESSION['Order_Deadline'] = $Order_Deadline; //$orders = getOrderWithAccountAndDeadline($val, $Order_Deadline); //if(count($orders) === 0){// no order before $AccountEmail = $val; header("Location: http://giftcards.surreyknights.net/giftcards_ordering.php?AccountEmail=" . $AccountEmail); die; /* disable for testing purpose } else { echo '<h1>You have ordered placed order for this ordering season.</h1>'; //displayOrderInHTML($orders) } */ } } }
<?php //get order deadline, and pickip location require "giftcards_common.php"; $accountKey = 'SuperEmail'; $deadlineKey = 'Deadline'; if (array_key_exists($accountKey, $_REQUEST)) { $val = trim($_REQUEST[$accountKey]); $deadline = trim($_REQUEST[$deadlineKey]); if (isSuperEmail($val) && strlen($deadline) > 0) { $displayStr = ' <html> <head> <title> Welcome--SKSC GiftCard Reports </title> </head> <body> <table align="center"> <tr> <td><image src="sksc.jpg"></td> </tr> '; $displayStr .= ' <tr> <td>Type of Report</td> </tr> <tr> <form method="post" action="giftcards_processreports.php" autocomplete="on"> <td> <input type="radio" name="reportType" checked="true" value="PickupAccount"> By Pickup and Account<br>