예제 #1
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);
 }
예제 #2
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() . '/');
     }
 }
예제 #3
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');
 }
예제 #4
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());
 }
예제 #5
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');
 }
예제 #6
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');
 }
예제 #7
0
 public static function InitAuction()
 {
     if (!WoW_Account::IsLoggedIn()) {
         return false;
     }
     self::$active_guid = WoW_Account::GetActiveCharacterInfo('guid');
     if (self::$active_guid == 0) {
         return false;
     }
     self::$active_realm = WoW_Account::GetActiveCharacterInfo('realmId');
     self::$auction_initialized = true;
     DB::ConnectToDB(DB_CHARACTERS, self::$active_realm);
     self::$money_amount = DB::Characters()->selectCell("SELECT `money` FROM `characters` WHERE `guid` = %d", self::$active_guid);
     self::$won_money_amount = 0;
     self::LoadMyAuctions();
     self::LoadAuctionMails();
     self::HandleAuctionData();
     self::HandleSellingItems();
 }
<?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>
예제 #9
0
 public function main()
 {
     $url_data = WoW::GetUrlData('management');
     if (!is_array($url_data) || !isset($url_data['action1'])) {
         header('Location: ' . WoW::GetWoWPath() . '/account/management/');
         exit;
     }
     if ($url_data['action1'] == 'creation') {
         include CONTROLLERS_DIR . 'account' . DS . 'creation.php';
         $controller = new Creation($this->m_actions, 'account');
         $controller->main();
         exit;
     }
     if (!WoW_Account::IsLoggedIn()) {
         if ($url_data['action1'] == 'support') {
             WoW_Template::SetTemplateTheme('account');
             switch ($url_data['action2']) {
                 default:
                 case 'password-reset.html':
                     WoW_Template::SetPageIndex('password_reset');
                     WoW_Template::SetPageData('page', 'password_reset');
                     break;
                 case 'password-reset-select.html':
                     if (isset($_POST['csrftoken'])) {
                         $user_data = array('email' => $_POST['email'], 'username' => $_POST['firstName']);
                         WoW_Account::DropLastErrorCode();
                         if (WoW_Account::RecoverPasswordSelect($user_data)) {
                             $_SESSION['wow_password_recovery'] = WoW_Account::GetRecoverPasswordData();
                             WoW_Template::SetPageIndex('password_reset_select');
                             WoW_Template::SetPageData('page', 'password_reset_select');
                         } else {
                             WoW_Account::SetLastErrorCode(ERORR_INVALID_PASSWORD_RECOVERY_COMBINATION);
                             WoW_Template::SetPageIndex('password_reset');
                             WoW_Template::SetPageData('page', 'password_reset');
                         }
                     }
                     break;
                 case 'password-reset-secred-answer.html':
                     WoW_Account::SetRecoverPasswordData($_SESSION['wow_password_recovery']);
                     if (isset($_POST['verificationMethod']) && $_POST['verificationMethod'] == 'SECURITY_QUESTION') {
                         WoW_Template::SetPageIndex('password_reset_secred_answer');
                         WoW_Template::SetPageData('page', 'password_reset_secred_answer');
                     } else {
                         WoW_Template::SetPageIndex('password_reset_select');
                         WoW_Template::SetPageData('page', 'password_reset_select');
                     }
                     break;
                 case 'password-reset-success.html':
                     WoW_Account::SetRecoverPasswordData($_SESSION['wow_password_recovery']);
                     if (isset($_POST['secretAnswer'])) {
                         WoW_Account::DropLastErrorCode();
                         if (WoW_Account::RecoverPasswordSuccess($_POST['secretAnswer'])) {
                             WoW_Template::SetPageIndex('password_reset_success');
                             WoW_Template::SetPageData('page', 'password_reset_success');
                         } else {
                             WoW_Account::SetLastErrorCode(ERORR_INVALID_PASSWORD_RECOVERY_ANSWER);
                             WoW_Template::SetPageIndex('password_reset_secred_answer');
                             WoW_Template::SetPageData('page', 'password_reset_secred_answer');
                         }
                     }
                     break;
                 case 'password-reset-confirm.xml':
                     if (isset($_POST['email']) && isset($_POST['ticket'])) {
                         $data = array('newPassword' => $_POST['newPassword'], 'reNewPassword' => $_POST['reNewPassword']);
                         WoW_Account::DropLastErrorCode();
                         if ($data['newPassword'] != $data['reNewPassword']) {
                             WoW_Account::SetLastErrorCode(ERORR_NEW_PASSWORD_NOT_MATCH);
                             WoW_Template::SetPageIndex('password_reset_confirm');
                             WoW_Template::SetPageData('page', 'password_reset_confirm');
                         } elseif (WoW_Account::RecoverPasswordChange($data['newPassword'])) {
                             WoW_Template::SetPageIndex('password_reset_changed');
                             WoW_Template::SetPageData('page', 'password_reset_confirm');
                         } else {
                             WoW_Account::SetLastErrorCode(ERORR_NEW_PASSWORD_FAIL);
                             WoW_Template::SetPageIndex('password_reset_confirm');
                             WoW_Template::SetPageData('page', 'password_reset_confirm');
                         }
                     }
                     break;
             }
             if (preg_match('/password-reset-confirm.xml\\?ticket=([a-z0-9A-Z]{32})$/i', $url_data['action2'], $matches)) {
                 if (WoW_Account::validTicket($matches[1])) {
                     WoW_Template::SetPageIndex('password_reset_confirm');
                     WoW_Template::SetPageData('page', 'password_reset_confirm');
                 }
             }
             WoW_Template::LoadTemplate('support_index');
             exit;
         } else {
             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');
         WoW_Template::LoadTemplate('page_index');
     } 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');
     }
     WoW_Template::LoadTemplate('page_index');
 }
