예제 #1
0
 public function main()
 {
     $url_data = WoW::GetUrlData('discussion');
     $blog_id = $url_data['blog_id'];
     if (!$blog_id || !WoW_Account::IsLoggedIn()) {
         if (isset($_GET['d_ref'])) {
             header('Location: ' . $_GET['d_ref']);
         } else {
             header('Location: ' . WoW::GetWoWPath() . '/');
         }
         exit;
     }
     $replyToGuid = 0;
     $replyToComment = 0;
     $postDetail = isset($_POST['detail']) ? $_POST['detail'] : null;
     if (isset($_POST['replyTo'])) {
         // have reply
         $reply = explode(':', $_POST['replyTo']);
         if (is_array($reply) && isset($reply[1])) {
             $replyToGuid = $reply[0];
             $replyToComment = $reply[1];
         }
     }
     if ($postDetail != null) {
         DB::WoW()->query("INSERT INTO `DBPREFIX_blog_comments` (blog_id, account, character_guid, realm_id, postdate, comment_text, answer_to) VALUES (%d, %d, %d, %d, %d, '%s', %d)", $blog_id, WoW_Account::GetUserID(), WoW_Account::GetActiveCharacterInfo('guid'), WoW_Account::GetActiveCharacterInfo('realmId'), time(), $postDetail, $replyToComment);
     }
     if (isset($_GET['d_ref'])) {
         header('Location: ' . $_GET['d_ref']);
     } else {
         header('Location: ' . WoW::GetWoWPath() . '/');
     }
 }
예제 #2
0
 public function main()
 {
     WoW_Template::SetPageIndex('login');
     if (WoW_Account::IsLoggedIn()) {
         header('Location: ' . WoW::GetWoWPath() . '/');
         exit;
     }
     if (isset($_POST['accountName'])) {
         $username = $_POST['accountName'];
         $password = $_POST['password'];
         $persistLogin = isset($_POST['persistLogin']) ? true : false;
         WoW_Account::DropLastErrorCode();
         if (mb_strlen($password) <= 7) {
             WoW_Account::SetLastErrorCode(ERORR_INVALID_PASSWORD_FORMAT);
         }
         if ($username == null) {
             WoW_Account::SetLastErrorCode(ERROR_EMPTY_USERNAME);
         }
         if ($password == null) {
             WoW_Account::SetLastErrorCode(ERROR_EMPTY_PASSWORD);
         }
         if (WoW_Account::PerformLogin($username, $password, $persistLogin)) {
             if (isset($_POST['ref'])) {
                 header('Location: ' . $_POST['ref']);
                 exit;
             }
             header('Location: ' . WoW::GetWoWPath() . '/');
             exit;
         }
         // Other error messages will appear automaticaly.
     }
     WoW_Template::LoadTemplate('page_login', true);
 }
예제 #3
0
 public function main()
 {
     WoW_Template::SetTemplateTheme('bn');
     WoW_Template::SetMenuIndex('index');
     WoW_Account::UserGames();
     WoW_Template::SetPageIndex('index');
     WoW_Template::LoadTemplate('page_index');
 }
예제 #4
0
 public function main()
 {
     if (!WoWConfig::$EnableBNPage && !isset($_GET['skipRedirect'])) {
         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale());
     }
     WoW_Template::SetTemplateTheme('bn');
     WoW_Template::SetMenuIndex('index');
     WoW_Account::UserGames();
     WoW_Template::SetPageIndex('index');
     WoW_Template::LoadTemplate('page_index');
 }
예제 #5
0
 public function main()
 {
     if (!isset($_POST['index']) || !WoW_Account::IsLoggedIn()) {
         WoW_Template::ErrorPage(404);
         exit;
     }
     $character_index = $_POST['index'];
     DB::WoW()->query("UPDATE `DBPREFIX_user_characters` SET `isActive` = 0 WHERE `bn_id` = %d", WoW_Account::GetUserID());
     // Clear all
     DB::WoW()->query("UPDATE `DBPREFIX_user_characters` SET `isActive` = 1 WHERE `index` = %d AND `bn_id` = %d", $character_index, WoW_Account::GetUserID());
 }
