Exemplo n.º 1
0
 /**
  * Performs account conversion (merging) step
  * 
  * @access   public
  * @static   WoW_Account::PerformConversionStep($step, $post_data = false)
  * @param    int $step
  * @param    array $post_data = false
  * @category Account Manager Class
  * @return   bool
  **/
 public static function PerformConversionStep($step, $post_data = false)
 {
     switch ($step) {
         case 1:
             // Find account in realm DB and check passwords matching
             if (!is_array($post_data)) {
                 // Wrong post data
                 WoW_Template::SetPageData('conversion_error', true);
                 WoW_Template::SetPageData('account_creation_error_msg', WoW_Locale::GetString('template_account_conversion_error1'));
                 return false;
             }
             $info = DB::Realm()->selectRow("SELECT `id`, `sha_pass_hash` FROM `account` WHERE `username` = '%s' LIMIT 1", $post_data['username']);
             $sha = sha1(strtoupper($post_data['username']) . ':' . strtoupper($post_data['password']));
             if (!$info || $info['sha_pass_hash'] != $sha) {
                 // Wrong post data
                 WoW_Template::SetPageData('conversion_error', true);
                 WoW_Template::SetPageData('account_creation_error_msg', WoW_Locale::GetString('template_account_conversion_error1'));
                 return false;
             }
             // Check account link
             if (DB::WoW()->selectCell("SELECT 1 FROM `DBPREFIX_users_accounts` WHERE `account_id` = %d", $info['id'])) {
                 // Already linked
                 WoW_Template::SetPageData('conversion_error', true);
                 WoW_Template::SetPageData('account_creation_error_msg', WoW_Locale::GetString('template_account_conversion_error2'));
                 return false;
             }
             // All fine
             $_SESSION['conversion_userName'] = $post_data['username'];
             $_SESSION['conversion_userID'] = $info['id'];
             break;
         case 3:
             // Check session
             $conversion_allowed = true;
             if (!isset($_SESSION['conversion_userName']) || !isset($_SESSION['conversion_userID'])) {
                 $conversion_allowed = false;
             } else {
                 if ($_SESSION['conversion_userName'] == null) {
                     $conversion_allowed = false;
                 }
                 if ($_SESSION['conversion_userID'] == 0) {
                     $conversion_allowed = false;
                 }
             }
             if (!$conversion_allowed) {
                 header('Location: ' . WoW::GetWoWPath() . '/account/management/wow-account-conversion.html');
                 exit;
             }
             // Link account
             if (DB::WoW()->query("INSERT INTO `DBPREFIX_users_accounts` VALUES (%d, %d)", self::GetUserID(), (int) $_SESSION['conversion_userID'])) {
                 header('Location: ' . WoW::GetWoWPath() . '/account/management/wow/dashboard.html?accountName=' . $_SESSION['conversion_userName'] . '&region=EU');
                 exit;
             }
             break;
         default:
             return false;
     }
     return true;
 }
Exemplo n.º 2
0
 public static function GetRealmStatus($realmID = false)
 {
     if ($realmID === false) {
         $realmList = DB::Realm()->select("SELECT `id`, `name`, `address`, `port`, `icon`, `timezone` FROM `realmlist`");
     } else {
         if (!WoWConfig::$UseRealmsStatus) {
             return false;
         }
         if (isset(self::$realmsStatusCache[$realmID])) {
             return self::$realmsStatusCache[$realmID];
         }
         $realmList[] = DB::Realm()->selectRow("SELECT `id`, `name`, `address`, `port`, `icon`, `timezone` FROM `realmlist` WHERE `id` = %d", $realmID);
     }
     if (!$realmList) {
         return false;
     }
     $size = count($realmList);
     for ($i = 0; $i < $size; ++$i) {
         $errNo = 0;
         $errStr = 0;
         $realmList[$i]['status'] = @fsockopen($realmList[$i]['address'], $realmList[$i]['port'], $errNo, $errStr, 1) ? 'up' : 'down';
         switch ($realmList[$i]['icon']) {
             default:
             case 0:
             case 4:
                 $realmList[$i]['type'] = 'PvE';
                 break;
             case 1:
                 $realmList[$i]['type'] = 'PvP';
                 break;
             case 6:
                 $realmList[$i]['type'] = WoW_Locale::GetString('template_realm_status_type_roleplay');
                 break;
             case 8:
                 $realmList[$i]['type'] = WoW_Locale::GetString('template_realm_status_type_rppvp');
                 break;
         }
         switch ($realmList[$i]['timezone']) {
             default:
                 $realmList[$i]['language'] = 'Development Realm';
                 break;
             case 8:
                 $realmList[$i]['language'] = WoW_Locale::GetString('template_locale_en');
                 break;
             case 9:
                 $realmList[$i]['language'] = WoW_Locale::GetString('template_locale_de');
                 break;
             case 10:
                 $realmList[$i]['language'] = WoW_Locale::GetString('template_locale_fr');
                 break;
             case 11:
                 $realmList[$i]['language'] = WoW_Locale::GetString('template_locale_es');
                 break;
             case 12:
                 $realmList[$i]['language'] = WoW_Locale::GetString('template_locale_ru');
                 break;
         }
         self::$realmsStatusCache[$realmList[$i]['id']] = $realmList[$i];
     }
     return $realmList;
 }
		</div>
	<span class="clear"><!-- --></span>
	</div>
	<script type="text/javascript">
	//<![CDATA[
		var MsgProfile = {
			tooltip: {
				feature: {
					notYetAvailable: "<?php 
echo WoW_Locale::GetString('template_feature_not_available');
?>
"
				},
				vault: {
					character: "<?php 
echo WoW_Locale::GetString('template_vault_auth_required');
?>
",
					guild: "<?php 
echo WoW_Locale::GetString('template_vault_guild');
?>
"
				}
			}
		};
	//]]>
	</script>
