Ejemplo n.º 1
0
<?php

if (!defined('init_pages')) {
    header('HTTP/1.0 404 not found');
    exit;
}
$CORE->loggedInOrReturn();
//Predefine the realm id
$RealmId = $CURUSER->GetRealm();
//Set the title
$TPL->SetTitle('Boosts');
//Print the header
$TPL->LoadHeader();
$Boosts = new BoostsData();
?>
<div class="content_holder">

    <div class="sub-page-title">
        <div id="title"><h1>Account Panel<p></p><span></span></h1></div>
      
        <div class="quick-menu">
            <a class="arrow" href="#"></a>
            <ul class="dropdown-qmenu">
                <li><a href="<?php 
echo $config['BaseURL'];
?>
/index.php?page=store">Store</a></li>
                <li><a href="<?php 
echo $config['BaseURL'];
?>
/index.php?page=teleporter">Teleporter</a></li>
Ejemplo n.º 2
0
$CORE->load_CoreModule('purchaseLog');
//setup new instance of multiple errors
$ERRORS->NewInstance('purchase_boost');
//bind the onsuccess message
$ERRORS->onSuccess('Your Boosts have been successfuly applied, please re-log.', '/index.php?page=boosts');
//Define the variables
$RealmId = $CURUSER->GetRealm();
$BoostId = isset($_POST['boost']) ? (int) $_POST['boost'] : false;
$currency = isset($_POST['currency']) ? (int) $_POST['currency'] : false;
$DurationId = isset($_POST['duration']) ? (int) $_POST['duration'] : false;
//Setup the finances class
$finance = new AccountFinances();
//prepare the log
$logs = new purchaseLog();
//The boosts storage
$BoostsStorage = new BoostsData();
######################################
############### CHECKs ###############
if (!$BoostId) {
    //no boost selected
    $ERRORS->Add('Please select boost first.');
} else {
    if (!($BoostDetails = $BoostsStorage->get($BoostId))) {
        //Verify the boost id
        $ERRORS->Add('The selected boost is invalid.');
    }
}
if (!$currency) {
    //no currency is selected
    $ERRORS->Add('Please select a currency for the purchase.');
} else {