예제 #6
0
 public function main()
 {
     $url_data = WoW::GetUrlData('management');
     if (!is_array($url_data) || !isset($url_data['action1']) || $url_data['action1'] != 'management') {
         header('Location: ' . WoW::GetWoWPath() . '/account/management/');
         exit;
     }
     if (!WoW_Account::IsLoggedIn()) {
         header('Location: ' . WoW::GetWoWPath() . '/login/');
         exit;
     }
     WoW_Template::SetTemplateTheme('account');
     WoW_Account::UserGames();
     WoW_Template::SetPageIndex('management');
     WoW_Template::SetMenuIndex('management');
     WoW_Template::SetPageData('page', 'management');
     if ($url_data['action2'] == 'wow' && preg_match('/dashboard.html/i', $url_data['action3'])) {
         WoW_Account::InitializeAccount($_GET['accountName']);
         WoW_Template::SetPageIndex('dashboard');
         WoW_Template::SetMenuIndex('games');
         WoW_Template::SetPageData('page', 'dashboard');
     } elseif ($url_data['action2'] == 'wow-account-conversion.html') {
         WoW_Template::SetPageData('conversion_page', 1);
         if (isset($_POST['targetpage'])) {
             switch ($_POST['targetpage']) {
                 case '2':
                     if (isset($_POST['username']) && isset($_POST['password'])) {
                         if (WoW_Account::PerformConversionStep(1, array('username' => $_POST['username'], 'password' => $_POST['password']))) {
                             WoW_Template::SetPageData('conversion_page', 2);
                         } else {
                             WoW_Template::SetPageData('conversion_page', 1);
                         }
                     } else {
                         WoW_Template::SetPageData('conversion_page', 1);
                     }
                     break;
                 case '3':
                     WoW_Template::SetPageData('conversion_page', 3);
                     break;
                 case 'finish':
                     if (!WoW_Account::PerformConversionStep(3)) {
                         WoW_Template::SetPageData('conversion_page', 2);
                     }
                     break;
                 default:
                     break;
             }
         }
         WoW_Template::SetPageIndex('account_conversion');
         Wow_Template::SetMenuIndex('games');
         WoW_Template::SetPageData('page', 'account_conversion');
     }
     WoW_Template::LoadTemplate('page_index');
 }
예제 #7
0
 public function main()
 {
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('guild');
     $guild_error = false;
     if (!$url_data) {
         WoW_Template::ErrorPage(404);
     } elseif (!WoW_Guild::LoadGuild($url_data['name'], WoW_Utils::GetRealmIDByName($url_data['realmName']))) {
         WoW_Template::ErrorPage(404);
     } else {
         $primary = WoW_Account::GetActiveCharacter();
         WoW_Template::SetPageData('guild-authorized', false);
         if (is_array($primary) && isset($primary['realmName'])) {
             if ($primary['realmName'] == WoW_Guild::GetGuildRealmName() && $primary['guildId'] == WoW_Guild::GetGuildID()) {
                 WoW_Template::SetPageData('guild-authorized', true);
             }
         }
         switch ($url_data['action0']) {
             default:
                 WoW_Template::SetPageData('guild-page', 'summary');
                 WoW_Template::SetPageIndex('guild_page');
                 WoW_Template::SetPageData('page', 'guild_page');
                 break;
             case 'perk':
                 WoW_Template::SetPageData('guild-page', 'perks');
                 WoW_Template::SetPageIndex('guild_perks');
                 WoW_Template::SetPageData('page', 'guild_perks');
                 break;
             case 'roster':
                 switch ($url_data['action1']) {
                     default:
                         WoW_Template::SetPageIndex('guild_roster');
                         WoW_Template::SetPageData('page', 'guild_roster');
                         break;
                     case 'professions':
                         WoW_Guild::InitProfessions();
                         WoW_Template::SetPageIndex('guild_professions');
                         WoW_Template::SetPageData('page', 'guild_professions');
                         break;
                 }
                 WoW_Template::SetPageData('guild-page', 'roster');
                 break;
         }
         WoW_Template::SetPageData('guildName', $url_data['name']);
         WoW_Template::SetPageData('realmName', $url_data['realmName']);
         WoW_Template::SetMenuIndex('menu-game');
     }
     WoW_Template::LoadTemplate('page_index');
 }
예제 #8
0
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('account_status');
     WoW_Template::SetPageData('page', 'account_status');
     if (!WoW_Account::IsLoggedIn()) {
         WoW_Template::SetPageData('account-status', 'no_session');
     } elseif (WoW_Account::IsBanned()) {
         WoW_Template::SetPageData('account-status', 'no_subscribe');
     } else {
         WoW_Template::SetPageData('account-status', 'success');
     }
     WoW_Template::LoadTemplate('page_index');
 }
예제 #9
0
 public function action_guild_news()
 {
     if (!WoW_Account::IsLoggedIn()) {
         exit;
     }
     $guild_name = WoW_Account::GetActiveCharacterInfo('guildName');
     $guild_realm = WoW_Account::GetActiveCharacterInfo('realmId');
     if (!$guild_name || !$guild_realm) {
         exit;
     }
     if (!WoW_Guild::LoadGuild($guild_name, $guild_realm)) {
         exit;
     }
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::LoadTemplate('guild_news_page');
 }