</div>
</div>
</div>
	<a href="<?php 
echo WoW_Characters::GetURL();
?>
pvp" class="" rel="np"><span class="arrow"><span class="icon">PvP</span></span></a>
			</li>
			<li class="<?php 
echo WoW_Template::GetPageData('page') == 'character_feed' ? ' active' : null;
?>
">
	<a href="<?php 
echo WoW_Characters::GetURL();
?>
feed" class="" rel="np"><span class="arrow"><span class="icon"><?php 
echo WoW_Locale::GetString('template_profile_feed');
?>
</span></span></a>
			</li>
			<?php 
if (WoW_Account::IsAccountCharacter()) {
    echo sprintf('<li class="%s">
	<a href="%s/wow/vault/character/friend" class=" vault" rel="np"><span class="arrow"><span class="icon">%s</span></span></a>
			</li>', WoW_Template::GetPageData('page') == 'vault_friends' ? ' active' : null, WoW::GetWoWPath(), WoW_Locale::GetString('template_profile_friends'));
}
if (WoW_Characters::GetGuildID() > 0) {
    echo sprintf('<li class="%s">
	<a href="%s?character=%s" class=" has-submenu" rel="np"><span class="arrow"><span class="icon">%s</span></span></a>
			</li>', WoW_Template::GetPageData('page') == 'guild_roster' ? ' active' : null, WoW_Characters::GetGuildURL(), urlencode(WoW_Characters::GetName()), WoW_Locale::GetString('template_profile_guild'));
}
?>
		
	</ul>
<fieldset class="ui-controls section-buttons">
<button
class="ui-button button1 "
type="submit"
tabindex="1">
<span>
<span><?php 
echo WoW_Locale::GetString('template_account_conversion_confirm_sole_user_yes');
?>
</span>
</span>
</button>
<a class="ui-cancel "
href="<?php 
echo WoW::GetWoWPath();
?>
/account/management/"
tabindex="1">
<span>
<?php 
echo WoW_Locale::GetString('template_account_conversion_confirm_sole_user_no');
?>
</span>
</a>
</fieldset>
</form>
</div>
</div>
</div>
</div>
Exemplo n.º 6
0
echo WoW_Locale::GetString('template_guild_menu_achievements');
?>
</span></span></a>
    </li>
    <li class="<?php 
echo WoW_Template::GetPageData('guild-page') == 'perks' ? ' active' : null;
?>
">
        <a href="<?php 
echo WoW_Guild::GetGuildUrl();
?>
perk" class="" rel="np"><span class="arrow"><span class="icon"><?php 
echo WoW_Locale::GetString('template_guild_menu_perks');
?>
</span></span></a>
    </li>
    <li class="<?php 
echo WoW_Template::GetPageData('guild-authorized') == false ? ' disabled' : null;
echo WoW_Template::GetPageData('guild-page') == 'rewards' ? ' active' : null;
?>
">
        <a href="<?php 
echo WoW_Template::GetPageData('guild-authorized') == true ? '/vault/guild/reward' : 'javascript:;';
?>
" class=" vault" rel="np"><span class="arrow"><span class="icon"><?php 
echo WoW_Locale::GetString('template_guild_menu_rewards');
?>
</span></span></a>
    </li>
</ul>
Exemplo n.º 7
0
 public function LoadItem($item_entry, $itemGuid = 0, $ownerGuid = 0)
 {
     $item_row = DB::World()->selectRow("\n        SELECT\n        `a`.*,\n        %s\n        `b`.`icon`,\n        `d`.`patch`\n        FROM `item_template` AS `a`\n        LEFT JOIN `DBPREFIX_icons` AS `b` ON `b`.`displayid` = `a`.`displayid`\n        LEFT JOIN `locales_item` AS `c` ON `c`.`entry` = `a`.`entry`\n        LEFT JOIN `DBPREFIX_item_version` AS `d` ON `d`.`entry` = `a`.`entry`\n        WHERE `a`.`entry` = %d LIMIT 1", WoW_Locale::GetLocaleID() > 0 ? sprintf('`c`.`name_loc%d` AS `name_loc`, `c`.`description_loc%d` AS `desc_loc`,', WoW_Locale::GetLocaleID(), WoW_Locale::GetLocaleID()) : null, $item_entry);
     if (!$item_row) {
         WoW_Log::WriteError('%s : item #%d (GUID: %d) was not found in `item_template` table.', __METHOD__, $item_entry, $itemGuid);
         return false;
     }
     // FlagsExtra check
     if (isset($item_row['FlagsExtra'])) {
         $item_row['Flags2'] = $item_row['FlagsExtra'];
         unset($item_row['FlagsExtra']);
         // For compatibility
     }
     // Assign variables
     foreach ($item_row as $field => $value) {
         $this->{$field} = $value;
     }
     // Create arrays
     // Item mods
     for ($i = 0; $i < MAX_ITEM_PROTO_STATS + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'stat_type' . $key})) {
             $this->ItemStat[$i] = array('type' => $this->{'stat_type' . $key}, 'value' => $this->{'stat_value' . $key});
         }
     }
     // Item damages
     for ($i = 0; $i < MAX_ITEM_PROTO_DAMAGES + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'dmg_type' . $key})) {
             $this->Damage[$i] = array('type' => $this->{'dmg_type' . $key}, 'min' => $this->{'dmg_min' . $key}, 'max' => $this->{'dmg_max' . $key});
         }
     }
     // Item spells
     for ($i = 0; $i < MAX_ITEM_PROTO_SPELLS + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'spellid_' . $key})) {
             $this->Spells[$i] = array('spellid' => $this->{'spellid_' . $key}, 'trigger' => $this->{'spelltrigger_' . $key}, 'charges' => $this->{'spellcharges_' . $key}, 'ppmRate' => $this->{'spellppmRate_' . $key}, 'cooldown' => $this->{'spellcooldown_' . $key}, 'category' => $this->{'spellcategory_' . $key}, 'categorycooldown' => $this->{'spellcategorycooldown_' . $key});
         }
     }
     // Item sockets
     for ($i = 0; $i < MAX_ITEM_PROTO_SOCKETS + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'socketColor_' . $key})) {
             $this->Socket[$i] = array('color' => $this->{'socketColor_' . $key}, 'content' => $this->{'socketContent_' . $key}, 'filter' => 0, 'name' => '');
             switch ($this->Socket[$i]['color']) {
                 case 1:
                     $this->Socket[$i]['filter'] = $this->Socket[$i]['color'];
                     $this->Socket[$i]['name'] = 'meta';
                 case 2:
                     $this->Socket[$i]['filter'] = $this->Socket[$i]['color'];
                     $this->Socket[$i]['name'] = 'red';
                     break;
                 case 4:
                     $this->Socket[$i]['filter'] = 3;
                     $this->Socket[$i]['name'] = 'yellow';
                     break;
                 case 8:
                     $this->Socket[$i]['filter'] = 4;
                     $this->Socket[$i]['name'] = 'blue';
                     break;
             }
         }
     }
     // Set locale
     if (WoW_Locale::GetLocaleID() != LOCALE_EN) {
         $this->name = $this->name_loc != null ? $this->name_loc : $this->name;
         $this->description = $this->desc_loc != null ? $this->desc_loc : $this->description;
     }
     // Data to template class
     WoW_Template::SetPageData('item_name', $this->name);
     // Set class/subclass/inventory type names
     $itemsubclass = DB::World()->selectRow("SELECT `subclass_name_%s` AS `subclass`, `class_name_%s` AS `class` FROM `DBPREFIX_item_subclass` WHERE `subclass` = %d AND `class` = %d LIMIT 1", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), $this->subclass, $this->class);
     if (is_array($itemsubclass)) {
         $this->subclass_name = $itemsubclass['subclass'];
         $this->class_name = $itemsubclass['class'];
     }
     if (in_array($this->class, array(ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON))) {
         $this->InventoryType_name = $this->InventoryType > 0 ? WoW_Locale::GetString('template_item_invtype_' . $this->InventoryType) : null;
     }
     // Faction
     if ($this->Flags2 & ITEM_FLAGS2_HORDE_ONLY) {
         $this->faction = FACTION_HORDE;
         $this->faction_convert = DB::World()->selectCell("SELECT `item_alliance` FROM `DBPREFIX_item_equivalents` WHERE `item_horde` = %d", $this->entry);
     } elseif ($this->Flags2 & ITEM_FLAGS2_ALLIANCE_ONLY) {
         $this->faction = FACTION_ALLIANCE;
         $this->faction_convert = DB::World()->selectCell("SELECT `item_horde` FROM `DBPREFIX_item_equivalents` WHERE `item_alliance` = %d", $this->entry);
     }
     // GUIDs
     $this->m_guid = $itemGuid;
     // Can be NULL.
     $this->m_owner = $ownerGuid;
     // Can be NULL.
     $this->loaded = true;
     return true;
 }
