<?php require "_admin/_globals.php"; require CLASS_SHOPPING_CART; $scart = new handleShoppingCart(); if (isset($_POST["submit"])) { $message = null; if ($_POST["agreement"] != "yes") { $message = "2 You must agree to the terms and conditions below in order to purchase gift card(s)."; } if ($message == null) { getPaymentClass(); $pay = new handlePayment(); $pay->preloadPayment($scart->getTotal()); $pay->savePaymentRecord(); $result = $pay->processInvoice(); $scart->closeCards($pay->id); sendMail("giftcard", $pay->id); $message = $result["message"]; } } ?> <?php getHeader("public", "yes"); ?> <div id="link-column-container"> </div>
<?php require "_admin/_globals.php"; require CLASS_ADS; require CLASS_GIFT_CARDS; require CLASS_SHOPPING_CART; $ads = new handleAds(); $gcard = new handleGiftCards(); $scart = new handleShoppingCart(); if (isset($_GET["add"])) { $message = $scart->addToCart(); } if (isset($_GET["empty"])) { $message = $scart->clearCart(); header("location: " . $_SERVER["PHP_SELF"]); exit; } if (isset($_GET["remove"])) { $message = $scart->clearItem(); header("location: " . $_SERVER["PHP_SELF"]); exit; } ?> <?php getHeader("public"); ?> <div id="link-column-container"> <div id="link-column"> <div class='white extra-large' style='display: block; clear: both; text-align: center; padding: 20px 0px 10px 0px;'>Categories</div>