예제 #10
0
 // Load char
 $character = DB::WoW()->selectRow("SELECT `guid`, `name`, `class`, `race`, `gender`, `level`, `realmName`, `url` FROM `DBPREFIX_user_characters` WHERE `guid` = %d AND `account` = %d AND `realmId` = %d", $comment['character_guid'], $comment['account'], $comment['realm_id']);
 if (!$character) {
     continue;
 }
 if ($comment['answer_to'] > 0) {
     echo '<div class="nested">';
 }
 echo sprintf('<div style="z-index: %d;" class="comment" id="c-%d">', $i, $comment['comment_id']);
 // Portrait
 echo sprintf('<div class="avatar portrait-b">
     <a href="%s">
         <img height="64" src="%s/wow/static/images/2d/avatar/%d-%d.jpg" alt="" />
     </a>
 </div>', $character['url'], WoW::GetWoWPath(), $character['race'], $character['gender']);
 if (WoW_Account::IsLoggedIn()) {
     // Karma
     echo sprintf('<div class="karma" id="k-%d">
             <div class="rate-btn-holder">
                 <a href="javascript:;" onclick="Cms.Topic.vote(%d,\'up\',1,\'comments\')" class="rateup rate-btn"><span>%s</span></a>
             </div>
             <div class="rate-btn-holder">
                 <a href="javascript:;" onclick="$(this).siblings(\'.rate-action\').show();" class="ratedown rate-btn"></a>
                 <div class="rate-action">
                     <div class="ui-dropdown">
                         <div class="dropdown-wrapper">
                             <ul>
                                 <li><a href="javascript:;" onclick="Cms.Topic.vote(%d,\'down\',1,\'comments\')">%s</a></li>
                                 <li><a href="javascript:;" onclick="Cms.Topic.vote(%d,\'down\',2,\'comments\')">%s</a></li>
                                 <li><a href="javascript:;" onclick="Cms.Topic.vote(%d,\'down\',3,\'comments\')">%s</a></li>
                                 <li><a href="javascript:;" onclick="Cms.Topic.report(%d,\'%s\',\'c-%d\')" class="report">%s</a></li>
</div>
	<div id="price-tooltip-%d" style="display: none">
		<div class="price price-tooltip">
			<span class="float-right">
			<span class="icon-gold">%d</span>
			<span class="icon-silver">%d</span>
			<span class="icon-copper">%d</span>
</span>
			%s
				<br /><span class="float-right">
			<span class="icon-gold">%d</span>
			<span class="icon-silver">%d</span>
			<span class="icon-copper">%d</span>
</span>
				%s
	<span class="clear"><!-- --></span>
		</div>
	</div>
											</td>
											<td class="options">
												<a href="browse?itemId=%d" class="ah-button">%s</a>
												<a href="javascript:;" class="ah-button" onclick="Auction.openCancel(%d);">%s</a>
											</td>
										</tr>', $item['auction_id'], $toggleStyle % 2 ? '1' : '2', $item['name'], WoW::GetWoWPath(), $item['id'], $item['id'], $item['guid'], $item['icon'], WoW::GetWoWPath(), $item['id'], $item['id'], $item['guid'], $item['quality'], $item['name'], WoW_Account::GetActiveCharacterInfo('url'), WoW_Account::GetActiveCharacterInfo('name'), WoW_Locale::GetString('template_auction_you_are_the_seller'), WoW::GetWoWPath(), $item['count'], $item['time'], WoW_Locale::GetString('template_auction_title_time_' . $item['time']), WoW_Locale::GetString('template_auction_text_time_' . $item['time']), WoW_Locale::GetString('template_auction_no_bids'), $item['price_raw'], $item['auction_id'], $item['price']['gold'], $item['price']['silver'], $item['price']['copper'], $item['buyout']['gold'], $item['buyout']['silver'], $item['buyout']['copper'], $item['auction_id'], $item['price']['gold'], $item['price']['silver'], $item['price']['copper'], WoW_Locale::GetString('template_auction_price_per_unit'), $item['buyout']['gold'], $item['buyout']['silver'], $item['buyout']['copper'], WoW_Locale::GetString('template_auction_buyout_per_unit'), $item['id'], WoW_Locale::GetString('template_auction_browse'), $item['auction_id'], WoW_Locale::GetString('template_blog_cancel_report'));
        ++$toggleStyle;
    }
}
?>
							</tbody>
						</table>
					</div>
</div>
<p class="new-account border-5">
<span class="headline"><?php 
echo WoW_Account::GetUserName();
?>
</span>
</p>
</div>
<p><?php 
echo WoW_Locale::GetString('template_account_conversion_details_header');
?>
</p>
<div class="conversion-details">
<ul>
<?php 
echo sprintf(WoW_Locale::GetString('template_account_conversion_details_list'), WoW_Account::GetUserName());
?>
</ul>
</div>
<form method="post" action="<?php 
echo WoW::GetWoWPath();
?>
/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 
예제 #13
0
<?php

WoW_Template::LoadTemplate('block_header');
?>
<body class="<?php 
echo sprintf('%s%s', WoW_Locale::GetLocale(LOCALE_DOUBLE), WoW_Account::IsLoggedIn() ? ' logged-in' : null);
?>
">
<div id="layout-top">
<div class="wrapper">
<div id="header">
<div id="search-bar">
<form action="<?php 
echo WoW::GetWoWPath();
?>
/search" method="get" id="search-form">
<div>
<input type="text" name="q" id="search-field" value="<?php 
echo WoW_Locale::GetString('template_bn_search');
?>
" maxlength="35" alt="<?php 
echo WoW_Locale::GetString('template_bn_search');
?>
" tabindex="50" accesskey="q" />
<input type="submit" id="search-button" value="" title="<?php 
echo WoW_Locale::GetString('template_bn_search');
?>
" tabindex="50" />
</div>
</form>
</div>
예제 #14
0
 public function main()
 {
     $url_data = WoW::GetUrlData('vault');
     // Check session
     if ($url_data['action0'] != 'vault') {
         // Wrong URL parsing
         header('Location: ' . WoW::GetWoWPath() . '/wow/');
         exit;
     }
     if (!WoW_Account::IsLoggedIn()) {
         header('Location: ' . WoW::GetWoWPath() . '/login/?ref=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     WoW_Template::SetTemplateTheme('wow');
     switch ($url_data['action1']) {
         case 'character':
             switch ($url_data['action2']) {
                 case 'auction':
                     $auction_side = $url_data['action3'];
                     if (!$auction_side || !in_array($auction_side, array('alliance', 'horde', 'neutral'))) {
                         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale() . '/vault/character/auction/' . WoW_Account::GetActiveCharacterInfo('faction_text'));
                     }
                     // Check active character
                     if (WoW_Account::GetActiveCharacterInfo('guid') == 0) {
                         WoW::RedirectTo();
                     }
                     switch ($url_data['action4']) {
                         default:
                             WoW_Template::SetPageData('auction_side', $auction_side);
                             WoW_Template::SetPageIndex('auction_lots');
                             WoW_Template::SetPageData('page', 'auction_lots');
                             break;
                         case 'cancel':
                             // Cancelling, adding, etc. requires core support!
                             if (!isset($_POST['auc'])) {
                                 exit;
                             }
                             $auction_id = (int) $_POST['auc'];
                             header('Content-type: text/plain');
                             echo WoW_Auction::CancelAuction($auction_id);
                             exit;
                             /*
                             if(isset($_POST['auc'])) {
                                 $auction_id = (int) $_POST['auc'];
                                 // WoW REMOTE FEATURE
                             }
                             file_put_contents('cancel.txt', print_r($_POST, true));
                             exit;
                             */
                             break;
                     }
                     break;
                 default:
                     WoW_Template::ErrorPage(404);
                     break;
             }
             break;
         default:
             WoW_Template::ErrorPage(404);
             break;
     }
     WoW_Template::LoadTemplate('page_index');
 }
 public static function GetPageTitle()
 {
     switch (WoW_Template::GetPageIndex()) {
         case 'character_profile_simple':
         case 'character_profile_advanced':
             return sprintf('%s @ %s - %s - ', WoW_Characters::GetName(), WoW_Characters::GetRealmName(), WoW_Locale::GetString('template_menu_game'));
         case 'character_talents':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_talents'), WoW_Locale::GetString('template_menu_game'));
         case 'character_achievements':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_achievements'), WoW_Locale::GetString('template_menu_game'));
         case 'character_reputation':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_reputation'), WoW_Locale::GetString('template_menu_game'));
         case 'character_statistics':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_statistics'), WoW_Locale::GetString('template_menu_game'));
         case 'character_pvp':
             return sprintf('PvP - %s - ', WoW_Locale::GetString('template_menu_game'));
         case 'character_feed':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_character_feed'), WoW_Locale::GetString('template_menu_game'));
         case 'item':
             return sprintf('%s - ', WoW_Template::GetPageData('itemName'));
         case 'item_list':
             return sprintf('%s - ', WoW_Template::GetPageData('last-crumb'));
         case 'guild_page':
             return sprintf('%s @ %s - ', WoW_Guild::GetGuildName(), WoW_Guild::GetGuildRealmName());
         case 'guild_perks':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_guild_menu_perks'), WoW_Locale::GetString('template_menu_game'));
         case 'guild_roster':
         case 'guild_professions':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_guild_menu_roster'), WoW_Locale::GetString('template_menu_game'));
         case 'search':
             return WoW_Search::GetSearchQuery() != null ? sprintf('%s - %s - ', WoW_Search::GetSearchQuery(), WoW_Locale::GetString('template_search')) : sprintf('%s - ', WoW_Locale::GetString('template_search'));
         case 'realm_status':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_realm_status'), WoW_Locale::GetString('template_menu_game'));
         case 'blog':
             return sprintf('%s - ', WoW_Template::GetPageData('blog_title'));
         case 'game':
             return sprintf('%s - ', WoW_Locale::GetString('template_menu_game'));
         case 'game_guide_what_is_wow':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_what_is_wow'), WoW_Locale::GetString('template_menu_game'));
         case 'game_guide_getting_started':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_getting_started'), WoW_Locale::GetString('template_menu_game'));
         case 'game_guide_how_to_play':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_how_to_play'), WoW_Locale::GetString('template_menu_game'));
         case 'game_guide_playing_together':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_playing_together'), WoW_Locale::GetString('template_menu_game'));
         case 'game_guide_late_game':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_late_game'), WoW_Locale::GetString('template_menu_game'));
         case 'game_race_index':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_game_race_index'), WoW_Locale::GetString('template_menu_game'));
         case 'game_race':
             return sprintf('%s - %s - ', WoW_Locale::GetString('character_race_' . WoW_Template::GetPageData('raceId')), WoW_Locale::GetString('template_menu_game'));
         case 'game_class_index':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_game_class_index'), WoW_Locale::GetString('template_menu_game'));
         case 'game_class':
             return sprintf('%s - %s - ', WoW_Locale::GetString('character_class_' . WoW_Template::GetPageData('classId')), WoW_Locale::GetString('template_menu_game'));
         case 'password_reset':
             return sprintf('%s - Battle.Net', WoW_Locale::GetString('login_help_title'));
         case 'password_reset_select':
         case 'password_reset_secred_answer':
         case 'password_reset_success':
         case 'password_reset_confirm':
         case 'password_reset_changed':
             return sprintf('%s - Battle.Net', WoW_Locale::GetString('template_account_password_reset_title'));
         case 'dashboard':
             return sprintf('%s - Battle.Net', WoW_Locale::GetString('expansion_' . WoW_Account::GetExpansion()));
         case 'landing':
             switch (WoW_Template::GetPageData('landing')) {
                 case 'what_is':
                     return sprintf('%s - Battle.Net', WoW_Locale::GetString('template_bn_what_is_it_title'));
             }
             break;
         case 'creation_tos':
         case 'creation_success':
         case 'account_conversion':
         case 'management':
             return WoW_Locale::GetString('template_management_main_title');
             //[PH]
         //[PH]
         case 'auction_lots':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_auction_menu_lots'), WoW_Locale::GetString('template_menu_game'));
         case 'forum_index':
             return sprintf('%s - ', WoW_Locale::GetString('template_menu_forums'));
         case 'forum_category':
             return sprintf('%s - %s - ', WoW_Template::GetPageData('forum_category_title'), WoW_Locale::GetString('template_menu_forums'));
         case 'forum_thread':
             return sprintf('%s - %s - ', WoW_Template::GetPageData('forum_thread_title'), WoW_Locale::GetString('template_menu_forums'));
         case 'forum_blizztracker':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_blizztracker_title'), WoW_Locale::GetString('template_menu_forums'));
         case 'zones':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_game_dungeons_and_raids'), WoW_Locale::GetString('template_menu_game'));
         case 'zone':
             return sprintf('%s - %s - ', WoW_Template::GetPageData('zone_name'), WoW_Locale::GetString('template_menu_game'));
         case 'pvp_arena':
             return sprintf('PvP - %s - ', WoW_Locale::GetString('template_menu_game'));
         case 'character_companions_mounts':
             return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_' . WoW_Template::GetPageData('category') . 's'), WoW_Locale::GetString('template_menu_game'));
         case 'shop':
             return sprintf('%s - ', WoW_Locale::GetString('template_shop_title'));
         default:
             return '';
     }
 }
                        </div>
                        <a href="<?php 
    echo $character_url;
    ?>
" class="context-link color-c<?php 
    echo WoW_Account::GetActiveCharacterInfo('class');
    ?>
" rel="np"><?php 
    echo WoW_Account::GetActiveCharacterInfo('name');
    ?>
</a>
                      </div> 
                      <div class="userCharacter">
                        <div class="character-desc">
                          <span><?php 
    echo WoW_Account::GetActiveCharacterInfo('level') . ' ' . WoW_Account::GetActiveCharacterInfo('race_text') . ' ' . WoW_Account::GetActiveCharacterInfo('class_text');
    ?>
</span>
                        </div>
                        <div class="guild">
                          <a href="<?php 
    echo $guild_url;
    ?>
"><?php 
    echo $character['guildName'];
    ?>
</a>
                        </div>
                        <!--<div class="achievements">460</div>-->
                      </div>
                    </div>
예제 #17
0
 public static function CatchOperations(&$loaded)
 {
     // Perform log in (if required)
     if (isset($_GET['login']) || preg_match('/\\?login/', $_SERVER['REQUEST_URI'])) {
         // $_SERVER['REQUEST_URI'] check is required for mod_rewrited URL cases.
         header('Location: ' . WoW::GetWoWPath() . '/login/');
         exit;
     }
     // Perform logout (if required)
     if (isset($_GET['logout']) || preg_match('/\\?logout/', $_SERVER['REQUEST_URI'])) {
         // $_SERVER['REQUEST_URI'] check is required for mod_rewrited URL cases.
         WoW_Account::PerformLogout();
         header('Location: ' . WoW::GetWoWPath() . '/');
         exit;
     }
     // Locale
     if (isset($_GET['locale']) && !preg_match('/lookup/', $_SERVER['REQUEST_URI'])) {
         if (WoW_Locale::IsLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']))) {
             WoW_Locale::SetLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']));
             $loaded = true;
             setcookie('wow_locale', WoW_Locale::GetLocale(), strtotime('NEXT YEAR'), '/');
             if (isset($_SERVER['HTTP_REFERER'])) {
                 header('Location: ' . $_SERVER['HTTP_REFERER']);
                 exit;
             } else {
                 header('Location: ' . WoW::GetWoWPath() . '/');
                 exit;
             }
         }
     }
 }
예제 #18
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']);
 }
<ul class="service-bar">
			<li class="service-cell service-home"><a href="<?php 
echo WoW::GetWoWPath();
?>
/" tabindex="50" accesskey="1" title="Battle.net"> </a></li>
				<li class="service-cell service-welcome">
					<?php 
if (WoW_Account::IsLoggedIn()) {
    echo sprintf(WoW_Locale::GetString('template_servicebar_welcome_caption'), WoW_Account::GetFirstName());
} else {
    echo WoW_Locale::GetString('template_servicebar_auth_caption');
}
?>
				</li>
			<li class="service-cell service-account"><a href="<?php 
echo WoW::GetWoWPath();
?>
/account/management/?lnk=1" class="service-link" tabindex="50" accesskey="3"><?php 
echo WoW_Locale::GetString('template_servicebar_account');
?>
</a></li>
				<li class="service-cell service-support"><a href="http://eu.blizzard.com/support/" class="service-link" tabindex="50" accesskey="4"><?php 
echo WoW_Locale::GetString('template_servicebar_support');
?>
</a></li>

			<li class="service-cell service-explore">
				<a href="#explore" tabindex="50" accesskey="5" class="dropdown" id="explore-link" onclick="return false" style="cursor: progress" rel="javascript"><?php 
echo WoW_Locale::GetString('template_servicebar_explore');
?>
</a>
예제 #20
0
<!-- Start: Sidebar -->
<?php 
$sidebar_data = "'sotd', 'forums'";
if (WoW_Account::IsLoggedIn() && WoW_Account::IsHaveActiveCharacter()) {
    $sidebar_data = "'auctions','guild-news','friends','forums','sotd'";
    ?>

<div class="sidebar-module" id="sidebar-auctions">
    <div class="sidebar-title">
        <h3 class="title-auctions"><?php 
    echo WoW_Locale::GetString('template_auction_auction');
    ?>
</h3>
    </div>
    <div class="sidebar-content loading"></div>
</div>

<div class="sidebar-module" id="sidebar-guild-news">
    <div class="sidebar-title">
        <h3 class="title-guild-news"><?php 
    echo WoW_Locale::GetString('template_guild_news_sidebar');
    ?>
</h3>
    </div>
    <div class="sidebar-content loading"></div>
</div>

<div class="sidebar-module" id="sidebar-friends">
    <div class="sidebar-title">
        <h3 class="title-friends"><?php 
    echo WoW_Locale::GetString('template_character_friends_sidebar');
예제 #21
0
 public function LoadFromDBByEntry($item_guid, $item_template)
 {
     $item_data = array('item' => $item_guid, 'slot' => 0, 'item_template' => $item_template, 'bag' => 0, 'enchants' => array());
     $this->LoadFromDB($item_data, WoW_Account::GetActiveCharacterInfo('guid'));
 }
				<div class="char-wrapper scrollbar-wrapper" id="scroll">
					<div class="scrollbar">
						<div class="track"><div class="thumb"></div></div>
					</div>

					<div class="viewport">
						<div class="overview">
                                    <?php 
echo sprintf('<a href="javascript:;" class="color-c%d pinned" rel="np" data-tooltip="%s %s (%s)">
										<img src="%s/wow/static/images/icons/race/%d-%d.gif" alt="" />
										<img src="%s/wow/static/images/icons/class/%d.gif" alt="" />
										%d %s
									</a>', WoW_Account::GetActiveCharacterInfo('class'), WoW_Account::GetActiveCharacterInfo('race_text'), WoW_Account::GetActiveCharacterInfo('class_text'), WoW_Account::GetActiveCharacterInfo('realmName'), WoW::GetWoWPath(), WoW_Account::GetActiveCharacterInfo('race'), WoW_Account::GetActiveCharacterInfo('gender'), WoW::GetWoWPath(), WoW_Account::GetActiveCharacterInfo('class'), WoW_Account::GetActiveCharacterInfo('level'), WoW_Account::GetActiveCharacterInfo('name'));
if (is_array($characters)) {
    foreach ($characters as $char) {
        if ($char['guid'] == WoW_Account::GetActiveCharacterInfo('guid') && $char['realmId'] == WoW_Account::GetActiveCharacterInfo('realmId')) {
            continue;
            // Skip active character
        }
        echo sprintf('<a href="%s" class="color-c%d" rel="np" onclick="CharSelect.pin(%d, this); return false;" data-tooltip="%s %s (%s)">
										<img src="%s/wow/static/images/icons/race/%d-%d.gif" alt="" />
										<img src="%s/wow/static/images/icons/class/%d.gif" alt="" />
										%d %s
									</a>', $char['url'], $char['class'], $char['index'], $char['race_text'], $char['class_text'], $char['realmName'], WoW::GetWoWPath(), $char['race'], $char['gender'], WoW::GetWoWPath(), $char['class'], $char['level'], $char['name']);
    }
}
?>
							<div class="no-results hide"><?php 
echo WoW_Locale::GetString('template_characters_not_found');
?>
</div>
예제 #23
0
	<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>
예제 #24
0
 /**
  * Initializes account for dashboard page
  * 
  * @access   public
  * @static   WoW_Account::InitializeAccount($accountName)
  * @param    string $accountName
  * @category Account Manager Class
  * @return   void
  **/
 public static function InitializeAccount($accountName)
 {
     if (array_key_exists(strtolower($accountName), self::$gameAccountData)) {
         $accountData = DB::Realm()->selectRow("SELECT * FROM `account` WHERE `username` = '%s'", $accountName);
         if (!$accountData) {
             header('Location: ' . WoW::GetWoWPath() . '/account/management/');
             exit;
         }
         self::$dashboard_account = $accountData;
         if (DB::Realm()->selectCell("SELECT 1 FROM `account_banned` WHERE `id` = %d AND `active` = 1", self::$dashboard_account['id'])) {
             self::$dashboard_account['banned'] = true;
         } else {
             self::$dashboard_account['banned'] = false;
         }
     } else {
         header('Location: ' . WoW::GetWoWPath() . '/account/management/');
         exit;
     }
 }
<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>
예제 #26
0
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
    <?php 
if (WoW_Account::IsLoggedIn()) {
    echo '<script>parent.postMessage("{\\"action\\":\\"success\\",\\"loginTicket\\":\\"' . WoW_Account::GetSessionInfo('wow_account_hash') . '\\"}", "http://' . $_SERVER['HTTP_HOST'] . WoW::GetWoWPath() . '/");</script>';
} else {
    WoW_Template::LoadTemplate('block_login_frag', true);
}
?>
</head>
</html>
예제 #27
0
<![endif]-->
<script type="text/javascript">
//<![CDATA[
Core.staticUrl = '<?php 
echo WoW::GetWoWPath();
?>
/static';
Core.baseUrl = '';
Core.project = 'root';
Core.locale = '<?php 
echo WoW_Locale::GetLocale(LOCALE_DOUBLE);
?>
';
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';
//]]>
    }
}
?>
</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>
예제 #29
0
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetMenuIndex('menu-forums');
     $url_data = WoW::GetUrlData('forum');
     $page = isset($_GET['page']) && preg_match('/([0-9]+)/i', $_GET['page']) ? $_GET['page'] : 1;
     WoW_Template::SetPageData('current_page', $page);
     // Clear category/thread values
     WoW_Forums::SetCategoryId(0);
     WoW_Forums::SetThreadId(0);
     // Check preview
     if (isset($url_data['action4'], $url_data['action5'], $url_data['action6']) && $url_data['action4'] . $url_data['action5'] . $url_data['action6'] == 'topicpostpreview') {
         $post_text = isset($_POST['post']) ? $_POST['post'] : null;
         if ($post_text == null) {
             //This can not be here, it causes error when preview blank post text
             //WoW_Template::ErrorPage(500);
         }
         // Convert BB codes to HTML
         WoW_Forums::BBCodesToHTML($post_text);
         // Output json
         header('Content-type: text/json');
         echo '{"detail":"' . $post_text . '"}';
         exit;
     }
     // Set values (if any)
     if ($url_data['category_id'] > 0) {
         if (!WoW_Forums::SetCategoryId($url_data['category_id'])) {
             WoW_Template::ErrorPage(404);
             exit;
         }
         if (isset($url_data['action5']) && $url_data['action5'] == 'topic' && WoW_Account::IsHaveActiveCharacter()) {
             // Check $_POST query
             if (isset($_POST['xstoken'])) {
                 $post_allowed = true;
                 $required_post_fields = array('xstoken', 'sessionPersist', 'subject', 'postCommand_detail');
                 foreach ($required_post_fields as $field) {
                     if (!isset($_POST[$field])) {
                         $post_allowed = false;
                     }
                 }
                 if ($post_allowed) {
                     $post_info = WoW_Forums::AddNewThread($url_data['category_id'], $_POST, false);
                     if (is_array($post_info)) {
                         header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/forum/topic/' . $post_info['thread_id']);
                         exit;
                     }
                 }
             }
             // Topic create
             WoW_Template::SetPageIndex('forum_new_topic');
             WoW_Template::SetPageData('page', 'forum_new_topic');
         } else {
             WoW_Template::SetPageIndex('forum_category');
             WoW_Template::SetPageData('page', 'forum_category');
         }
     } elseif ($url_data['thread_id'] > 0) {
         if (!WoW_Forums::SetThreadId($url_data['thread_id'])) {
             WoW_Template::ErrorPage(404);
             exit;
         }
         if (isset($url_data['action4']) && $url_data['action4'] == 'topic' && preg_match('/([0-9]+)/i', $url_data['action5']) && WoW_Account::IsHaveActiveCharacter()) {
             // Check $_POST query
             if (isset($_POST['xstoken'])) {
                 $post_allowed = true;
                 $required_post_fields = array('xstoken', 'sessionPersist', 'detail');
                 foreach ($required_post_fields as $field) {
                     if (!isset($_POST[$field])) {
                         $post_allowed = false;
                     }
                 }
                 if ($post_allowed) {
                     $post_info = WoW_Forums::AddNewPost(null, $url_data['thread_id'], $_POST);
                     if (is_array($post_info)) {
                         header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/forum/topic/' . $url_data['thread_id']);
                         exit;
                     }
                 }
             }
         }
         WoW_Template::SetPageIndex('forum_thread');
         WoW_Template::SetPageData('page', 'forum_thread');
     } elseif (isset($url_data['action4']) && $url_data['action4'] == 'topic' && isset($url_data['action5']) && $url_data['action5'] == 'post' && isset($url_data['action6']) && preg_match('/([0-9]+)/i', $url_data['action6'])) {
         if (isset($url_data['action7']) && WoW_Account::IsHaveActiveCharacter()) {
             switch ($url_data['action7']) {
                 case 'frag':
                     $Quote = WoW_Forums::QuotePost($url_data['action6']);
                     header('Content-type: text/json');
                     echo '{"detail":"' . $Quote['message'] . '","name":"' . $Quote['name'] . '"}';
                     exit;
                     break;
                 case 'edit':
                     if (isset($_POST['xstoken'])) {
                         $post_allowed = true;
                         $required_post_fields = array('xstoken', 'sessionPersist', 'postCommand_detail');
                         foreach ($required_post_fields as $field) {
                             if (!isset($_POST[$field])) {
                                 $post_allowed = false;
                             }
                         }
                         if ($post_allowed) {
                             $thread_id = WoW_Forums::EditPost($url_data['action6'], $_POST);
                             if ($thread_id) {
                                 header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/forum/topic/' . $thread_id);
                                 exit;
                             }
                         }
                     }
                     if ($post = WoW_Forums::GetPost($url_data['action6'])) {
                         if (!WoW_Forums::SetThreadId($post['thread_id'])) {
                             WoW_Template::ErrorPage(404);
                             exit;
                         }
                         WoW_Template::SetPageData('edit_text', $post['message']);
                         WoW_Template::SetPageIndex('forum_edit_post');
                         WoW_Template::SetPageData('page', 'forum_edit_post');
                     }
                     break;
             }
         }
     } elseif ($url_data['action4'] == 'blizztracker') {
         // Set Blizz tracker as active
         WoW_Forums::SetBlizzTrackerActive();
         // Init Blizz tracker!
         WoW_Forums::InitBlizzTracker(false, $page);
         WoW_Template::SetPageIndex('forum_blizztracker');
         WoW_Template::SetPageData('page', 'forum_blizztracker');
     } else {
         // Init Blizz tracker!
         WoW_Forums::InitBlizzTracker(true);
         WoW_Template::SetPageIndex('forum_index');
         WoW_Template::SetPageData('page', 'forum_index');
         WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE) . ' station-home');
     }
     // Init the forums!
     WoW_Forums::InitForums($page);
     WoW_Template::SetPageData('forum_category_title', WoW_Forums::GetCategoryTitle());
     WoW_Template::SetPageData('forum_thread_title', WoW_Forums::GetThreadTitle());
     WoW_Template::LoadTemplate('page_index');
 }
