本文整理汇总了PHP中WoW::GetRealmStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP WoW::GetRealmStatus方法的具体用法?PHP WoW::GetRealmStatus怎么用?PHP WoW::GetRealmStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WoW
的用法示例。
在下文中一共展示了WoW::GetRealmStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
<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&a=%s&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>
<div class="post-user ajax-update">
<div class="avatar">
<div class="avatar-interior">
<a href="<?php
echo WoW_Account::GetActiveCharacterInfo('url');
?>
"><img height="84" src="<?php
echo WoW::GetWoWPath();
示例2: foreach
foreach ($posts as $post) {
// this function can be call only ONCE in foreach
$NextBlizzPost = $post['blizzpost'] == 1 ? WoW_Forums::GetNextBlizzPostInThread($post) : false;
$blizz_icon_link = $NextBlizzPost != false ? sprintf('<div class="blizzard_icon"><a class="nextBlizz" href="../topic/%d%s" data-tooltip="%s"></a></div>', $post['thread_id'], $NextBlizzPost, WoW_Locale::GetString('template_forum_jump_next_blizz')) : NULL;
$character_url = sprintf('%s/wow/%s/character/%s/%s/', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $post['realmName'], $post['author']);
$character_search_url = sprintf('%s/wow/search?f=post&a=%s&sort=time', WoW::GetWoWPath(), $post['author']);
$guild_url = sprintf('%s/wow/%s/guild/%s/%s/', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $post['realmName'], $post['guildName']);
$character_links = $post['blizzpost'] == 1 ? 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')) : sprintf('<a href="%s" title="%s" rel="np" class="icon-profile link-first">%s</a>
<a href="%s" title="%s" rel="np" class="icon-posts"> </a>
<a href="javascript:;" title="%s" rel="np" class="icon-ignore link-last" onclick="Cms.ignore(23059292, false); return false;"> </a>', $character_url, WoW_Locale::GetString('template_profile_caption'), WoW_Locale::GetString('template_profile_caption'), $character_search_url, WoW_Locale::GetString('template_blog_lookup_forum_messages'), WoW_Locale::GetString('template_blog_add_to_black_list'));
$character_description = sprintf('<div class="character-desc"><span>%s</span></div>
<div class="guild"><a href="%s">%s</a></div>
<div class="achievements">--</div>', $post['level'] . ' ' . $post['race_text'] . ' ' . $post['class_text'], $guild_url, $post['guildName']);
$post_options = sprintf('<a class="ui-button button2 " href="post/%d/edit"><span><span>%s</span></span></a>
<a class="ui-button button2 " href="javascript:;" onmouseover="Tooltip.show(this,\'%s\')" onclick="if(confirm(\'%s\')) $(\'#deletePost%d\').submit()"><span><span>%s</span></span></a>', $post['post_id'], WoW_Locale::GetString('template_forum_post_edit'), WoW_Locale::GetString('template_forum_post_delete_tooltip'), WoW_Locale::GetString('template_forum_post_delete_confirm'), $post['post_id'], WoW_Locale::GetString('template_forum_post_delete'));
$realms = WoW::GetRealmStatus($post['realmId']);
if ($post['deleted'] != NULL) {
echo sprintf('
<div class="post hidden">
<form id="deletePost%d" action="post/%d/delete" method="POST">
<input type="hidden" name="xstoken" value="85d0d8a6-90e2-4197-ac61-602be6f70e19" />
</form>
<span id="%d"></span>
<div class="deleted">
<table>
<tr>
<td class="post-character">
<div class="character-info user-name-container">
<div class="user-name">
<span class="char-name-code" style="display: none">%s</span>
<div id="context-10" class="ui-context">
示例3: LoadCharactersFromWorld
/**
* Loads all characters from world DBs
*
* @access public
* @static WoW_Account::LoadCharactersFromWorld()
* @category Account Manager Class
* @return void
**/
private static function LoadCharactersFromWorld()
{
$db = null;
$chars_data = array();
self::$characters_data = array();
$index = 0;
$account_ids = array();
$count = count(self::$myGamesList);
if ($count == 0) {
return false;
}
for ($i = 0; $i < $count; ++$i) {
$account_ids[] = self::$myGamesList[$i]['account_id'];
}
foreach (WoWConfig::$Realms as $realm_info) {
$db = DB::ConnectToDB(DB_CHARACTERS, $realm_info['id']);
$chars_data = DB::Characters()->select("\n SELECT\n `characters`.`guid`,\n `characters`.`account`,\n `characters`.`name`,\n `characters`.`class`,\n `characters`.`race`,\n `characters`.`gender`,\n `characters`.`level`,\n `guild_member`.`guildid` AS `guildId`,\n `guild`.`name` AS `guildName`\n FROM `characters` AS `characters`\n LEFT JOIN `guild_member` AS `guild_member` ON `guild_member`.`guid`=`characters`.`guid`\n LEFT JOIN `guild` AS `guild` ON `guild`.`guildid`=`guild_member`.`guildid`\n WHERE `account` IN (%s)", $account_ids);
if (!$chars_data) {
continue;
}
foreach ($chars_data as $char) {
$status = WoW::GetRealmStatus($realm_info['id']);
$tmp_char_data = array('account' => $char['account'], 'index' => $index, 'guid' => $char['guid'], 'name' => $char['name'], 'class' => $char['class'], 'class_text' => WoW_Locale::GetString('character_class_' . $char['class'], $char['gender']), 'class_key' => Data_Classes::$classes[$char['class']]['key'], 'race' => $char['race'], 'race_text' => WoW_Locale::GetString('character_race_' . $char['race'], $char['gender']), 'race_key' => Data_Races::$races[$char['race']]['key'], 'gender' => $char['gender'], 'level' => $char['level'], 'realmName' => $realm_info['name'], 'realmId' => $realm_info['id'], 'isActive' => 0, 'faction' => WoW_Utils::GetFactionId($char['race']), 'faction_text' => WoW_Utils::GetFactionId($char['race']) == FACTION_ALLIANCE ? 'alliance' : 'horde', 'guildId' => $char['guildId'], 'guildName' => $char['guildName'], 'guildUrl' => sprintf('%s/wow/%s/guild/%s/%s/', WoW::GetWoWPath(), WoW_Locale::GetLocale(), urlencode($realm_info['name']), urlencode($char['guildName'])), 'url' => sprintf('%s/wow/%s/character/%s/%s/', WoW::GetWoWPath(), WoW_Locale::GetLocale(), urlencode($realm_info['name']), urlencode($char['name'])), 'realmStatus' => isset($status[0], $status[0]['status']) ? $status[0]['status'] : 'down');
self::$characters_data[] = $tmp_char_data;
++$index;
}
}
}
示例4: foreach
?>
</span></a></th>
<th><a href="javascript:;" class="sort-link"><span class="arrow"><?php
echo WoW_Locale::GetString('template_realm_status_language');
?>
</span></a></th>
<th><a href="javascript:;" class="sort-link"><span class="arrow"><?php
echo WoW_Locale::GetString('template_realm_status_queue');
?>
</span></a></th>
</tr>
</thead>
<tbody>
<?php
$realms = WoW::GetRealmStatus();
if (is_array($realms)) {
$toggleStyle = 2;
foreach ($realms as $realm) {
echo sprintf('<tr class="row%d">
<td class="status" data-raw="%s">
<div class="status-icon %s" onmouseover="Tooltip.show(this, \'%s\')"></div>
</td>
<td class="name">
%s
</td>
<td class="type" data-raw="%s">
<span class="%s">
(%s)
</span>
</td>