Exemplo n.º 8
0
    die;
}
echo '<form action="" method="POST">
    <input type="hidden" name="helper" value="1" />
    <strong>Allowable races:</strong><br />';
for ($i = 1; $i < 12; ++$i) {
    echo '<label for="race_' . $i . '">' . WoW_Locale::GetString('character_race_' . $i) . '</label> <input type="checkbox"  name="race_' . $i . '" id="race_' . $i . '" value="1" /><br />';
}
echo '<label for="race_22">' . WoW_Locale::GetString('character_race_22') . '</label> <input type="checkbox"  name="race_22" id="race_22" value="1" /><br />';
echo '<br />
    <strong>Allowable classes:</strong><br />';
for ($i = 1; $i < 12; ++$i) {
    if ($i == 10) {
        continue;
    }
    echo '<label for="class_' . $i . '">' . WoW_Locale::GetString('character_class_' . $i) . '</label> <input type="checkbox"  name="class_' . $i . '" id="class_' . $i . '" value="1" /><br />';
}
echo '<br />
    <strong>Armor:</strong><br />
    <label for="armor_cloth">Cloth</label> <input type="checkbox"  value="1" name="armor_cloth" id="armor_cloth" /><br />
    <label for="armor_leather">Leather</label> <input type="checkbox"  value="1" name="armor_leather" id="armor_leather" /><br />
    <label for="armor_mail">Mail</label> <input type="checkbox"  value="1" name="armor_mail" id="armor_mail" /><br />
    <label for="armor_plate">Plate</label> <input type="checkbox"  value="1" name="armor_plate" id="armor_plate" /><br />
    <label for="armor_shield">Shield</label> <input type="checkbox"  value="1" name="armor_shield" id="armor_shield" /><br />
    <br />
    <strong>Weapons:</strong><br />';