<div id="layout-middle">
  <div class="wrapper">
    <div id="content">
		<?php 
if (WoW_Account::GetLastErrorCode() != ERROR_NONE) {
    echo '<div class="alert error closeable border-4 glow-shadow">
		<div class="alert-inner">
		<div class="alert-message">
		<p class="title"><strong>' . WoW_Locale::GetString('template_account_password_reset_error') . '</strong></p>
		';
    $error_code = WoW_Account::GetLastErrorCode();
    if ($error_code & ERORR_NEW_PASSWORD_NOT_MATCH) {
        echo '<p class="error.pass.notmatch">' . WoW_Locale::GetString('template_account_password_error_pass_not_match') . '</p>';
    } elseif ($error_code & ERORR_NEW_PASSWORD_FAIL) {
        echo '<p class="error"></p>';
    }
    echo '
		</div>
		</div>
		<a class="alert-close" href="#" onclick="$(this).parent().fadeOut(250, function() { $(this).css({opacity:0}).animate({height: 0}, 100, function() { $(this).remove(); }); }); return false;">' . WoW_Locale::GetString('template_account_password_reset_error_close') . '</a>
		<span class="clear"><!-- --></span>
		</div>';
}
?>
  
      <div id="page-header">
        <span class="float-right"><span class="form-req">*</span><?php 
echo WoW_Locale::GetString('template_account_password_reset_required_fields');
?>
</span>
        <h2 class="subcategory"><?php