Exemplo n.º 1
0
              
          	<!-- 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>
                                        ';
            $selectOptions .= '<option value="' . $arr['name'] . '" getHtmlFrom="#character-option-' . $arr['guid'] . '"></option>';
Exemplo n.º 2
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;
 }
Exemplo 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>
Exemplo n.º 4
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);