foreach ($weapons as &$weapon) {
    echo '<label for="weapon_' . $weapon . '">' . ucfirst($weapon) . '</label> <input type="checkbox"  value="1" name="weapon_' . $weapon . '" id="weapon_' . $weapon . '" /><br />';
}
echo '<br /><strong>Roles:</strong><br />';
foreach ($roles as $role) {
    <div class="user-plate">
        <a href="?login" class="card-character plate-logged-out" onclick="return Login.open()">
            <span class="card-portrait"></span>
            <span class="wow-login-key"></span>
            <span class="login-msg"><?php 
echo WoW_Locale::GetString('template_userbox_auth_caption');
?>
</span>
        </a>
    </div>
              <a href="#" class="note-toggler" rel="newPassword-note">
                <img src="<?php 
echo WoW::GetWoWPath();
?>
/account/images/icons/tooltip-help.gif" alt="?" width="16" height="16" /></a>
            </div>
          </div>      
          <div class="form-row required">
            <label for="reNewPassword" class="label-full ">
              <strong><?php 
echo WoW_Locale::GetString('template_account_password_reset_change_confirm');
?>
</strong>
              <span class="form-required">*</span>
            </label> 
            <input type="password" id="reNewPassword" name="reNewPassword" value="" class="input border-5 glow-shadow-2" maxlength="16" tabindex="1" />
          </div>
          <fieldset class="ui-controls"> 
            <button class="ui-button button1 disabled" type="submit" disabled="disabled" id="settings-submit" tabindex="1">
              <span><span><?php 
echo WoW_Locale::GetString('template_account_password_reset_next');
?>
</span></span>
            </button>
            </fieldset>
        </form>
      </div>
    </div>
  </div>
</div>
  <div class="wrapper">
    <div id="content">
      <div id="page-header">
    	<h3 class="headline"><?php 
echo WoW_Locale::GetString('template_account_password_reset_change_success');
?>
</h3>
      </div>
      <div id="page-content" class="page-content">
          <h4 class="caption"><?php 
echo WoW_Locale::GetString('template_account_password_reset_change_success_title');
?>
</h4>
          <p><?php 
echo WoW_Locale::GetString('template_account_password_reset_change_success_info');
?>
</p>
          <div class="section-buttons">
           <a class="ui-button button1" href="<?php 
echo WoW::GetWoWPath();
?>
/account/"><span><span><?php 
echo WoW_Locale::GetString('template_account_password_reset_change_success_home');
?>
</span></span></a>
          </div>
      </div>
    </div>
  </div>
</div>
    }
}
?>
</div>
</div>
</div>
<div class="filter">
<input type="input" class="input character-filter" value="<?php 
echo WoW_Locale::GetString('template_filter_caption');
?>
" alt="<?php 
echo WoW_Locale::GetString('template_filter_caption');
?>
" /><br />
<a href="javascript:;" onclick="CharSelect.swipe('out', this); return false;"><?php 
echo WoW_Locale::GetString('template_back_to_characters_list');
?>
</a>
</div>
</div>
</div> </div>
</div>
<?php 
if (WoW_Account::GetActiveCharacterInfo('guildId') > 0) {
    echo sprintf('<div class="guild"><a class="guild-name" href="%s">%s</a></div>', WoW_Account::GetActiveCharacterInfo('guildUrl'), WoW_Account::GetActiveCharacterInfo('guildName'));
}
?>
</div>
</div>
<div class="card-overlay"></div>
</div>
			
					</div>
			</div>
			
			<ul class="navigation">
                    <?php 
