<td class="align-center season arenateam-gameswonlost" data-raw="%d"> <span class="arenateam-gameswon">%d</span> – <span class="arenateam-gameslost">%d</span> <span class="arenateam-percent">(%d%%)</span> </td> <td class="align-center weekly" style="display:none;"> 0 <span class="arenateam-percent">(0%%)</span> </td> <td class="align-center weekly arenateam-gameswonlost" data-raw="0" style="display:none;"> <span class="arenateam-gameswon">0</span> – <span class="arenateam-gameslost">0</span> <span class="arenateam-percent">(0%%)</span> </td> <td class="align-center"><span class="arenateam-rating">%d</span></td> </tr>', $toggleStyle % 2 ? 2 : 1, $member['name'], $member['url'], $member['url'], $member['class'], WoW::GetWoWPath(), $member['race'], $member['gender'], WoW::GetWoWPath(), $member['class'], $member['name'], $member['guid'] == $team['data']['captain'] ? '<span class="leader" data-tooltip="Капитан команды"></span>' : null, $member['played_season'], round(WoW_Utils::GetPercent($team['data']['games_season'], $member['played_season'])), $member['wons_season'], $member['wons_season'], $member['lost_season'], round(WoW_Utils::GetPercent($member['played_season'], $member['wons_season'])), $member['personal_rating']); ++$toggleStyle; } ?> </tbody> </table> </div> <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { new Table('#arena-roster-<?php echo $team['data']['type_text']; ?> ', { column: 3, method: 'numeric', type: 'desc' }); Tooltip.bind('#arena-roster-<?php
public static function GetProgressInfo($c = 0) { $progress_info = array(); // We have to request data from DB. $categories = array(ACHIEVEMENTS_CATEGORY_GENERAL, ACHIEVEMENTS_CATEGORY_QUESTS, ACHIEVEMENTS_CATEGORY_EXPLORATION, ACHIEVEMENTS_CATEGORY_PVP, ACHIEVEMENTS_CATEGORY_DUNGEONS, ACHIEVEMENTS_CATEGORY_PROFESSIONS, ACHIEVEMENTS_CATEGORY_REPUTATION, ACHIEVEMENTS_CATEGORY_EVENTS, ACHIEVEMENTS_CATEGORY_FEATS); if ($c > 0) { return array('total' => self::GetCategoryCap($c), 'completed' => self::GetAchievementsCountInCategory($c), 'totalPoints' => self::GetAchievementPointsCategoryCap($c), 'achievedPoints' => self::GetAchievementPointsCountInCategory($c), 'percent' => WoW_Utils::GetPercent(self::GetCategoryCap($c), min(self::GetCategoryCap($c), self::GetAchievementsCountInCategory($c)))); } $progress_info[0] = array('total' => 1058, 'completed' => self::GetAchievementsCount(), 'percent' => WoW_Utils::GetPercent(1058, min(1058, self::GetAchievementsCount())), 'totalPoints' => self::GetAchievementPointsCategoryCap(0), 'achievedPoints' => self::GetAchievementsPoints()); foreach ($categories as $cat) { $points = self::GetAchievementPointsCountInCategory($cat); $categoryCap = self::GetAchievementPointsCategoryCap($cat); $progress_info[$cat] = array('total' => self::GetCategoryCap($cat), 'completed' => self::GetAchievementsCountInCategory($cat), 'totalPoints' => $categoryCap, 'achievedPoints' => $points, 'percent' => WoW_Utils::GetPercent(self::GetCategoryCap($cat), min(self::GetCategoryCap($cat), self::GetAchievementsCountInCategory($cat)))); } return $progress_info; }
private static function LoadFactions() { $factions = DB::WoW()->select("SELECT `id`, `category`, `name_%s` AS `name` FROM `DBPREFIX_faction` WHERE `id` IN (%s) ORDER BY `id` DESC", WoW_Locale::GetLocale(), self::GetFactionsIDs()); if (!$factions) { WoW_Log::WriteError('%s : unable to load factions info for character %d!', __METHOD__, self::$guid); return false; } // Default categories $categories = array(1118 => array(67 => array('order' => 1, 'side' => FACTION_HORDE), 892 => array('order' => 2, 'side' => FACTION_HORDE), 469 => array('order' => 1, 'side' => FACTION_ALLIANCE), 891 => array('order' => 2, 'side' => FACTION_ALLIANCE), 169 => array('order' => 3, 'side' => -1)), 980 => array(936 => array('order' => 1, 'side' => -1)), 1097 => array(1117 => array('order' => 1, 'side' => -1), 1052 => array('order' => 2, 'side' => FACTION_HORDE), 1037 => array('order' => 2, 'side' => FACTION_ALLIANCE)), 0 => array(589 => array('order' => 1, 'side' => FACTION_ALLIANCE), 70 => array('order' => 2, 'side' => -1))); $storage = array(); foreach ($factions as $faction) { // Standing & adjusted values $standing = min(42999, self::$reputation[$faction['id']]['standing']); $type = REP_EXALTED; $rep_cap = 999; $rep_adjusted = $standing - 42000; if ($standing < REPUTATION_VALUE_HATED) { $type = REP_HATED; $rep_cap = 36000; $rep_adjusted = $standing + 42000; } elseif ($standing < REPUTATION_VALUE_HOSTILE) { $type = REP_HOSTILE; $rep_cap = 3000; $rep_adjusted = $standing + 6000; } elseif ($standing < REPUTATION_VALUE_UNFRIENDLY) { $type = REP_UNFRIENDLY; $rep_cap = 3000; $rep_adjusted = $standing + 3000; } elseif ($standing < REPUTATION_VALUE_NEUTRAL) { $type = REP_NEUTRAL; $rep_cap = 3000; $rep_adjusted = $standing; } elseif ($standing < REPUTATION_VALUE_FRIENDLY) { $type = REP_FRIENDLY; $rep_cap = 6000; $rep_adjusted = $standing - 3000; } elseif ($standing < REPUTATION_VALUE_HONORED) { $type = REP_HONORED; $rep_cap = 12000; $rep_adjusted = $standing - 9000; } elseif ($standing < REPUTATION_VALUE_REVERED) { $type = REP_REVERED; $rep_cap = 21000; $rep_adjusted = $standing - 21000; } $faction['standing'] = self::$reputation[$faction['id']]['standing']; $faction['type'] = $type; $faction['cap'] = $rep_cap; $faction['adjusted'] = $rep_adjusted; $faction['percent'] = WoW_Utils::GetPercent($rep_cap, $rep_adjusted); if (isset($categories[$faction['category']])) { if (!isset($storage[$faction['category']])) { $storage[$faction['category']] = array(); } $storage[$faction['category']][] = $faction; } else { foreach ($categories as $catId => $subcat) { if (isset($categories[$catId][$faction['category']])) { if (!isset($categories[$catId][$faction['category']])) { $categories[$catId][$faction['category']] = array(); } $storage[$catId][$faction['category']][] = $faction; } } } } self::$factions = $storage; unset($storage); return true; }
?> "><?php echo $team_member['personalRating']; ?> </span> </div> <span class="gameswon"><?php echo $team_member['gamesSeason']; ?> </span> – <span class="gameslost"><?php echo $team_member['winsSeason']; ?> </span> <span class="percentwon">(<?php echo WoW_Utils::GetPercent($team_member['gamesSeason'], $team_member['winsSeason']); ?> %)</span> </div> </div> <div class="cell-mid"> <a href="<?php echo $team->GetTeamURL(); ?> "><?php echo $team->GetTeamName(); ?> </a> <div class="rating-rank"> <span class="rating tip" data-tooltip="<?php echo WoW_Locale::GetString('template_character_team_rating');
if (isset($criteria['progressBar']) && $criteria['progressBar']) { if (!isset($criteria['maxQuantityGold'])) { // Counter $progressBar = sprintf('<div class="bar-contents">%d/ %d (%d%%)</div>', $criteria['quantity'], $criteria['maxQuantity'], round(WoW_Utils::GetPercent($criteria['maxQuantity'], $criteria['quantity']))); } else { // Money $progressBar = sprintf('<div class="bar-contents"> <span class="icon-gold">%d</span> <span class="icon-silver">%d</span> <span class="icon-copper">%d</span> </div>', $criteria['quantityGold'], $criteria['quantitySilver'], $criteria['quantityCopper']); } $criterias_list .= sprintf('<div class="profile-progress border-4%s"> <div class="bar border-4" style="width: %d%%"></div> %s </div>', $criteria['quantity'] >= $criteria['maxQuantity'] ? ' completed' : null, WoW_Utils::GetPercent($criteria['maxQuantity'], $criteria['quantity']), $progressBar); } else { if (!$list_opened) { if (isset($criteria['subAchievement'])) { $criterias_list .= '<ul class="sub-achievements">'; } else { $criterias_list .= '<ul>'; } $list_opened = true; } if (isset($criteria['achievementCriteria'])) { // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT $criterias_list .= sprintf('<li class="%s linked"> <a href="#%d:a%d" onclick="location.hash = \'%d:a%d\'; dm.openEntry(true)"> <span class="icon-frame frame-18" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg");\'></span> %s</a>
<span class="name">%s</span> </span> </li>', WoW_Locale::GetString('template_profile_no_professions')); } else { echo sprintf('<li><div class="profile-progress border-3" > <div class="bar border-3" style="width: %d%%"></div> <div class="bar-contents"><span class="profession-details"> <span class="icon"> <span class="icon-frame frame-12"> <img src="http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg" alt="" width="12" height="12" /> </span> </span> <span class="name">%s</span> <span class="value">%d</span> </span> <a href="javascript:;" data-fansite="skill|%d|%s" class="fansite-link fansite-small"> </a> </div> </div></li>', WoW_Utils::GetPercent($professions[$i]['max'], $professions[$i]['value']), $professions[$i]['icon'], $professions[$i]['name'], $professions[$i]['value'], $professions[$i]['id'], $professions[$i]['name']); } } } ?> </ul> </div> <span class="clear"><!-- --></span> </div>
<span class="icon-silver"><?php echo $money['gold'] > 0 ? $money['silver'] : '--'; ?> </span> <span class="icon-copper"><?php echo $money['gold'] > 0 ? $money['copper'] : '--'; ?> </span> </span> <?php echo WoW_Locale::GetString('template_auction_earned'); ?> </li> <li> <span class="float-right"> <?php echo WoW_Auction::GetMailsCount(); ?> /50 (<?php echo WoW_Utils::GetPercent(50, WoW_Auction::GetMailsCount()); ?> %) </span> <?php echo WoW_Locale::GetString('template_auction_mailbox'); ?> </li> </ul> </div> </div>