Ejemplo n.º 1
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');
 }
      //<![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');
    ?>
</h4>
Ejemplo n.º 3
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']);
 }
Ejemplo n.º 4
0
			</div>
		</div>
        <?php 
WoW_Template::LoadTemplate('block_guild_menu');
?>
					</div>
				</div>
			</div>
		</div>
		<div class="profile-contents">
		<div class="summary">
			<div class="profile-section">
				<div class="summary-right">
	<?php 
if (WoW_Template::GetPageData('guild-authorized')) {
    $primary = WoW_Account::GetActiveCharacter();
    if (is_array($primary)) {
        echo sprintf('<div class="summary-characterspecific"><div class="summary-character">
		<a class="avatar" href="%s" rel="np" style="background-image: url(\'%s/wow/static/images/2d/avatar/%d-%d.jpg\');"></a>
		<div class="rest">
			<div class="name"><a href="%s" rel="np">%s</a></div>
			<div class="reputation">
				<div class="guild-progress guild-replevel-3">
					<span class="description">%s:
						<strong>%s</strong>
					</span>
	<div class="profile-progress border-2" >
		<div class="bar border-2 hover" style="width: 100%%"></div>
		<div class="bar-contents">0/ 3000 (0%%)</div>
   </div>
				</div>