for ($i = 4; $i >= 0; --$i) {
    echo sprintf('<li>
						<a href="javascript:;"
						   id="nav-%d"
						   onclick="WikiDirectory.view(this, %d);"
						   class="expansion-%d' . ($i == 4 ? ' nav-active' : '') . '">
							%s
						</a>
					</li>
                    ', $i, $i, $i, WoW_Locale::GetString('template_expansion_' . $i));
}
?>
			</ul>
		</div>

	<script type="text/javascript">
	//<![CDATA[
			$(function() {
				WikiDirectory.initialize(3);
			});
	//]]>
	</script>


	<span class="clear"><!-- --></span>
Exemplo n.º 14
0
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('item_info');
     WoW_Template::SetPageData('page', 'item_info');
     WoW_Template::SetMenuIndex('menu-game');
     $url_data = WoW::GetUrlData('item');
     if (!$url_data) {
         if (!isset($_GET['t'])) {
             WoW_Template::ErrorPage(404);
         }
         exit;
     }
     $item_entry = $url_data['item_entry'];
     if ($item_entry == 0) {
         $breadcrumbs = WoW_Items::GetBreadCrumbsForItem($_GET);
         WoW_Template::SetPageIndex('item_list');
         WoW_Template::SetPageData('body_class', 'item-index');
         WoW_Template::SetPageData('page', 'item_list');
         WoW_Template::SetPageData('breadcrumbs', $breadcrumbs);
         WoW_Template::SetPageData('last-crumb', is_array($breadcrumbs) ? $breadcrumbs[sizeof($breadcrumbs) - 1]['caption'] : WoW_Locale::GetString('template_menu_items'));
         WoW_Template::LoadTemplate('page_index');
         exit;
     }
     // Load proto
     $proto = new WoW_ItemPrototype();
     $proto->LoadItem($item_entry);
     if (!$proto->IsCorrect()) {
         if (!isset($_GET['t']) && (!isset($url_data['action0']) || $url_data['action0'] != 'tooltip')) {
             WoW_Template::ErrorPage(404);
         }
         exit;
     }
     WoW_Template::SetPageData('item_entry', $item_entry);
     // SSD and SSV data
     $ssd = DB::WoW()->selectRow("SELECT * FROM `DBPREFIX_ssd` WHERE `entry` = %d", $proto->ScalingStatDistribution);
     $ssd_level = MAX_PLAYER_LEVEL;
     if (isset($_GET['pl'])) {
         $ssd_level = (int) $_GET['pl'];
         if (is_array($ssd) && $ssd_level > $ssd['MaxLevel']) {
             $ssd_level = $ssd['MaxLevel'];
         }
     }
     $ssv = DB::WoW()->selectRow("SELECT * FROM `DBPREFIX_ssv` WHERE `level` = %d", $ssd_level);
     if (isset($_GET['t'])) {
         $url_data['tooltip'] = true;
     }
     if ($url_data['tooltip'] == true) {
         WoW_Template::SetPageIndex('item_tooltip');
         WoW_Template::SetPageData('tooltip', true);
         WoW_Template::SetPageData('page', 'item_tooltip');
         WoW_Template::SetPageData('proto', $proto);
         WoW_Template::SetPageData('ssd', $ssd);
         WoW_Template::SetPageData('ssd_level', $ssd_level);
         WoW_Template::SetPageData('ssv', $ssv);
         WoW_Template::LoadTemplate('page_item_tooltip');
     } else {
         if (isset($url_data['action0']) && $url_data['action0'] != null) {
             WoW_Template::SetPageData('tab_type', $url_data['action0']);
             WoW_Template::LoadTemplate('page_item_tab');
             exit;
         }
         WoW_Template::SetPageIndex('item');
         WoW_Template::SetPageData('tooltip', false);
         WoW_Template::SetPageData('itemName', $proto->name);
         WoW_Template::SetPageData('page', 'item');
         WoW_Template::SetPageData('proto', $proto);
         WoW_Template::SetPageData('ssd', $ssd);
         WoW_Template::SetPageData('ssd_level', $ssd_level);
         WoW_Template::SetPageData('ssv', $ssv);
         WoW_Template::LoadTemplate('page_index');
     }
     unset($proto);
 }
//]]>
</script>
                  </div> 
                  <div class="post-detail" id="post-preview" style="display: none; "><?php 
echo WoW_Template::GetPageData('edit_text');
?>
</div> 
                  <div class="talkback-btm">
                    <table class="dynamic-center ">
                      <tr>
                        <td>
                          <div id="submitBtn"> 
                            <button class="ui-button button1 " type="submit">
                              <span>
                                <span><?php 
echo WoW_Locale::GetString('template_forum_submit');
?>
</span>
                              </span>
                            </button>
                          </div>
                        </td>
                      </tr>
                    </table>
                  </div>
                </div>
                <span class="clear"><!-- --></span>
              </div>
            </div>
          </form>
          <span class="clear"><!-- --></span>
