Ejemplo n.º 1
0
                </div>
            </div>    
              
          	<!-- ARMOR SETS -->
          	<div class="armor-sets">
                
           		<!-- Top Bar (Charcater & Gear filter) -->
                <div class="container_3 account-wide" align="center" style="margin:40px 0 0 0;">
               		<div style="padding:10px 0 10px 0;" align="left">
                    	<!-- Charcaters -->
                    	<div style="display:block; padding:0 20px 0 10px; float:left;">
							<?php 
//load the characters module
$CORE->load_ServerModule('character');
//setup the characters class
$chars = new server_Character();
//set the realm
if ($chars->setRealm($RealmId)) {
    if ($res = $chars->getAccountCharacters()) {
        $selectOptions = '';
        //loop the characters
        while ($arr = $res->fetch()) {
            $ClassSimple = str_replace(' ', '', strtolower($chars->getClassString($arr['class'])));
            echo '
                                        <!-- Charcater ', $arr['guid'], ' -->
                                        <div id="character-option-', $arr['guid'], '" style="display:none;">
                                            <div class="character-holder">
                                                <div class="s-class-icon ', $ClassSimple, '" style="background-image:url(http://wow.zamimg.com/images/wow/icons/medium/class_', $ClassSimple, '.jpg);"></div>
                                                <p>', $arr['name'], '</p><span>Level ', $arr['level'], ' ', $chars->getRaceString($arr['race']), ' ', $arr['gender'] == 0 ? 'Male' : 'Female', '</span>
                                            </div>
                                        </div>
Ejemplo n.º 2
0
 </div>
 
<?php 
//Load the footer
$TPL->LoadFooter();
//Flush the page to the buffer
$TPL->BufferFlush();
//check for referral activations
//load the characters module
$CORE->load_CoreModule('raf');
//load the characters handling class
$CORE->load_ServerModule('character');
//setup the raf class
$raf = new RAF();
//construct the characters handler
$chars = new server_Character();
/* The new way of activating RAF Links */
//check if we have recruiter
if ($CURUSER->get('recruiter') > 0) {
    //find the record
    $res = $DB->prepare("SELECT * FROM `raf_links` WHERE `account` = :acc AND `recruiter` = :rec LIMIT 1;");
    $res->bindParam(':acc', $CURUSER->get('id'), PDO::PARAM_INT);
    $res->bindParam(':rec', $CURUSER->get('recruiter'), PDO::PARAM_INT);
    $res->execute();
    //check if we have the link
    if ($res->rowCount() > 0) {
        //fetch
        $row = $res->fetch();
        //check if the link status is pending
        if ($row['status'] == RAF_LINK_PENDING) {
            //check for activation
Ejemplo n.º 3
0
<?php

if (!defined('init_pages')) {
    header('HTTP/1.0 404 not found');
    exit;
}
$CORE->loggedInOrReturn();
//load the characters handling class
$CORE->load_ServerModule('character');
$CORE->load_CoreModule('item.refund.system');
//assume the realm is 1 (for now)
$RealmId = $CURUSER->GetRealm();
//construct the characters handler
$chars = new server_Character();
$chars->setRealm($RealmId);
//Set the title
$TPL->SetTitle('Item Refunding');
//Add header javascript
$TPL->AddHeaderJs($config['WoWDB_JS'], true);
//CSS
$TPL->AddCSS('template/style/page-refund.css');
//Print the header
$TPL->LoadHeader();
?>
<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>
Ejemplo n.º 4
0
    if (is_array($BalanceError)) {
        //insufficient amount
        foreach ($BalanceError as $currency) {
            $ERRORS->Add("You do not have enough " . ucfirst($currency) . " Coins.");
        }
    } else {
        //technical error
        $ERRORS->Add('Error, the website failed to verify your account balance.');
    }
}
unset($BalanceError);
$ERRORS->Check('/index.php?page=purchase_gold');
####################################################################
## The actual script begins here
//construct the characters handler
$chars = new server_Character();
//start logging
$logs->add('PSTORE_GOLD', 'Starting log session. Using currency: Gold Coins, Amount of Purchase: ' . $GoldAmount . ', selected realm: ' . $RealmId . '.', 'pending');
//set the realm
if ($chars->setRealm($RealmId)) {
    //check if the character belongs to this account
    if ($chars->isMyCharacter(false, $character)) {
        //send the gold
        $sentGold = $command->sendMoney($character, $GoldAmount * 10000, 'In-Game Gold Delivery', $RealmId);
        //check if any of the actions have failed and log it
        if ($sentGold !== true) {
            $logs->update(false, 'The website failed to execute the send money command and returned: ' . $sentGold . '.', 'error');
            $ERRORS->Add("The website failed to deliver your purchase. Please contact the administration.");
        } else {
            //charge for the purchase
            $Charge = $finance->Charge("In-Game Gold", CA_SOURCE_TYPE_PURCHASE);
Ejemplo n.º 5
0
 private function ProcessItemReward($entry)
 {
     global $CORE;
     //Make sure we have a selected realm
     //It's set to realm 1 by default but
     //it might be needed later on
     if ($this->realm === false) {
         $this->errors[] = 'The realm id is missing.';
         return false;
     }
     //Make sure a character is selected
     if (!$this->character) {
         $this->errors[] = 'This code requires a character to be selected.';
         return false;
     }
     //load the sendmail class
     if (!$CORE->isLoaded_ServerModule('commands')) {
         $CORE->load_ServerModule('commands');
     }
     //prepare the sendmail class
     $command = new server_Commands();
     //check if the realm is online
     if ($command->CheckConnection($this->realm) !== true) {
         $this->errors[] = 'The realm is currently unavailable. Please try again in few minutes.';
         return false;
     }
     //load the characters handling class
     if (!$CORE->isLoaded_ServerModule('character')) {
         $CORE->load_ServerModule('character');
     }
     //construct the characters handler
     $chars = new server_Character();
     if (!$chars->setRealm($this->realm)) {
         $this->errors[] = 'The website failed to load realm database. Please contact the administration for more information.';
         return false;
     }
     //check if the character belongs to this account
     if (!$chars->isMyCharacter(false, $this->character, (int) $this->account)) {
         $this->errors[] = 'The selected character does not belong to this account.';
         return false;
     }
     //Send the item
     $sentMail = $command->sendItems($this->character, $entry, 'Promotion Code Reward', $this->realm);
     //make sure the mail was sent
     if ($sentMail !== true) {
         $this->errors[] = 'The website was unable to deliver your reward due to reason: ' . $sentMail;
         return false;
     }
     unset($chars, $command);
     return true;
 }
Ejemplo n.º 6
0
    $ERRORS->Add('This tool is on a cooldown, please try again later.');
}
#########################################################################################
$ERRORS->Check('/index.php?page=teleporter');
####################################################################
## The actual unstuck script begins here
//load the character module
$CORE->load_ServerModule('character');
$CORE->load_ServerModule('commands');
$CORE->load_CoreModule('purchaseLog');
//prepare the log
$logs = new purchaseLog();
//prepare the commands class
$command = new server_Commands();
//prepare the character handler
$chars = new server_Character();
//setup the maps data class
$MD = new MapsData();
//setup the map points data class
$MP = new MapPoints();
//start logging
$logs->add('TELEPORTER', 'Starting log session. Teleporting player: ' . $charName . ', to point: ' . $pointId . ', selected realm: ' . $RealmId . '.', 'pending');
//connect to the database
if ($chars->setRealm($RealmId)) {
    ################################################
    ####   check if the character is valid    ######
    //get some character data
    $charData = $chars->getCharacterData(false, $charName, array('guid', 'level'));
    //find the map key by pointId
    $mapKey = $MD->ResolveMapByPoint($pointId);
    //get the map data
Ejemplo n.º 7
0
<?php

if (!defined('init_pages')) {
    header('HTTP/1.0 404 not found');
    exit;
}
//load the characters module
$CORE->load_ServerModule('character');
//setup the characters class
$chars = new server_Character();
//print error messages
if ($error = $ERRORS->DoPrint(array('pstore_armorsets_add', 'pstore_armorsets_edit', 'pstore_armorsets_del', 'pstore_armorsets_addcat', 'pstore_armorsets_delcat'))) {
    echo $error;
    unset($error);
}
//print success messages
if ($success = $ERRORS->successPrint(array('pstore_armorsets_add', 'pstore_armorsets_edit', 'pstore_armorsets_del', 'pstore_armorsets_addcat', 'pstore_armorsets_delcat'))) {
    echo $success;
    unset($success);
}
?>

<!-- Secondary navigation -->
<nav id="secondary">
	<ul>
		<li class="current"><a href="#maintab" onclick="changeCurrentTab('#maintab');">Armor Sets</a></li>
		<li><a href="#secondtab" onclick="changeCurrentTab('#secondtab');">Armor Set Categories</a></li>
		<li><a href="#thirdtab">Settings</a></li>
	</ul>
</nav>
Ejemplo n.º 8
0
<?php

if (!defined('init_ajax')) {
    header('HTTP/1.0 404 not found');
    exit;
}
//load the characters module
$CORE->load_ServerModule('character');
//setup the characters class
$chars = new server_Character();
$perPage = isset($_GET['perPage']) ? (int) $_GET['perPage'] : 6;
$category = isset($_GET['category']) ? (int) $_GET['category'] : 0;
$character = isset($_GET['character']) ? $_GET['character'] : false;
$realm = isset($_GET['realm']) ? (int) $_GET['realm'] : 1;
//set the realm
$chars->setRealm($realm);
//define some defaults
$where = "";
$isFiltered = false;
if ($category and $category > 0) {
    $where = "AND `category` = :filter";
    $isFiltered = true;
}
//get the character info
if ($character and $character != '') {
    $charClass = $chars->getCharacterData(false, $character, 'class');
    //append the conditions to the where variable
    $where .= " AND `class` IN('0', :class)";
}
//count the items
$count_res = $DB->prepare("SELECT COUNT(*) FROM `armorsets` WHERE `realm` = '-1' " . $where . " or `realm` = :realm " . $where);
Ejemplo n.º 9
0
<?php

if (!defined('init_executes')) {
    header('HTTP/1.0 404 not found');
    exit;
}
$CORE->loggedInOrReturn();
//load the character module
$CORE->load_ServerModule('character');
$chars = new server_Character();
//prepare multi errors
$ERRORS->NewInstance('unstuck');
$RealmId = $CURUSER->GetRealm();
$charName = isset($_POST['character']) ? $_POST['character'] : false;
//bind the onsuccess message
$ERRORS->onSuccess($charName . ' has been successfully unstucked.', '/index.php?page=unstuck');
$cooldown = $CURUSER->getCooldown('unstuck');
$cooldownTime = '15 minutes';
if (!$charName) {
    $ERRORS->Add("Please select a character.");
}
if (!$RealmId) {
    $ERRORS->Add("There is no realm assigned to your account.");
}
if (!$chars->setRealm($RealmId)) {
    $ERRORS->Add('The realm assigned to your account is invalid.');
}
//check if this character belongs to this account
if (!$chars->isMyCharacter(false, $charName)) {
    $ERRORS->Add('The selected character does not belong to this account.');
}
Ejemplo n.º 10
0
if (!$pointId) {
    echo '<error>Invalid point id.</error>';
}
if (!$charName) {
    echo '<error>Invalid character.</error>';
}
//setup the maps data class
$MD = new MapsData();
//find the map key by pointId
$mapKey = $MD->ResolveMapByPoint($pointId);
//get the map data
$mapData = $MD->get($mapKey);
//free memory
unset($MD);
//setup the characters class
$chars = new server_Character();
//set the realm
$chars->setRealm($RealmId);
//get the character level
$level = $chars->getCharacterData(false, $charName, 'level');
unset($chars);
//return the collected data
echo '
<info>
	<reqLevel>', $mapData['reqLevel'], '</reqLevel>
	<charLevel>', $level['level'], '</charLevel>
</info>';
//set the XML header
if (!headers_sent()) {
    header("content-type: text/xml");
}
Ejemplo n.º 11
0
<?php

if (!defined('init_ajax')) {
    header('HTTP/1.0 404 not found');
    exit;
}
//load the characters module
$CORE->load_ServerModule('character');
//setup the characters class
$chars = new server_Character();
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$perPage = isset($_GET['perPage']) ? (int) $_GET['perPage'] : 5;
$category = isset($_GET['category']) ? (int) $_GET['category'] : 0;
$character = isset($_GET['character']) ? $_GET['character'] : false;
$realm = isset($_GET['realm']) ? (int) $_GET['realm'] : 1;
//set the realm
$chars->setRealm($realm);
//math the offset
$offset = ($page - 1) * $perPage;
//define some defaults
$where = "";
$isFiltered = false;
if ($category and $category > 0) {
    $where = "AND `category` = :filter";
    $isFiltered = true;
}
//get the armor set categories
$res = $DB->query("SELECT * FROM `armorset_categories` ORDER BY id DESC");
if ($res->rowCount() > 0) {
    while ($arr = $res->fetch()) {
        $categories[$arr['id']] = $arr['name'];
Ejemplo n.º 12
0
}
if (!$CURUSER->isOnline()) {
    echo 'Error: You must be logged in.';
    die;
}
//load the character module
$CORE->load_ServerModule('character');
$CORE->load_CoreModule('item.refund.system');
$CORE->load_ServerModule('commands');
$CORE->load_CoreModule('accounts.finances');
//prepare the sendmail class
$command = new server_Commands();
//Setup the finances class
$finance = new AccountFinances();
//Prepare the characters class
$chars = new server_Character();
//prepare multi errors
$ERRORS->NewInstance('refund_item');
$RealmId = $CURUSER->GetRealm();
$refundId = isset($_POST['id']) ? (int) $_POST['id'] : false;
if (!$RealmId) {
    echo 'There is no realm assigned to your account.';
    die;
}
if (!$chars->setRealm($RealmId)) {
    echo 'The realm assigned to your account is invalid.';
    die;
}
//check if the realm is online
if ($command->CheckConnection($RealmId) !== true) {
    echo 'The realm is currently unavailable. Please try again in few minutes.';
Ejemplo n.º 13
0
$RealmId = $CURUSER->GetRealm();
//check if the realm is online
if ($command->CheckConnection($RealmId) !== true) {
    $ERRORS->Add("The realm is currently unavailable. Please try again in few minutes.");
}
if (!$charName) {
    $ERRORS->Add("Please select a character first.");
}
if (!$items) {
    $ERRORS->Add("There ware no items to send.");
}
$ERRORS->Check('/index.php?page=store');
####################################################################
## The actual script begins here
//construct the characters handler
$chars = new server_Character();
//get the account gold and silver
$accountGold = (int) $CURUSER->get('gold');
$accountSilver = (int) $CURUSER->get('silver');
//start logging
$logs->add('STORE', 'Starting log session, initial values: ' . $accountSilver . ' silver, ' . $accountGold . ' gold. To character: ' . $charName . ' in realm: ' . $RealmId . '.', 'pending');
//set the realm
if ($chars->setRealm($RealmId)) {
    //check if the character belongs to this account
    if ($chars->isMyCharacter(false, $charName)) {
        //create error array
        $itemErrors = array();
        //create negative items string
        $itemsString = false;
        $charData = $chars->getCharacterData(false, $charName, 'guid');
        //Get the character GUID
Ejemplo n.º 14
0
    if (is_array($BalanceError)) {
        //insufficient amount
        foreach ($BalanceError as $currency) {
            $ERRORS->Add("You do not have enough " . ucfirst($currency) . " Coins.");
        }
    } else {
        //technical error
        $ERRORS->Add('Error, the website failed to verify your account balance.');
    }
}
unset($BalanceError);
$ERRORS->Check('/index.php?page=levels');
####################################################################
## The actual script begins here
//construct the characters handler
$chars = new server_Character();
//start logging
$logs->add('PSTORE_LEVEL', 'Starting log session. Leveling character: ' . $character . ' to level ' . $level['level'] . '. Using currency: ' . $level['priceCurrency'] . ', price value: ' . $level['price'] . ', selected realm: ' . $RealmId . '.', 'pending');
//set the realm
if ($chars->setRealm($RealmId)) {
    //check if the character belongs to this account
    if ($chars->isMyCharacter(false, $character)) {
        //get the character name
        $charData = $chars->getCharacterData(false, $character, 'level');
        //check if the character is already higher level
        if ($charData['level'] < $level['level']) {
            //level the character
            $levelUp = $command->levelTo($character, $level['level'], $RealmId);
            //send the gold
            $sentGold = $command->sendMoney($character, $level['money'], 'Premium Store Delivery', $RealmId);
            //make the bags string