예제 #10
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';
//]]>
예제 #11
0
// Try to catch some operations (login, logout, etc.)
$locale_loaded = false;
WoW::CatchOperations($locale_loaded);
// locale from page controller
$wow_locale_cms = isset($_COOKIE['wow_locale']) ? $_COOKIE['wow_locale'] : WoWConfig::$DefaultLocale;
if (!isset($_COOKIE['wow_locale'])) {
    setcookie('wow_locale', $wow_locale_cms, strtotime('NEXT YEAR'), '/');
    $_COOKIE['wow_locale'] = $wow_locale_cms;
}
$pController = new PageController();
if ($pController->GetLocale() != null && $pController->GetLocale() != $_COOKIE['wow_locale']) {
    //$_SESSION['wow_locale'] = $pController->GetLocale();
    WoW_Locale::SetLocale($pController->GetLocale(), WoW_Locale::GetLocaleIDForLocale($pController->GetLocale()), true);
} else {
    WoW_Locale::SetLocale($_COOKIE['wow_locale'], WoW_Locale::GetLocaleIDForLocale($_COOKIE['wow_locale']));
}
// Initialize account (if user already logged in we need to re-build his info from session data)
WoW_Account::Initialize();
if (isset($_COOKIE['wow_session']) && !WoW_Account::IsLoggedIn()) {
    WoW_Account::loadFromCookieSession();
}
// Initialize auction handler
WoW_Auction::InitAuction();
// TODO: this initialization should be moved in some other place.
// Display wow revision (if required; do not remove).
if (isset($_GET['_DISPLAYVERSION_'])) {
    die('WOW_REVISION: ' . WOW_REVISION);
}
// RunOnce
define('__RUNONCE__', true);
include INCLUDES_DIR . 'RunOnce.php';
예제 #12
0
 public function main()
 {
     $url_data = WoW::GetUrlData('management');
     if (!is_array($url_data) || !isset($url_data['action1']) || $url_data['action1'] != 'creation') {
         header('Location: ' . WoW::GetWoWPath() . '/account/creation/tos.html');
         exit;
     }
     WoW_Template::SetTemplateTheme('account');
     if ($url_data['action2'] == 'wow' && $url_data['action3'] == 'signup') {
         if (!WoW_Account::IsLoggedIn()) {
             header('Location: ' . WoW::GetWoWPath() . '/login/?ref=' . urlencode('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']));
             exit;
         }
         if (isset($_POST['emailAddress'])) {
             $account_data = array('username' => $_POST['emailAddress'], 'sha' => sha1(strtoupper($_POST['emailAddress']) . ':' . strtoupper($_POST['password'])));
             if (WoW_Account::RegisterGameAccount($account_data)) {
                 header('Location: ' . WoW::GetWoWPath() . '/account/management/wow/dashboard.html?accountName=' . $account_data['username']);
                 exit;
             }
         }
         WoW_Template::LoadTemplate('creation_wow');
         exit;
     }
     if (preg_match('/tos.html/i', $url_data['action2'])) {
         WoW_Template::SetPageIndex('creation_tos');
         WoW_Template::SetPageData('page', 'creation_tos');
         if (isset($_POST['csrftoken'])) {
             $registration_allowed = true;
             $required_post_fields = array('firstname', 'lastname', array('emailAddress', 'emailAddressConfirmation'), array('password', 'rePassword'), 'gender', 'question1', 'answer1', 'dobDay', 'dobMonth', 'dobYear', 'country');
             // Check POST fields
             foreach ($required_post_fields as $field) {
                 if (is_array($field)) {
                     if (!isset($_POST[$field[0]], $_POST[$field[1]])) {
                         $registration_allowed = false;
                         WoW_Template::SetPageData('account_creation_error_msg', WoW_Locale::GetString('template_account_creation_error_fields'));
                     }
                     if ($_POST[$field[0]] != $_POST[$field[1]] || empty($_POST[$field[0]]) || empty($_POST[$field[1]])) {
                         $registration_allowed = false;
                         WoW_Template::SetPageData('account_creation_error_msg', WoW_Locale::GetString('template_account_creation_error_fields'));
                     }
                 } else {
                     if (!isset($_POST[$field]) || $_POST[$field] == null) {
                         $registration_allowed = false;
                         WoW_Template::SetPageData('account_creation_error_msg', WoW_Locale::GetString('template_account_creation_error_fields'));
                     }
                 }
             }
             if ($registration_allowed) {
                 // Generate user data
                 $user_data = array('first_name' => $_POST['firstname'], 'last_name' => $_POST['lastname'], 'password' => $_POST['password'], 'sha' => sha1(strtoupper($_POST['emailAddress']) . ':' . strtoupper($_POST['password'])), 'treatment' => $_POST['gender'], 'email' => $_POST['emailAddress'], 'question_id' => $_POST['question1'], 'question_answer' => $_POST['answer1'], 'birthdate' => strtotime(sprintf('%d.%d.%d', $_POST['dobDay'], $_POST['dobMonth'], $_POST['dobYear'])), 'country_code' => $_POST['country']);
                 // And try to register new account
                 if (WoW_Account::RegisterUser($user_data, true)) {
                     // Account created, redirect user to manager index
                     header('Location: ' . WoW::GetWoWPath() . '/account/management/');
                     exit;
                 }
             } else {
                 WoW_Template::SetPageData('creation_error', true);
             }
         }
     }
     WoW_Template::LoadTemplate('creation_index');
 }
                    }
                    if (WoW_Account::IsLoggedIn()) {
                        $isMy = WoW_Account::IsHaveCharacterOnRealm($subcat['title']);
                    } else {
                        $isMy = false;
                    }
                    echo sprintf('<a href="%d/" class="forum-link%s"%s>
																	<span class="forum-icon">
																	</span>
																	<span class="int">
																		<span class="int-padding">
																			%s
																			<span class="desc"></span>
																		</span>
																	</span>
																</a>', $subcat['cat_id'], !$isMy && WoW_Account::IsLoggedIn() ? ' pre-filtered' : null, $isMy && WoW_Account::IsLoggedIn() ? ' alt="flagged"' : null, $subcat['title']);
                }
                echo '</div></div>';
            } else {
                echo sprintf('<div class="forums-list">');
                foreach ($subcats as $subcat) {
                    echo sprintf('<a href="%d/" class="forum-link" >
				
																	<span class="forum-icon">
																			%s
																	</span>
				
																	<span class="int">
																		<span class="int-padding">
																			%s
																			<span class="desc">%s</span>
echo WoW_Paginator::Initialize(WoW_Template::GetPageData('current_page'), WoW_Forums::GetTotalThreadPosts(), 20, 'forum');
echo WoW_Template::NavigationMenu();
?>
          <span class="clear"><!-- --></span>
        </div>
      </div>
      <div class="talkback"><a id="new-post"></a>
        <form method="post" onsubmit="return Cms.Topic.postValidate(this);" action="#new-post">
    			<div>
            <input type="hidden" name="xstoken" value="fbc9d52f-99bf-4639-b2b5-7a535e7f31fe"/>
            <input type="hidden" name="sessionPersist" value="forum.topic.post"/>
            <div class="post ">
<?php 
if (WoW_Forums::IsClosedThread()) {
    echo sprintf('<table class="dynamic-center "><tr><td>%s</td></tr></table>', WoW_Locale::GetString('template_forum_topic_closed'));
} elseif (!WoW_Account::IsLoggedIn()) {
    echo sprintf('<table class="dynamic-center "><tr><td><a class="ui-button button1 " href="?login" onclick="return Login.open(\'%s/login/login.frag\')"><span><span>%s</span></span></a></td></tr></table>', WoW::GetWoWPath(), WoW_Locale::GetString('template_forum_add_reply'));
} elseif (WoW_Account::IsHaveActiveCharacter()) {
    WoW_Template::LoadTemplate('content_forum_new_post');
} else {
    echo sprintf('<table class="dynamic-center "><tr><td><div class="noCharacter"><p>%s</p></div></td></tr></table>', WoW_Locale::GetString('template_forum_need_char_to_post'));
}
?>

            </div>
    			</div>
        </form>
	      <span class="clear"><!-- --></span>
        <div class="talkback-code">
          <div class="talkback-code-interior">
            <div class="talkback-icon">
 public static function AddNewThread($category_id, &$post_data, $return_id = false)
 {
     if (WoW_Account::IsLoggedIn()) {
         DB::WoW()->query("INSERT INTO `DBPREFIX_forum_threads` (`cat_id`, `bn_id`, `character_guid`, `title`, `views`, `flags`) VALUES (%d, %d, %d, '%s', 0, %d)", $category_id, WoW_Account::GetUserID(), WoW_Account::GetActiveCharacterInfo('guid'), $post_data['subject'], WoW_Account::GetGMLevel() >= 3 ? THREAD_FLAG_BLIZZARD : 0);
         if (!$return_id) {
             return self::AddNewPost($category_id, DB::WoW()->GetInsertID(), $post_data);
         }
         return DB::WoW()->GetInsertID();
     } else {
         return false;
     }
 }
      <script type="text/javascript">
      //<![CDATA[
      $(function() {
      Cms.Topic.topicInit();
      });
      //]]>
      </script> 
      <div id="forum-content"> 
        <div class="talkback new-post">
          <a id="new-post"></a>
          <form method="post" onsubmit="return Cms.Topic.postValidate(this);" action="#new-post">
            <div>
              <input type="hidden" name="xstoken" value="396a2031-47e2-44b8-99d3-a77c2f8ec2d5"/>
              <input type="hidden" name="sessionPersist" value="forum.topic.form"/>
<?php 
if (WoW_Account::IsLoggedIn()) {
    $character = WoW_Account::GetActiveCharacter();
    $character_url = sprintf('%s/wow/%s/character/%s/%s/', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $character['realmName'], $character['name']);
    $character_search_url = sprintf('%s/wow/search?f=post&amp;a=%s&amp;sort=time', WoW::GetWoWPath(), $character['name']);
    $guild_url = sprintf('%s/wow/%s/guild/%s/%s/', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $character['realmName'], $character['guildName']);
    $character_links = sprintf('<a href="%s" title="%s" rel="np" class="icon-posts link-first link-last">%s</a>', $character_search_url, WoW_Locale::GetString('template_blog_lookup_forum_messages'), WoW_Locale::GetString('template_blog_lookup_forum_messages'));
    $character_description = sprintf('<div class="character-desc"><span>%s</span></div>
                                      <div class="guild"><a href="%s">%s</a></div>
                                      <div class="achievements">--</div>', $character['level'] . ' ' . $character['race_text'] . ' ' . $character['class_text'], $guild_url, $character['guildName']);
    $realms = WoW::GetRealmStatus($character['realmId']);
    ?>
              <div class="post general">
                <div class="post-user-details ">
                  <h4><?php 
    echo WoW_Locale::GetString('template_forum_create_thread');
    ?>
예제 #17
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');
예제 #18
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');
 }
    }
}
?>
    			</table>
        </div>
        <div class="forum-info">
          <div class="forum-actions topic-bottom">
        		<div class="actions-panel">
<?php 
echo WoW_Paginator::Initialize(WoW_Template::GetPageData('current_page'), WoW_Forums::GetTotalCategoryThreads(), 20, 'forum');
?>
          	  <a class="ui-button button1<?php 
echo WoW_Account::IsLoggedIn() && !WoW_Account::IsHaveActiveCharacter() ? ' disabled' : null;
?>
" href="topic"<?php 
echo !WoW_Account::IsLoggedIn() ? ' onclick="return Login.open(\'' . WoW::GetWoWPath() . '/login/login.frag\');"' : null;
?>
>
            		<span>
            			<span><?php 
echo WoW_Locale::GetString('template_forums_create_thread');
?>
</span>
            		</span>
            	</a>
        	    <span class="clear"><!-- --></span>
            </div>
          </div>
        </div>
      </div>
    </div>