&amp;s=popularity"><?php 
echo WoW_Locale::GetString('template_search_filter_popularity');
?>
</a> 
</div>
<div class="search-categories">
<?php 
if (!WoW_Search::IsOnlyOnePageFound()) {
    echo WoW_Search::GetResultsCount() == 0 ? null : sprintf('<a class="type-search%s" href="search?q=%s">%s</a>', WoW_Search::GetCurrentPage() == 'search' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_all'), WoW_Search::GetResultsCount()));
}
echo WoW_Search::GetArenaTeamsSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowarenateam%s" href="search?q=%s&amp;f=wowarenateam">%s</a>', WoW_Search::GetCurrentPage() == 'wowarenateam' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_arenateams'), WoW_Search::GetArenaTeamsSearchResultsCount()));
echo WoW_Search::GetNewsSearchResultsCount() == 0 ? null : sprintf('<a class="type-article%s" href="search?q=%s&amp;f=article">%s</a>', WoW_Search::GetCurrentPage() == 'article' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_articles'), WoW_Search::GetNewsSearchResultsCount()));
echo WoW_Search::GetCharactersSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowcharacter%s" href="search?q=%s&amp;f=wowcharacter">%s</a>', WoW_Search::GetCurrentPage() == 'wowcharacter' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_characters'), WoW_Search::GetCharactersSearchResultsCount()));
echo WoW_Search::GetItemsSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowitem%s" href="search?q=%s&amp;f=wowitem">%s</a>', WoW_Search::GetCurrentPage() == 'wowitem' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_items'), WoW_Search::GetItemsSearchResultsCount()));
echo WoW_Search::GetPostsSearchResultsCount() == 0 ? null : sprintf('<a class="type-post%s" href="search?q=%s&amp;f=post">%s</a>', WoW_Search::GetCurrentPage() == 'post' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_forums'), WoW_Search::GetPostsSearchResultsCount()));
echo WoW_Search::GetGuildsSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowguild%s" href="search?q=%s&amp;f=wowguild">%s</a>', WoW_Search::GetCurrentPage() == 'wowguild' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_guilds'), WoW_Search::GetGuildsSearchResultsCount()));
?>
</div>
<?php 
switch (WoW_Search::GetCurrentPage()) {
    case 'wowcharacter':
        WoW_Template::LoadTemplate('block_search_table_characters');
        break;
    case 'wowitem':
        WoW_Template::LoadTemplate('block_search_table_items');
        break;
    case 'article':
        WoW_Template::LoadTemplate('block_search_table_articles');
        break;
    case 'wowguild':
        WoW_Template::LoadTemplate('block_search_results_guilds');
			<br />

				<p class="align-center">
				<a class="ui-button button1" href="<?php 
echo WoW::GetWoWPath();
?>
/account/creation/tos.html">
				<span class="button-left"><span class="button-right"><?php 
echo WoW_Locale::GetString('template_bn_new_account');
?>
</span></span></a>
					<span style="padding-left: 10px">
						<?php 
echo WoW_Locale::GetString('template_bn_got_account');
?>
 <a href="<?php 
echo WoW::GetWoWPath();
?>
?login" onclick="return Login.open('<?php 
echo WoW::GetWoWPath();
?>
/login/login.frag')" tabindex="1"><?php 
echo WoW_Locale::GetString('template_bn_log_in');
?>
</a>
					</span>
				</p>

			<br />
		</div>
echo WoW_Locale::GetString('template_guide_nav_iii');
?>
</span>
			<div class="nav-buttons">
				<a href="how-to-play" class="prev">
					<span>
						<span style="background-image:url('<?php 
echo WoW::GetWoWPath();
?>
/wow/static/images/game/guide/how-to-play-prev.gif');"><?php 
echo WoW_Locale::GetString('template_guide_nav_ii');
?>
</span>
					</span>
				</a>
				<a href="late-game" class="next">
					<span>
						<span style="background-image:url('<?php 
echo WoW::GetWoWPath();
?>
/wow/static/images/game/guide/late-game-next.gif');"><?php 
echo WoW_Locale::GetString('template_guide_nav_iv');
?>
</span>
					</span>
				</a>
			</div>
		</div>
</div>
</div>
<div id="left-results">
    <?php 
$searchResults = WoW_Search::GetSearchResults('wowguild');
if (is_array($searchResults)) {
    foreach ($searchResults as $guild) {
        echo sprintf('
    <div class="search-result">
        <div class="">
            <div class="result-title">
                <a href="%s/wow/%s/guild/%s/%s/" class="search-title">&lt;%s&gt;</a>
            </div>
            <div class="search-content">
                <div class="info">%s / %s</div>
            </div>
            <div class="search-results-url"> /wow/guild/%s/%s/</div>
        </div>
        <div class="clear"></div>
    </div>', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $guild['realmName'], $guild['name'], $guild['name'], $guild['realmName'], WoW_Locale::GetString(WoW_Utils::GetFactionId($guild['raceId']) == FACTION_ALLIANCE ? 'faction_alliance' : 'faction_horde'), $guild['realmName'], $guild['name']);
    }
}
?>
</div>
<head>
<title><?php 
echo WoW_Layout::GetPageTitle() . WoW_Locale::GetString('template_title');
?>
</title>
<meta content="false" http-equiv="imagetoolbar" />
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<link rel="shortcut icon" href="<?php 
echo WoW::GetWoWPath();
?>
/wow/static/local-common/images/favicons/wow.ico" type="image/x-icon"/>
<link rel="search" type="application/opensearchdescription+xml" href="http://eu.battle.net/<?php 
echo WoW_Locale::GetLocale(LOCALE_DOUBLE);
?>
/data/opensearch" title="<?php 
echo WoW_Locale::GetString('template_bn_search');
?>
" />
<?php 
echo WoW_Layout::PrintCSSForPage();
?>
<script type="text/javascript" src="<?php 
echo WoW::GetWoWPath();
?>
/wow/static/local-common/js/third-party/jquery-1.4.4-p1.min.js"></script>
<script type="text/javascript" src="<?php 
echo WoW::GetWoWPath();
?>
/wow/static/local-common/js/core.js"></script>
<script type="text/javascript" src="<?php 
echo WoW::GetWoWPath();
Exemplo n.º 21
0
 public static function CancelAuction($auction_id)
 {
     $item = self::GetAuction($auction_id);
     if (!$item) {
         return sprintf('{"error": {"code": 1004, "message": "%s"}}', WoW_Locale::GetString('template_auction_error_auc_not_found'));
     }
     $char = WoW_Account::GetActiveCharacter();
     return sprintf('{
         "auctionFaction": %d,
         "character": {
             "name" : "%s",
             "level" : %d,
             "genderId" : %d,
             "factionId" : %d,
             "classId" : %d,
             "className" : "%s",
             "raceId" : %d,
             "raceName" : "%s"
         },
         "auction": {
             "auctionId" : %d,
             "highBidder" : %s,
             "owner" : true,
             "ownerName" : "%s",
             "currentBid" : %d,
             "currentBidPerUnit" : %d,
             "nextBid" : %d,
             "nextBidPerUnit" : %d,
             "buyout" : %d,
             "buyoutPerUnit" : %d,
             "timeLeft" : %d,
             "name" : "%s",
             "params" : "i=%d&s=%d",
             "guid" : %d,
             "id" : %d,
             "icon" : "%s",
             "quality" : %d
         }
     }', $char['faction'], $char['name'], $char['level'], $char['gender'], $char['faction'], $char['class'], $char['class_text'], $char['race'], $char['race_text'], $item['auction_id'], $item['lastbid'], $char['name'], $item['lastbid'] > 0 ? $item['lastbid'] : $item['price_raw'], $item['lastbid'] > 0 ? $item['lastbid'] : $item['price_raw'], $item['lastbid'] > 0 ? $item['lastbid'] : $item['price_raw'], $item['lastbid'] > 0 ? $item['lastbid'] : $item['price_raw'], $item['buyout_raw'], $item['buyout_raw'], $item['time'], $item['name'], $item['id'], $item['guid'], $item['guid'], $item['id'], $item['icon'], $item['quality']);
 }
Exemplo n.º 22
0
?>
" tabindex="50" />
</div>
</form>
</div>
<h1 id="logo"><a href="<?php 
echo WoW::GetWoWPath();
?>
/<?php 
echo WoW_Locale::GetLocale();
?>
/" tabindex="50" accesskey="h">Battle.net</a></h1>
<div id="navigation">
<div id="page-menu" class="large">
<h2 class="isolated"><?php 
echo WoW_Locale::GetString('template_management_account_creation');
?>
</h2>
<span class="clear"><!-- --></span>
</div>
<span class="clear"></span>
</div>
</div>
<?php 
WoW_Template::LoadTemplate('block_service', true);
?>
</div>
</div>
<?php 
switch (WoW_Template::GetPageIndex()) {
    case 'management':
                </div>
                <span class="clear"><!-- --></span>
              </div>
            </div>
<?php 
} else {
    ?>
            <div class="post ">
              <table class="dynamic-center ">
                <tr>
                  <td>
                    <a class="ui-button button1 " href="?login" onclick="return Login.open('<?php 
    echo WoW::GetWoWPath();
    ?>
/login/login.frag')"><span><span><?php 
    echo WoW_Locale::GetString('template_forum_add_reply');
    ?>
</span></span></a>
                  </td>
                </tr>
              </table>
            </div>
          </div>
<?php 
}
?>
        </form>
        <span class="clear"><!-- --></span>
        <div class="talkback-code">
          <div class="talkback-code-interior">
            <div class="talkback-icon">
	<div id="cms-account-status" class="ajax-update">
			<div id="forum-content">
				<div class="section-header">
					<?php 
if (WoW_Template::GetPageData('account-status') == 'no_subscribe') {
    echo WoW_Locale::GetString('template_account_status_posting_disabled');
}
?>
				</div>
				<div class="bannedInfo">
					<div class="banned-int">
							<div class="center">
								<?php 
echo WoW_Locale::GetString('template_account_status_info_' . WoW_Template::GetPageData('account-status'));
?>
                            </div>
					</div>
				</div>
			</div>
	<div class="center">
		<?php 
if (WoW_Template::GetPageData('account-status') == 'no_subscribe') {
    echo sprintf('%s<div><a class="ui-button button1 " href="?logout"><span><span>%s</span></span></a></div>', WoW_Locale::GetString('template_account_status_clear_session'), WoW_Locale::GetString('template_account_status_log_out'));
}
?>
	</div>
	</div>
</div>
</div>
</div>
<div>
    <div class="sidebar-title">
        <h3 class="title-friends">
            <a href="<?php 
echo WoW::GetWoWPath();
?>
/wow/vault/character/friend"><?php 
echo sprintf(WoW_Locale::GetString('template_character_friends_caption'), WoW_Account::GetFriendsListCount());
?>
</a>
        </h3>
    </div>
    <div class="sidebar-content">
    <?php 
$friends = WoW_Account::GetFriendsListForPrimaryCharacter();
if (is_array($friends)) {
    foreach ($friends as $friend) {
        echo sprintf('<a href="%s" class="sidebar-tile">
            <span class="icon-frame frame-27"><img src="%s/wow/static/images/2d/avatar/%d-%d.jpg" width="27" height="27" /></span>
            <strong>%s</strong>
            <span class="color-c%d">%s</span>
            <span class="clear"><!-- --></span>
        </a>', $friend['url'], WoW::GetWoWPath(), $friend['race_id'], $friend['gender'], $friend['name'], $friend['class_id'], sprintf(WoW_Locale::GetString('template_character_friends_character'), $friend['level'], $friend['race_string'], $friend['class_string']));
    }
}
?>
    </div>
</div>
/account/management/wow-account-conversion.html" id="convert-submit">
<input type="hidden" name="csrftoken" value="3ea60088-b2d5-4734-9577-efd4b518a963" />
<div class="input-hidden">
<input type="hidden" id="convert-target-page" name="targetpage" value="finish" />
</div>
<fieldset class="ui-controls section-buttons">
<button class="ui-button button1" type="submit" tabindex="1">
<span>
<span><?php 
echo WoW_Locale::GetString('template_account_conversion_complete');
?>
</span>
</span>
</button>
<a class="ui-cancel" href="#" tabindex="1"><span><?php 
echo WoW_Locale::GetString('template_wow_dashboard_upgrade_account_cancel');
?>
</span></a>
</fieldset>
</form>
</div>
</div>
<!--[if lt IE 7]> <script type="text/javascript" src="<?php 
echo WoW::GetWoWPath();
?>
/account/local-common/js/third-party/DD_belatedPNG.js"></script>
<script type="text/javascript">
//<![CDATA[
DD_belatedPNG.fix('.merge-arrow');
DD_belatedPNG.fix('.conversion-details li');
//]]>
Exemplo n.º 27
0
?>
';
Core.buildRegion = 'eu';
Core.loggedIn = <?php 
echo WoW_Account::IsLoggedIn() ? 'true' : 'false';
?>
;
Flash.videoPlayer = '<?php 
echo WoW::GetWoWPath();
?>
/wow/player/videoplayer.swf';
Flash.videoBase = '<?php 
echo WoW::GetWoWPath();
?>
/wow/media/videos';
Flash.ratingImage = '<?php 
echo WoW::GetWoWPath();
?>
/wow/player/rating-pegi.jpg';
//]]>
</script>
<meta name="title" content="Battle.net" />
<meta name="description" content="<?php 
echo WoW_Locale::GetString('template_bn_description');
?>
" />
<link rel="image_src" href="<?php 
echo WoW::GetWoWPath();
?>
/static/local-common/images/logos/blizz-sc2.png?v15" />
</head>
Exemplo n.º 28
0
} elseif ($race['id'] == RACE_HUMAN) {
    $prevRaceId = RACE_WORGEN;
}
if (!isset($prevRaceId)) {
    $prevRaceId = $race['id'] - 1;
}
if (!isset($nextRaceId)) {
    $nextRaceId = $race['id'] + 1;
}
?>
<a class="ui-button next-race button1-next" href="<?php 
echo WoW_Utils::GetRaceKeyById($nextRaceId);
?>
"><span><span><?php 
echo sprintf(WoW_Locale::GetString('template_game_race_next'), WoW_Locale::GetString('character_race_' . $nextRaceId));
?>
</span></span></a>
<a class="ui-button previous-race button1-previous" href="<?php 
echo WoW_Utils::GetRaceKeyById($prevRaceId);
?>
"><span><span><?php 
echo sprintf(WoW_Locale::GetString('template_game_race_prev'), WoW_Locale::GetString('character_race_' . $prevRaceId));
?>
</span></span></a>


			</div>
        </div>
	</div>
</div>
Exemplo n.º 29
0
 public static function GetClassRolesInfo($roles_flag)
 {
     $role_info = '';
     $roles_masks = array('ROLE_MASK_TANK', 'ROLE_MASK_HEALER', 'ROLE_MASK_MELEE', 'ROLE_MASK_RANGED', 'ROLE_MASK_CASTER');
     foreach ($roles_masks as $mask) {
         if ($roles_flag & constant($mask)) {
             $role = strtolower(substr($mask, 10));
             if (!$role) {
                 continue;
             }
             $role_info .= WoW_Locale::GetString('template_class_role_' . $role);
             $roles_flag -= constant($mask);
             if ($roles_flag > 0) {
                 $role_info .= ', ';
             }
         }
     }
     return $role_info;
 }
Exemplo n.º 30
0
} elseif ($class['id'] == CLASS_WARLOCK) {
    $nextClassId = CLASS_DRUID;
} elseif ($class['id'] == CLASS_DRUID) {
    $nextClassId = CLASS_WARRIOR;
    $prevClassId = CLASS_WARLOCK;
}
if (!isset($nextClassId)) {
    $nextClassId = $class['id'] + 1;
}
if (!isset($prevClassId)) {
    $prevClassId = $class['id'] - 1;
}
?>
<a class="ui-button next-class button1-next" href="<?php 
echo WoW_Utils::GetClassKeyById($nextClassId);
?>
"><span><span><?php 
echo sprintf(WoW_Locale::GetString('template_game_class_next'), WoW_Locale::GetString('character_class_' . $nextClassId));
?>
</span></span></a>
<a class="ui-button previous-class button1-previous" href="<?php 
echo WoW_Utils::GetClassKeyById($prevClassId);
?>
"><span><span><?php 
echo sprintf(WoW_Locale::GetString('template_game_class_prev'), WoW_Locale::GetString('character_class_' . $nextClassId));
?>
</span></span></a>
			</div>
	</div>
</div>