Пример #1
0
<?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>
Пример #2
0
<?php

$access_level = 9;
require "_globals.php";
require SECURITY;
include CLASS_MP_BUSINESS;
include CLASS_GIFT_CARDS;
$biz = new handleBusiness();
$gcard = new handleGiftCards();
$gcard->id = $biz->rec["record_id"];
$preload_restrictions = pullTemplates("standard.restrictions.giftcards.php");
if (isset($_POST["submit"])) {
    if (trim($_POST["fields"]["name"]) != "") {
        $gcard->createGiftCards();
    }
    header("location:" . $_SERVER["PHP_SELF"] . "?id=" . $biz->rec["record_id"] . "&m=1");
    exit;
}
if (isset($_GET["m"])) {
    $mess[1] = "1 Gift Cards have been created.";
    $message = $mess[$_GET["m"]];
}
?>

<?php 
getHeader("admin");
?>

<script type="text/javascript" src="<?php 
echo PATHTOHTML . PATHTOADMIN;
?>
<?php

$access_level = 9;
require "_globals.php";
require SECURITY;
include CLASS_MP_BUSINESS;
include CLASS_GIFT_CARDS;
$biz = new handleBusiness();
$gcard = new handleGiftCards();
$gcard->id = $biz->rec["record_id"];
$gcard->loadCard();
if (isset($_POST["submit"])) {
    $gcard->updateData("status", $_POST["status"], $gcard->rec["id"]);
    $gcard->updateData("category", $_POST["category"], $gcard->rec["id"]);
    if ($_POST["change_series"] == "on") {
        $gcard->updateSeriesCategory();
    }
    if ($_POST["status"] != "1") {
        $gcard->updateNotes($user->user_info[1] . " changed status to " . $giftcard_status[$_POST["status"]] . "<br/>\n");
    }
    header("location:" . $_SERVER["PHP_SELF"] . "?id=" . $biz->rec["record_id"] . "&cid=" . $gcard->rec["id"] . "&key=" . $gcard->rec["key"] . "&m=1");
    exit;
}
if (isset($_GET["m"])) {
    $mess[1] = "1 Gift Card have been updated.";
    $message = $mess[$_GET["m"]];
}
?>

<?php 
getHeader("admin");