Example #1
0
				</thead>
				
				<tbody>
					<?php 
$Purchases = User::$ActiveUser->GetPurchases();
if (count($Purchases) == 0) {
    echo '
								<tr>
									<td colspan=4>
										<div style="text-align: center;padding: 6px;font-size: 12px;"><i>You have never purchased anything before!</i></div>
									</td>
								</tr>
							';
} else {
    foreach ($Purchases as $PurchaseObj) {
        $ItemObj = Item::GetByField("Item", "ID", $PurchaseObj->GetValue("ItemID"));
        echo '
									<tr>
										<td>' . date("n/j/y g:i A", $PurchaseObj->GetValue("Date")) . '</td>
										<td>' . $PurchaseObj->GetValue("ID") . '</td>
										<td>' . $ItemObj->GetValue("Name") . '</td>
										<td>
											<img src="includes/images/money_dollar.png" />
											' . number_format((double) $PurchaseObj->GetValue("PaymentAmount"), 2, '.', '') . '</td>
									</tr>
								';
    }
}
?>
				</tbody>
			</table>
Example #2
0
<?php

if (isset($_GET["dobuy"]) && intval($_GET["dobuy"]) && User::$ActiveUser->IsReal()) {
    $ItemObj = Item::GetByField("Item", "ID", intval($_GET["dobuy"]));
    if (isset($ItemObj) && $ItemObj->IsReal()) {
        if (User::$ActiveUser->GetValue("Credit") >= $ItemObj->GetValue("Cost")) {
            User::$ActiveUser->BuyItem($ItemObj);
        }
    }
    KERNEL::HardNavigate("store", "&cat=" . $ItemObj->GetValue("Category"));
}
Example #3
0
<?php

$ItemAction = ItemAction::GetByField("ItemAction", "ID", $_GET["editaction"]);
$ItemActionData = $ItemAction->GetData();
$ActionArr = Action::GetAction($ItemAction->GetValue("ActionType"));
$ItemObj = Item::GetByField("Item", "ID", $ItemAction->GetValue("ItemID"));
if (isset($_POST["doEditAction"])) {
    $ActionData = "";
    $ServerData = "";
    foreach ($ActionArr["Arguments"] as $ArgObject) {
        $ActionData .= $_POST["input_" . $ArgObject->SysName] . ItemAction::$SerialKey;
    }
    foreach (Servers::GetCachedResults("Servers") as $ServerObj) {
        if (isset($_POST["action_server_" . $ServerObj->GetValue("ID")])) {
            $ServerData .= $ServerObj->GetValue("ID") . ";";
        }
    }
    $ItemAction->ChangeValue("ActionData", $ActionData);
    $ItemAction->ChangeValue("Servers", $ServerData);
    KERNEL::HardNavigate("admin", "&area=items&edit=1&item=" . $ItemObj->GetValue("ID"));
} elseif (isset($_GET["del"])) {
    $ItemAction->Delete();
    KERNEL::HardNavigate("admin", "&area=items&edit=1&item=" . $ItemObj->GetValue("ID"));
}
?>

<h4>Edit Action</h4>

<form method="POST" action="?page=admin&area=items&editaction=<?php 
echo $ItemAction->GetValue("ID");
?>
Example #4
0
<?php

$ItemObj = Item::GetByField("Item", "ID", intval($_GET["delete"]));
if (isset($_GET["deleteConf"])) {
    $ItemObj->Delete();
    KERNEL::HardNavigate("admin", "&area=items");
    die("<h4>Redirecting...</h4>");
}
?>

<h3>Delete Item</h3>
<br />

<div style="margin-left: 25px;font-size: 13px;">
	<b style="color: darkred;">Warning: Deleting an item is not reccomended and may cause unforseen consequences.</b>
	<br /><br />
	Deleting an item will leave permanant, undoable effects. <b>It is highly reccomended that you simply
	disable an item</b> that you no longer wish for people to be able to see or purchase. The deletion of 
	items is only reccomended in scenarios when the item was simply a test and has not been used.
	
	<br /><br />
	
	<b>Effects of deletion</b>
	<ol>
		<li>Item name/details will not be available, anywhere, for any reason (including purchase history)</li>
		<li>All actions that have been associated with this action will be deleted</li>
		<li>People that have not yet recieved their benefits for this item will not get them</li>
		<li>People will no longer get recurring things associated with this item</li>
		<li>Other things that may somehow relate to this item will be lost</li>
		<li>Errors will occur when an attempt is made to access this item</li>
	</ol>