本文整理汇总了PHP中misc_get_country_by_account函数的典型用法代码示例。如果您正苦于以下问题:PHP misc_get_country_by_account函数的具体用法?PHP misc_get_country_by_account怎么用?PHP misc_get_country_by_account使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了misc_get_country_by_account函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: char_main
//.........这里部分代码省略.........
<div id="tab_content2">
<table class="lined" style="width: 580px;">
<tr>
<td colspan="2">
<div>
<img src="' . char_get_avatar_img($char['level'], $char['gender'], $char['race'], $char['class'], 0) . '" alt="avatar" />
</div>
<div>';
$a_results = $sqlc->query('SELECT DISTINCT spell FROM character_aura WHERE guid = ' . $id . '');
if ($sqlc->num_rows($a_results)) {
while ($aura = $sqlc->fetch_assoc($a_results)) {
$output .= '
<a style="padding:2px;" href="' . $spell_datasite . $aura['spell'] . '" target="_blank">
<img src="' . spell_get_icon($aura['spell'], $sqlm) . '" alt="' . $aura['spell'] . '" width="24" height="24" />
</a>';
}
}
$output .= '
</div>
</td>
<td colspan="4">
<font class="bold">
' . htmlentities($char['name']) . ' -
<img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
<img src="img/c_icons/' . $char['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
- lvl ' . char_get_level_color($char['level']) . '
</font>
<br />' . get_map_name($char['map'], $sqlm) . ' - ' . get_zone_name($char['zone'], $sqlm) . '
<br />' . $lang_char['honor_points'] . ': ' . $char['totalHonorPoints'] . ' / ' . $char['arenaPoints'] . ' - ' . $lang_char['honor_kills'] . ': ' . $char['totalKills'] . '
<br />' . $lang_char['guild'] . ': ' . $guild_name . ' | ' . $lang_char['rank'] . ': ' . htmlentities($guild_rank) . '
<br />' . ($char['online'] ? '<img src="img/up.gif" onmousemove="toolTip(\'Online\', \'item_tooltip\')" onmouseout="toolTip()" alt="online" />' : '<img src="img/down.gif" onmousemove="toolTip(\'Offline\', \'item_tooltip\')" onmouseout="toolTip()" alt="offline" />');
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$country = misc_get_country_by_account($char['account'], $sqlr, $sqlm);
$output .= ' - ' . ($country['code'] ? '<img src="img/flags/' . $country['code'] . '.png" onmousemove="toolTip(\'' . $country['country'] . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />' : '-');
unset($country);
}
$output .= '
</td>
</tr>
<tr>
<td width="6%">';
if ($equiped_items[1][1]) {
$output .= '
<a style="padding:2px;" href="' . $item_datasite . $EQU_HEAD . '" target="_blank">
<img src="' . $equiped_items[1][1] . '" class="' . $equiped_items[1][2] . '" alt="Head" />
</a>';
} else {
$output .= '
<img src="img/INV/INV_empty_head.png" class="icon_border_0" alt="empty" />';
}
$output .= '
</td>
<td class="half_line" colspan="2" align="center" width="50%">
<div class="gradient_p">' . $lang_item['health'] . ':</div>
<div class="gradient_pp">' . $char['health'] . '</div>';
if ($char['class'] == 11) {
//druid
$output .= '
</br>
<div class="gradient_p">' . $lang_item['energy'] . ':</div>
<div class="gradient_pp">' . $char['power4'] . '</div>';
}
$output .= '
</td>
<td class="half_line" colspan="2" align="center" width="50%">';
示例2: view_guild
function view_guild()
{
global $lang_guild, $lang_global, $output, $realm_db, $characters_db, $mmfpm_db, $realm_id, $itemperpage, $action_permission, $user_lvl, $user_id, $showcountryflag;
if (!isset($_GET['id'])) {
redirect("guild.php?error=1&realm={$realmid}");
}
$sqlr = new SQL();
$sqlr->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
if (empty($_GET['realm'])) {
$realmid = $realm_id;
} else {
$realmid = $sqlr->quote_smart($_GET['realm']);
if (!is_numeric($realmid)) {
$realmid = $realm_id;
}
}
$sqlc = new SQL();
$sqlc->connect($characters_db[$realmid]['addr'], $characters_db[$realmid]['user'], $characters_db[$realmid]['pass'], $characters_db[$realmid]['name']);
$guild_id = $sqlc->quote_smart($_GET['id']);
if (is_numeric($guild_id)) {
} else {
redirect("guild.php?error=6&realm={$realmid}");
}
//==========================SQL INGUILD and GUILDLEADER======================
$q_inguild = $sqlc->query("select 1 from guild_member where guildid = '{$guild_id}' and guid in (select guid from characters where account = '{$user_id}')");
$inguild = $sqlc->result($q_inguild, 0, '1');
if ($user_lvl < $action_permission['update'] && !$inguild) {
redirect("guild.php?error=6&realm={$realmid}");
}
$q_amIguildleader = $sqlc->query("select 1 from guild where guildid = '{$guild_id}' and leaderguid in (select guid from characters where account = '{$user_id}')");
$amIguildleader = $sqlc->result($q_amIguildleader, 0, '1');
$q_guildmemberCount = $sqlc->query("SELECT 1 from guild_member where guildid = '{$guild_id}'");
$guildmemberCount = $sqlc->num_rows($q_guildmemberCount);
//====================SQL INGUILD and GUILDLEADER end========================
//==========================$_GET and SECURE=================================
$start = isset($_GET['start']) ? $sqlc->quote_smart($_GET['start']) : 0;
if (is_numeric($start)) {
} else {
$start = 0;
}
$order_by = isset($_GET['order_by']) ? $sqlc->quote_smart($_GET['order_by']) : "mrank";
if (!preg_match("/^[_[:lower:]]{1,10}\$/", $order_by)) {
$order_by = "mrank";
}
$dir = isset($_GET['dir']) ? $sqlc->quote_smart($_GET['dir']) : 1;
if (!preg_match("/^[01]{1}\$/", $dir)) {
$dir = 1;
}
$order_dir = $dir ? "ASC" : "DESC";
$dir = $dir ? 0 : 1;
//==========================$_GET and SECURE end=============================
$query = $sqlc->query("SELECT guildid, name, info, MOTD, createdate,\r\n (select count(*) from guild_member where guildid = '{$guild_id}') as mtotal,\r\n (select count(*) from guild_member where guildid = '{$guild_id}' and guid in\r\n (select guid from characters where online = 1)) as monline\r\n FROM guild WHERE guildid = '{$guild_id}'");
$guild_data = $sqlc->fetch_row($query);
$output .= "\r\n<center>\r\n\t<div id=\"tab_content\">\r\n\t\t<div id=\"tab\">\r\n\t\t\t<ul>\r\n\t\t\t\t<li id=\"selected\"><a href=\"guild.php?action=view_guild&realm={$realmid}&error=3&id={$guild_data['0']}\">" . $lang_guild['members'] . "</a></li>\r\n\t\t\t\t<li><a href=\"guildbank.php?id={$guild_id}&realm={$realmid}\">" . $lang_guild['guildbank'] . "</a></li>\r\n\t\t\t</ul>\r\n\t\t</div>\r\n";
$output .= "\r\n <script type=\"text/javascript\">\r\n answerbox.btn_ok='{$lang_global['yes']}';\r\n answerbox.btn_cancel='{$lang_global['no']}';\r\n </script>\r\n\t\t<div id=\"tab_content2\">\r\n\t\t\t<table class=\"hidden\" style=\"width: 100%;\">\r\n <tr>\r\n <td>\r\n <table class=\"lined\"style=\"width: 100%;\">\r\n <tr>\r\n <td width=\"25%\"><b>{$lang_guild['create_date']}:</b><br />" . date('o-m-d', $guild_data[4]) . "</td>\r\n <td width=\"50%\" class=\"bold\">{$guild_data['1']}</td>\r\n <td width=\"25%\"><b>{$lang_guild['tot_m_online']}:</b><br />{$guild_data['6']} / {$guild_data['5']}</td>\r\n </tr>";
if ($guild_data[2] != '') {
$output .= "\r\n <tr>\r\n <td colspan=\"3\"><b>{$lang_guild['info']}:</b><br />{$guild_data['2']}</td>\r\n </tr>";
}
if ($guild_data[3] != '') {
$output .= "\r\n <tr>\r\n <td colspan=\"3\"><b>{$lang_guild['motd']}:</b><br />{$guild_data['3']}</td>\r\n </tr>";
}
$output .= "\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"right\">" . generate_pagination("guild.php?action=view_guild&realm={$realmid}&id={$guild_id}&order_by={$order_by}&dir=" . ($dir ? 0 : 1) . "", $guildmemberCount, $itemperpage, $start) . "</td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <table class=\"lined\" style=\"width: 100%;\">\r\n <tr>\r\n <th width=\"1%\">{$lang_guild['remove']}</th>\r\n <th width=\"20%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=cname&start={$start}&dir={$dir}\">" . ($order_by == 'cname' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['name']}</a></th>\r\n <th width=\"1%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=crace&start={$start}&dir={$dir}\">" . ($order_by == 'crace' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['race']}</a></th>\r\n <th width=\"1%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=class&start={$start}&dir={$dir}\">" . ($order_by == 'cclass' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['class']}</a></th>\r\n <th width=\"1%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=clevel&start={$start}&dir={$dir}\">" . ($order_by == 'clevel' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['level']}</a></th>\r\n <th width=\"23%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=mrank&start={$start}&dir={$dir}\">" . ($order_by == 'mrank' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['rank']}</a></th>\r\n <th width=\"25%\">{$lang_guild['pnote']}</th>\r\n <th width=\"25%\">{$lang_guild['offnote']}</th>\r\n <th width=\"1%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=clogout&start={$start}&dir={$dir}\">" . ($order_by == 'clogout' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['llogin']}</a></th>\r\n <th width=\"1%\"><a href=\"guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by=conline&start={$start}&dir={$dir}\">" . ($order_by == 'conline' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_guild['online']}</a></th>";
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
$output .= "\r\n <th width=\"1%\">{$lang_global['country']}</th>";
}
$output .= "\r\n </tr>";
$members = $sqlc->query("SELECT gm.guid as cguid, c.name as cname, c.`race` as crace ,c.`class` as cclass,\r\n c.`level` AS clevel,\r\n gm.rank AS mrank, (SELECT rname FROM guild_rank WHERE guildid ='{$guild_id}' AND rid = mrank) AS rname,\r\n gm.Pnote, gm.OFFnote, gender,\r\n c.`online` as conline, c.`account`, c.`logout_time` as clogout\r\n FROM guild_member as gm left outer join characters as c on c.guid = gm.guid\r\n WHERE gm.guildid = '{$guild_id}' ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
while ($member = $sqlr->fetch_row($members)) {
$result = $sqlr->query("SELECT gmlevel FROM account WHERE id ='{$member['11']}'");
$owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
$output .= "\r\n <tr>";
// gm, gildleader or own account! are allowed to remove from guild
$output .= $user_lvl >= $action_permission['delete'] || $amIguildleader || $member[11] == $user_id ? "\r\n <td>\r\n <img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[1]}</font><br />{$lang_global['are_you_sure']}', 'guild.php?action=rem_char_from_guild&realm={$realmid}&id={$member['0']}&guld_id={$guild_id}');\" style=\"cursor:pointer;\" />\r\n </td>" : "\r\n <td>\r\n </td>";
$output .= $user_lvl < $owner_gmlvl ? "\r\n <td>" . htmlentities($member[1]) . "</td>" : "\r\n <td><a href=\"char.php?id={$member['0']}&realm={$realmid}\">" . htmlentities($member[1]) . "</a></td>";
$output .= "\r\n <td><img src='img/c_icons/{$member[2]}-{$member[9]}.gif' onmousemove='toolTip(\"" . char_get_race_name($member[2]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" /></td>\r\n <td><img src='img/c_icons/{$member[3]}.gif' onmousemove='toolTip(\"" . char_get_class_name($member[3]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" /></td>\r\n <td>" . char_get_level_color($member[4]) . "</td>\r\n <td>" . htmlentities($member[6]) . " (" . $member[5] . ")</td>\r\n <td>" . htmlentities($member[7]) . "</td>\r\n <td>" . htmlentities($member[8]) . "</td>\r\n <td>" . get_days_with_color($member[12]) . "</td>\r\n <td>" . ($member[10] ? "<img src=\"img/up.gif\" alt=\"\" />" : "-") . "</td>";
if ($showcountryflag) {
$country = misc_get_country_by_account($member[11], $sqlr, $sqlm);
$output .= "\r\n <td>" . ($country['code'] ? "<img src='img/flags/" . $country['code'] . ".png' onmousemove='toolTip(\"" . $country['country'] . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />" : "-") . "</td>";
}
$output .= "\r\n </tr>";
}
unset($member);
$output .= "\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"right\">" . generate_pagination("guild.php?action=view_guild&error=3&realm={$realmid}&id={$guild_id}&order_by={$order_by}&dir=" . !$dir, $guildmemberCount, $itemperpage, $start) . "</td>\r\n </tr>\r\n </table>\r\n\t\t</div>\r\n\t</div>\r\n <br />";
$output .= "\r\n <table class=\"hidden\">\r\n <tr>\r\n <td>";
if ($user_lvl >= $action_permission['delete'] || $amIguildleader) {
makebutton($lang_guild['del_guild'], "guild.php?action=del_guild&realm={$realmid}&id={$guild_id}\" type=\"wrn", 130);
$output .= "\r\n </td>\r\n <td>";
}
makebutton($lang_guild['show_guilds'], "guild.php?realm={$realmid}\" type=\"def", 130);
$output .= "\r\n </td>\r\n </tr>\r\n </table>\r\n\t</center>\r\n";
}
示例3: browse_chars
//.........这里部分代码省略.........
<td>' . $char["guid"] . '</td>
<td>
<a href="char.php?id=' . $char["guid"] . '">' . htmlentities($char["name"], ENT_COMPAT, $site_encoding) . '</a>
</td>';
if ($sn["ScreenName"]) {
$output .= '
<td>
<a href="user.php?action=edit_user&error=11&acct=' . $char["acct"] . '">' . htmlentities($sn["ScreenName"], ENT_COMPAT, $site_encoding) . '</a>
</td>';
} else {
$output .= '
<td>
<a href="user.php?action=edit_user&error=11&acct=' . $char["acct"] . '">' . htmlentities($owner_acc_name, ENT_COMPAT, $site_encoding) . '</a>
</td>';
}
$output .= '
<td>
<img src="img/c_icons/' . $char["race"] . '-' . $char["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($char["race"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
<td>
<img src="img/c_icons/' . $char["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($char["class"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
<td>
<span>' . char_get_level_color($char["level"]) . '</span>
</td>
<td>
<span onmousemove="oldtoolTip(\'MapID:' . $char["mapid"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()">' . get_map_name($char["mapid"]) . '</span>
</td>
<td>
<span onmousemove="oldtoolTip(\'ZoneID:' . $char["zoneid"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()">' . get_zone_name($char["zoneid"]) . '</span>
</td>
<td>
<span>' . $char["highest_rank"] . '</span>
</td>
<td>
<a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '">' . htmlentities($guild_name, ENT_COMPAT, $site_encoding) . '</a>
</td>
<td>
<span>' . $lastseen . '</span>
</td>
<td>
<img src="img/' . ($char["online"] ? 'up' : 'down') . '.gif" alt="" />
</td>';
if ($showcountryflag) {
$country = misc_get_country_by_account($char["acct"]);
if ($country["code"]) {
$output .= '
<td>
<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>';
} else {
$output .= '
<td>
<span>-</span>
</td>';
}
}
if ($user_lvl >= $action_permission["update"]) {
$output .= '
<td>
<a href="char_tools.php?char=' . $char["guid"] . '">
<img src="img/arrow_switch.png" alt="" />
</a>
</td>';
}
$output .= '
</tr>';
} else {
$output .= '
<tr>
<td>*</td><td>***</td><td>***</td><td>You</td><td>Have</td><td>No</td><td class="small">Permission</td><td>to</td><td>View</td><td>this</td><td>Data</td><td>***</td><td>*</td>';
if ($showcountryflag) {
$output .= '<td>*</td>';
}
$output .= '
<td>*</td>
</tr>';
}
}
unset($char);
unset($result);
$output .= '
<tr>
<td colspan="13" align="right" class="hidden" style="width: 25%;">';
$output .= generate_pagination('char_list.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1) . ($search_value && $search_by ? '&symbol=' . $_GET["symbol"] . '&search_by=' . $search_by . '&search_value=' . $search_value . '' : ''), $all_record, $itemperpage, $start);
$output .= '
</td>
</tr>
<tr>
<td colspan="6" align="left" class="hidden">';
if ($user_lvl >= $action_permission["delete"] || $owner_acc_name == $user_name) {
makebutton(lang("char_list", "del_selected_chars"), 'javascript:do_submit(\'form1\',0)" type="wrn', 220);
}
$output .= '
</td>
<td colspan="7" align="right" class="hidden">' . lang("char_list", "tot_chars") . ' : ' . $all_record . '</td>
</tr>
</table>
</form>';
}
示例4: char_tools_form
function char_tools_form()
{
global $output, $characters_db, $realm_id, $action_permission, $site_encoding, $showcountryflag, $sql;
valid_login($action_permission["delete"]);
if (isset($_GET["char"])) {
$id = $_GET["char"];
} else {
error(lang("global", "empty_fields"));
}
if ($core == 1) {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, zoneid, mapid, online, gender\r\n acct, data \r\n FROM characters WHERE guid='" . $id . "'");
} elseif ($core == 2) {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, zone AS zoneid, map AS mapid, \r\n online, gender, totaltime, account AS acct,\r\n arenaPoints, totalHonorPoints, totalKills\r\n FROM characters WHERE guid='" . $id . "'");
} else {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, zone AS zoneid, map AS mapid, \r\n online, gender, totaltime, account AS acct, arenaPoints, totalHonorPoints, totalKills\r\n FROM characters WHERE guid='" . $id . "'");
}
$char = $sql["char"]->fetch_assoc($result);
if ($core == 1) {
$char_data = $char["data"];
if (empty($char_data)) {
$char_data = str_repeat("0;", PLAYER_END);
}
$char_data = explode(";", $char_data);
} else {
$query = "SELECT * FROM characters\r\n LEFT JOIN character_stats ON characters.guid=character_stats.guid\r\n WHERE characters.guid='" . $id . "'";
$char_data_result = $sql["char"]->query($query);
$char_data_fields = $sql["char"]->fetch_assoc($char_data_result);
$char_data[PLAYER_FIELD_HONOR_CURRENCY] = isset($char["totalHonorPoints"]) ? $char["totalHonorPoints"] : ' ';
$char_data[PLAYER_FIELD_ARENA_CURRENCY] = isset($char["arenaPoints"]) ? $char["arenaPoints"] : ' ';
$char_data[PLAYER_FIELD_LIFETIME_HONORBALE_KILLS] = isset($char["totalKills"]) ? $char["totalKills"] : ' ';
}
if ($core == 1) {
$guild_id = $sql["char"]->result($sql["char"]->query("SELECT guildid FROM guild_data WHERE playerid='" . $char["guid"] . "'"), 0);
$guild_rank = $sql["char"]->result($sql["char"]->query("SELECT guildRank FROM guild_data WHERE playerid='" . $char["guid"] . "'"), 0);
$guild_name = $sql["char"]->result($sql["char"]->query("SELECT guildName FROM guilds WHERE guildid='" . $guild_id . "'"));
} else {
$guild_id = $sql["char"]->result($sql["char"]->query("SELECT guildid FROM guild_member WHERE guid='" . $char["guid"] . "'"), 0);
$guild_rank = $sql["char"]->result($sql["char"]->query("SELECT rank AS guildRank FROM guild_member WHERE guid='" . $char["guid"] . "'"), 0);
$guild_name = $sql["char"]->result($sql["char"]->query("SELECT name AS guildName FROM guild WHERE guildid='" . $guild_id . "'"));
}
$online = $char["online"] ? lang("char", "online") : lang("char", "offline");
if ($guild_id) {
$guild_name = '<a href="guild.php?action=view_guild&realm=' . $realmid . '&error=3&id=' . $guild_id . '" >' . $guild_name . '</a>';
$mrank = $guild_rank;
if ($core == 1) {
$guild_rank = $sql["char"]->result($sql["char"]->query('SELECT rankname FROM guild_ranks WHERE guildid=' . $guild_id . ' AND rankId=' . $mrank . ''), 0, 'rankname');
} else {
$guild_rank = $sql["char"]->result($sql["char"]->query('SELECT rname AS rankname FROM guild_rank WHERE guildid=' . $guild_id . ' AND rid=' . $mrank . ''), 0, 'rankname');
}
} else {
$guild_name = lang("global", "none");
$guild_rank = lang("global", "none");
}
$output .= '
<center>
<table class="hidden char_list_char_tools">
<tr>
<td class="char_tools_avatar">
<div>
<img src="' . char_get_avatar_img($char["level"], $char["gender"], $char["race"], $char["class"], 0) . '" alt="avatar" />
</div>
</td>
<td colspan="3">
<font class="bold">
' . htmlentities($char["name"], ENT_COMPAT, $site_encoding) . ' -
<img src="img/c_icons/' . $char["race"] . '-' . $char["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($char["race"]) . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
<img src="img/c_icons/' . $char["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($char["class"]) . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
- ' . lang("char", "level_short") . char_get_level_color($char["level"]) . '
</font>
<br />' . lang("char", "location") . ': ' . get_map_name($char["mapid"]) . ' - ' . get_zone_name($char["zoneid"]) . '
<br />' . lang("char", "honor_points") . ': ' . $char_data[PLAYER_FIELD_HONOR_CURRENCY] . ' | ' . lang("char", "arena_points") . ': ' . $char_data[PLAYER_FIELD_ARENA_CURRENCY] . ' | ' . lang("char", "honor_kills") . ': ' . $char_data[PLAYER_FIELD_LIFETIME_HONORBALE_KILLS] . '
<br />' . lang("char", "guild") . ': ' . $guild_name . ' | ' . lang("char", "rank") . ': ' . htmlentities($guild_rank, ENT_COMPAT, $site_encoding) . '
<br />' . lang("char", "online") . ': ' . ($char["online"] ? '<img src="img/up.gif" onmousemove="oldtoolTip(\'' . lang("char", "online") . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="online" />' : '<img src="img/down.gif" onmousemove="oldtoolTip(\'' . lang("char", "offline") . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="offline" />');
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$country = misc_get_country_by_account($char["acct"]);
$output .= ' | ' . lang("global", "country") . ': ' . ($country["code"] ? '<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />' : '-');
unset($country);
}
$output .= '
</td>
</tr>
</table>
<br />
<table class="hidden char_list_char_tools">
<tr>
<td>';
makebutton(lang("xname", "changename"), "char_tools.php?char=" . $id, 150);
$output .= '
</td>
<td>';
makebutton(lang("xrace", "changerace"), "char_tools.php?char=" . $id, 150);
$output .= '
</td>
<td>';
makebutton(lang("unstuck", "unstuck"), "hearthstone.php?action=approve&char=" . $id, 150);
$output .= '
</td>
</tr>
<tr>
//.........这里部分代码省略.........
示例5: char_main
//.........这里部分代码省略.........
<div id="tab_content2">
<table class="lined" style="width: 580px;">
<tr>
<td colspan="2">
<div>
<img src="' . char_get_avatar_img($char['level'], $char['gender'], $char['race'], $char['class'], 0) . '" alt="avatar" />
</div>
<div>';
$a_results = $sqlc->query('SELECT DISTINCT spell FROM character_aura WHERE guid = ' . $id . '');
if ($sqlc->num_rows($a_results)) {
while ($aura = $sqlc->fetch_assoc($a_results)) {
$output .= '
<a style="padding:2px;" href="' . $spell_datasite . $aura['spell'] . '" target="_blank">
<img src="' . spell_get_icon($aura['spell'], $sqlm) . '" alt="' . $aura['spell'] . '" width="24" height="24" />
</a>';
}
}
$output .= '
</div>
</td>
<td colspan="4">
<font class="bold">
' . htmlentities($char['name']) . ' -
<img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
<img src="img/c_icons/' . $char['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
- lvl ' . char_get_level_color($char['level']) . '
</font>
<br />' . get_map_name($char['map'], $sqlm) . ' - ' . get_zone_name($char['zone'], $sqlm) . '
<br />' . $lang_char['honor_points'] . ': ' . $char['totalHonorPoints'] . ' / ' . $char['arenaPoints'] . ' - ' . $lang_char['honor_kills'] . ': ' . $char['totalKills'] . '
<br />' . $lang_char['guild'] . ': ' . $guild_name . ' | ' . $lang_char['rank'] . ': ' . htmlentities($guild_rank) . '
<br />' . ($char['online'] ? '<img src="img/up.gif" onmousemove="toolTip(\'Online\', \'item_tooltip\')" onmouseout="toolTip()" alt="online" />' : '<img src="img/down.gif" onmousemove="toolTip(\'Offline\', \'item_tooltip\')" onmouseout="toolTip()" alt="offline" />');
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$country = misc_get_country_by_account($char['account'], $sqlr, $sqlm);
$output .= ' - ' . ($country['code'] ? '<img src="img/flags/' . $country['code'] . '.png" onmousemove="toolTip(\'' . $country['country'] . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />' : '-');
unset($country);
}
$output .= '
</td>
</tr>
<tr>
<td width="6%">';
if ($equiped_items[1][1]) {
$output .= '
<a style="padding:2px;" href="' . $item_datasite . $EQU_HEAD . '" target="_blank">
<img src="' . $equiped_items[1][1] . '" class="' . $equiped_items[1][2] . '" alt="Head" />
</a>';
} else {
$output .= '
<img src="img/INV/INV_empty_head.png" class="icon_border_0" alt="empty" />';
}
$output .= '
</td>
<td class="half_line" colspan="2" align="center" width="50%">
<div class="gradient_p">' . $lang_item['health'] . ':</div>
<div class="gradient_pp">' . $char['maxhealth'] . '</div>';
if ($char['class'] == 11) {
//druid
$output .= '
</br>
<div class="gradient_p">' . $lang_item['energy'] . ':</div>
<div class="gradient_pp">' . $char['power4'] . '/' . $char['maxpower4'] . '</div>';
}
$output .= '
</td>
<td class="half_line" colspan="2" align="center" width="50%">';
示例6: view_guild
//.........这里部分代码省略.........
<table class="lined">
<tr>
<th style="width: 1%;">' . lang("guild", "remove") . '</th>
<th style="width: 15%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=cname&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "cname" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "name") . '</a></th>
<th style="width: 1%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=crace&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "crace" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "race") . '</a></th>
<th style="width: 1%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=class&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "cclass" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "class") . '</a></th>
<th style="width: 1%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=clevel&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "clevel" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "level") . '</a></th>
<th style="width: 25%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=mrank&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "mrank" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "rank") . '</a></th>
<th style="width: 15%;">' . lang("guild", "pnote") . '</th>
<th style="width: 15%;">' . lang("guild", "offnote") . '</th>
<th style="width: 15%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=clogout&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "clogout" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "llogin") . '</a></th>
<th style="width: 1%;"><a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '&order_by=conline&start=' . $start . '&dir=' . $dir . '">' . ($order_by == "conline" ? '<img src="img/arr_' . ($dir ? "up" : "dw") . '.gif" alt="" /> ' : '') . lang("guild", "online") . '</a></th>';
}
if ($showcountryflag) {
require_once "libs/misc_lib.php";
$output .= '
<th style="width: 1%;">' . lang("global", "country") . '</th>';
}
$output .= '
</tr>';
// this_is_junk: WTF? O_o
if ($core == 1) {
$members = $sql["char"]->query("SELECT gm.playerid AS cguid, c.name AS cname, c.`race` AS crace, c.`class` AS cclass,\n c.`level` AS clevel,\n gm.guildrank AS mrank, (SELECT rankname FROM guild_ranks WHERE guildid='" . $guild_id . "' AND rankid=mrank) AS rname,\n gm.publicNote AS pnote, gm.officerNote AS offnote, gender,\n c.`online` AS conline, c.`acct`, c.`timestamp` AS clogout\n FROM guild_data AS gm LEFT OUTER JOIN characters AS c ON c.guid=gm.playerid\n WHERE gm.guildid='" . $guild_id . "' ORDER BY " . $order_by . " " . $order_dir . " LIMIT " . $start . ", " . $itemperpage);
} else {
$members = $sql["char"]->query("SELECT gm.guid AS cguid, c.name AS cname, c.`race` AS crace, c.`class` AS cclass,\n c.`level` AS clevel,\n gm.rank AS mrank, (SELECT rname FROM guild_rank WHERE guildid='" . $guild_id . "' AND rid=mrank) AS rname,\n gm.pnote AS pnote, gm.offnote AS offnote, gender,\n c.`online` AS conline, c.`account` AS acct, c.`logout_time` AS clogout\n FROM guild_member AS gm LEFT OUTER JOIN characters AS c ON c.guid=gm.guid\n WHERE gm.guildid='" . $guild_id . "' ORDER BY " . $order_by . " " . $order_dir . " LIMIT " . $start . ", " . $itemperpage);
}
while ($member = $sql["char"]->fetch_assoc($members)) {
if ($core == 1) {
$query = "SELECT * FROM accounts WHERE acct='" . $member["acct"] . "'";
$result = $sql["logon"]->query($query);
$result = $sql["logon"]->fetch_assoc($result);
$user = $result["login"];
} else {
$query = "SELECT * FROM account WHERE id='" . $member["acct"] . "'";
$result = $sql["logon"]->query($query);
$result = $sql["logon"]->fetch_assoc($result);
$user = $result["username"];
}
$result = $sql["mgr"]->query("SELECT SecurityLevel AS gm FROM config_accounts WHERE Login='" . $user . "'");
$owner_gmlvl = $sql["logon"]->result($result, 0, "gm");
if ($owner_gmlvl >= 1073741824) {
$owner_gmlvl -= 1073741824;
}
$output .= '
<tr>';
// gm, guildleader or own account! are allowed to remove from guild
$output .= $user_lvl >= $action_permission["delete"] || $amIguildleader || $member["acct"] == $user_id ? '<td><img src="img/aff_cross.png" alt="" onclick="answerBox(\'' . lang("global", "delete") . ': <font color=white>' . $member["cname"] . '</font><br />' . lang("global", "are_you_sure") . '\', \'guild.php?action=rem_char_from_guild&realm=' . $realmid . '&id=' . $member["cguid"] . '&guld_id=' . $guild_id . '\');" class="guild_edit_delete_cursor" /></td>' : '<td></td>';
$output .= '
<td><a href="char.php?id=' . $member["cguid"] . '">' . htmlentities($member["cname"], ENT_COMPAT, $site_encoding) . '</a></td>
<td><img src="img/c_icons/' . $member["crace"] . '-' . $member["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($member["crace"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" /></td>
<td><img src="img/c_icons/' . $member["cclass"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($member["cclass"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" /></td>
<td>' . char_get_level_color($member["clevel"]) . '</td>
<td>' . htmlentities($member["rname"], ENT_COMPAT, $site_encoding) . ' (' . $member["mrank"] . ')</td>
<td>' . htmlentities($member["pnote"], ENT_COMPAT, $site_encoding) . '</td>
<td>' . htmlentities($member["offnote"], ENT_COMPAT, $site_encoding) . '</td>
<td><span style="font-weight: bold;">' . get_days_with_color($member["clogout"]) . '</span></td>
<td><img src="img/' . ($member["conline"] ? 'up' : 'down') . '.gif" alt="" /></td>';
if ($showcountryflag) {
// this_is_junk: apparently sometimes guilds end up with members who don't exist. O_o
// and because they don't exist, they don't have anything in their acct field.
// which misc_get_country_by_account() doesn't like.
if ($member["acct"]) {
$country = misc_get_country_by_account($member["acct"]);
} else {
$country = 0;
}
$output .= '
<td>' . ($country["code"] ? '<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />' : '-') . '</td>';
}
$output .= '
</tr>';
}
unset($member);
$output .= '
<tr>
<td align="right" class="hidden">' . generate_pagination("guild.php?action=view_guild&error=3&id=" . $guild_id . "&order_by=" . $order_by . "&dir=" . !$dir, $guildmemberCount, $itemperpage, $start) . '</td>
</tr>
</table>
<br />';
$output .= '
<table class="hidden center">
<tr>
<td>';
if ($user_lvl >= $action_permission["delete"] || $amIguildleader) {
makebutton(lang("guild", "del_guild"), "guild.php?action=del_guild&realm=" . $realm_id . "&id=" . $guild_id . "&name=" . $guild_data["name"] . "\" type=\"wrn", 130);
$output .= '
</td>
<td>';
}
makebutton(lang("guild", "guildbank"), "guildbank.php?id=" . $guild_id, 130);
$output .= '
</td>
<td>';
makebutton(lang("guild", "show_guilds"), "guild.php\" type=\"def", 130);
$output .= '
</td>
</tr>
</table>
</div>';
}
示例7: index
//.........这里部分代码省略.........
$output .= '
</td>
</tr>
<tr>
<th width="15%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=name&dir=' . $dir . '"' . ($order_by === 'name' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['name'] . '</a></th>
<th width="1%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=race&dir=' . $dir . '"' . ($order_by === 'race' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['race'] . '</a></th>
<th width="1%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=class&dir=' . $dir . '"' . ($order_by === 'class' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['class'] . '</a></th>
<th width="5%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=level&dir=' . $dir . '"' . ($order_by === 'level' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['level'] . '</a></th>
<th width="1%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=totalHonorPoints&dir=' . $dir . '"' . ($order_by === 'totalHonorPoints' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['rank'] . '</a></th>
<th width="15%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=guildid&dir=' . $dir . '"' . ($order_by === 'gname' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['guild'] . '</a></th>
<th width="20%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=map&dir=' . $dir . '"' . ($order_by === 'map ' . $order_dir . ', zone' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['map'] . '</a></th>
<th width="25%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=zone&dir=' . $dir . '"' . ($order_by === 'zone ' . $order_dir . ', map' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['zone'] . '</a></th>';
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$output .= '
<th width="1%">' . $lang_global['country'] . '</th>';
}
$output .= '
</tr>';
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
while ($char = $sqlc->fetch_assoc($result)) {
if ($order_by == 'ip') {
$temp = $sqlc->fetch_assoc($sqlc->query('
SELECT characters.guid, characters.name, characters.race, characters.class, characters.zone, characters.map, characters.level, characters.account, characters.gender, characters.totalHonorPoints,
COALESCE(guild_member.guildid,0) AS guildid
FROM characters LEFT JOIN guild_member ON guild_member.guid = characters.guid
WHERE characters.online= 1 ' . ($gm_online == '0' ? 'AND characters.extra_flags &1 = 0 ' : '') . $order_side . ' and account = ' . $char['id']));
if (isset($temp['guid'])) {
$char = $temp;
} else {
continue;
}
}
$gm = $sqlr->result($sqlr->query('
SELECT gmlevel
FROM account
WHERE id=' . $char['account'] . ''), 0);
$guild_name = $sqlc->result($sqlc->query('
SELECT name
FROM guild
WHERE guildid=' . $char['guildid'] . ''));
$output .= '
<tr>
<td>';
if ($user_lvl >= $gm) {
$output .= '
<a href="char.php?id=' . $char['guid'] . '">
<span onmousemove="toolTip(\'' . id_get_gm_level($gm) . '\', \'item_tooltip\')" onmouseout="toolTip()">' . htmlentities($char['name']) . '</span>
</a>';
} else {
$output .= '
' . htmlentities($char['name']) . '</span>';
}
$output .= '
</td>
<td>
<img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
</td>
<td>
<img src="img/c_icons/' . $char['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
</td>
<td>' . char_get_level_color($char['level']) . '</td>
<td>
<span onmouseover="toolTip(\'' . char_get_pvp_rank_name($char['totalHonorPoints'], char_get_side_id($char['race'])) . '\', \'item_tooltip\')" onmouseout="toolTip()" style="color: white;"><img src="img/ranks/rank' . char_get_pvp_rank_id($char['totalHonorPoints'], char_get_side_id($char['race'])) . '.gif" alt="" /></span>
</td>
<td>
<a href="guild.php?action=view_guild&error=3&id=' . $char['guildid'] . '">' . htmlentities($guild_name) . '</a>
</td>
<td>
<span onmousemove="toolTip(\'MapID:' . $char['map'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_map_name($char['map'], $sqlm) . '</span>
</td>
<td>
<span onmousemove="toolTip(\'ZoneID:' . $char['zone'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_zone_name($char['zone'], $sqlm) . '</span>
</td>';
if ($showcountryflag) {
$country = misc_get_country_by_account($char['account'], $sqlr, $sqlm);
$output .= '
<td>
' . ($country['code'] ? '<img src="img/flags/' . $country['code'] . '.png" onmousemove="toolTip(\'' . $country['country'] . '\',\'item_tooltip\')" onmouseout="toolTip()" alt="" />' : '-') . '
</td>';
}
$output .= '
</tr>';
}
$output .= '
<tr>';
$output .= '
<td colspan="' . (10 - $showcountryflag) . '" align="right" class="hidden" width="25%">';
$output .= generate_pagination('index.php?start_m=' . $start_m . '&order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $total_online, $itemperpage, $start);
unset($total_online);
$output .= '
</td>
</tr>
</table>
</fieldset>
<br />
</center>';
}
}
示例8: char_main
//.........这里部分代码省略.........
<img src="' . char_get_avatar_img($char["level"], $char["gender"], $char["race"], $char["class"], 0) . '" alt="avatar" />
</div>
<div>';
// this_is_junk: auras are stored in a string in the characters table.
// not sure how to query a string as though it were a record
if ($core == 1) {
} else {
$a_results = $sql["char"]->query("SELECT DISTINCT spell FROM character_aura WHERE guid='" . $id . "'");
}
if ($sql["char"]->num_rows($a_results)) {
while ($aura = $sql["char"]->fetch_assoc($a_results)) {
$output .= '
<a class="char_icon_padding" href="' . $base_datasite . $spell_datasite . $aura["spell"] . '" rel="external">
<img src="' . spell_get_icon($aura["spell"]) . '" alt="' . $aura["spell"] . '" width="24" height="24" />
</a>';
}
}
$output .= '
</div>
</td>
<td colspan="4">
<span class="bold">
' . htmlentities($char["name"], ENT_COMPAT, $site_encoding) . ' -
<img src="img/c_icons/' . $char["race"] . '-' . $char["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($char["race"]) . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
<img src="img/c_icons/' . $char["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($char["class"]) . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
- ' . lang("char", "level_short") . char_get_level_color($char["level"]) . '
</span>
<br />' . lang("char", "location") . ': ' . get_map_name($char["mapid"]) . ' - ' . get_zone_name($char["zoneid"]) . '
<br />' . lang("char", "honor_points") . ': ' . $char_data[PLAYER_FIELD_HONOR_CURRENCY] . ' | ' . lang("char", "arena_points") . ': ' . $char_data[PLAYER_FIELD_ARENA_CURRENCY] . ' | ' . lang("char", "honor_kills") . ': ' . $char_data[PLAYER_FIELD_LIFETIME_HONORBALE_KILLS] . '
<br />' . lang("char", "guild") . ': ' . $guild_name . ' | ' . lang("char", "rank") . ': ' . htmlentities($guild_rank, ENT_COMPAT, $site_encoding) . '
<br />' . lang("char", "online") . ': ' . ($char["online"] ? '<img src="img/up.gif" onmousemove="oldtoolTip(\'' . lang("char", "online") . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="online" />' : '<img src="img/down.gif" onmousemove="oldtoolTip(\'' . lang("char", "offline") . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="offline" />');
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$country = misc_get_country_by_account($char["acct"]);
$output .= ' | ' . lang("global", "country") . ': ' . ($country["code"] ? '<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />' : '-');
unset($country);
}
$output .= '
</td>
</tr>
<tr>
<td style="width: 6%;">';
if ($equiped_items[1][1]) {
$output .= '
<a class="char_icon_padding" href="' . $base_datasite . $item_datasite . $EQU_HEAD . '" rel="external" onmouseover="ShowTooltip(this,\'_b' . 'HEAD' . '\');" onmouseout="HideTooltip(\'_b' . 'HEAD' . '\');">
<img src="' . $equiped_items[1][1] . '" class="' . $equiped_items[1][2] . '" alt="Head" />
</a>';
if ($mode) {
$output .= '
<div style="position: relative;">
<a href="char.php?action=delete_item&id=' . $id . '&bag=' . $equiped_items[1][3]["bag"] . '&slot=' . $equiped_items[1][3]["slot"] . '&item=' . $equiped_items[1][3]["item_template"] . '&mode=' . $mode . '" id="ch_item_delete">
<img src="img/aff_cross.png" />
</a>
</div>';
}
// build a tooltip object for this item
$i_fields = get_item_info($equiped_items[1][3]["item_template"]);
$output .= '
<div class="item_tooltip" id="tooltip_b' . 'HEAD' . '">
<table>
<tr>
<td>
' . get_item_tooltip($i_fields, $equiped_items[1][3]["enchantment"], $equiped_items[1][3]["property"], $equiped_items[1][3]["creator"], $equiped_items[1][3]["durability"], $equiped_items[1][3]["flags"]) . '
</td>
</tr>
</table>
示例9: front
//.........这里部分代码省略.........
} else {
$result = $sqlc->query('SELECT characters.guid, characters.name, characters.race, characters.class, characters.zone, characters.map, characters.level, characters.account, characters.gender, characters.totalHonorPoints, COALESCE(guild_member.guildid,0) AS guildid FROM characters LEFT JOIN guild_member ON guild_member.guid = characters.guid WHERE characters.online = 1 ' . ($gm_online == '0' ? 'AND characters.extra_flags &1 = 0 ' : '') . $order_side . ' ORDER BY ' . $order_by . ' ' . $order_dir . ' LIMIT ' . $start . ', ' . $itemperpage);
}
$total_online = $sqlc->result($sqlc->query('SELECT count(*) FROM characters WHERE online= 1' . ($gm_online_count == '0' ? ' AND extra_flags &1 = 0' : '')), 0);
$replace = '
<tr>
<td align="right" class="hidden">' . generate_pagination('index.php?start=' . $start . '&order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1) . '', $all_record_m, 3, $start_m, 'start_m') . '</td>
</tr>';
unset($all_record_m);
$output = str_replace('%%REPLACE_TAG%%', $replace, $output);
unset($replace);
$output .= '
<font class="bold">' . $lang_index['tot_users_online'] . ': ' . $total_online . '</font>
<table class="lined">
<tr>
<td colspan="' . (10 - $showcountryflag) . '" align="right" class="hidden" width="25%">';
$output .= generate_pagination('index.php?start_m=' . $start_m . '&order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $total_online, $itemperpage, $start);
$output .= '
</td>
</tr>
<tr>
<th width="15%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=name&dir=' . $dir . '"' . ($order_by === 'name' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['name'] . '</a></th>
<th width="1%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=race&dir=' . $dir . '"' . ($order_by === 'race' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['race'] . '</a></th>
<th width="1%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=class&dir=' . $dir . '"' . ($order_by === 'class' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['class'] . '</a></th>
<th width="5%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=level&dir=' . $dir . '"' . ($order_by === 'level' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['level'] . '</a></th>
<th width="1%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=totalHonorPoints&dir=' . $dir . '"' . ($order_by === 'totalHonorPoints' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['rank'] . '</a></th>
<th width="15%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=guildid&dir=' . $dir . '"' . ($order_by === 'guildid' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['guild'] . '</a></th>
<th width="20%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=map&dir=' . $dir . '"' . ($order_by === 'map ' . $order_dir . ', zone' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['map'] . '</a></th>
<th width="25%"><a href="index.php?start=' . $start . '&start_m=' . $start_m . '&order_by=zone&dir=' . $dir . '"' . ($order_by === 'zone ' . $order_dir . ', map' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_index['zone'] . '</a></th>';
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$output .= '
<th width="1%">' . $lang_global['country'] . '</th>';
}
$output .= '
</tr>';
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
while ($char = $sqlc->fetch_assoc($result)) {
if ($order_by == 'ip') {
$temp = $sqlc->fetch_assoc($sqlc->query('SELECT characters.guid, characters.name, characters.race, characters.class, characters.zone, characters.map, characters.level, characters.account, characters.gender, characters.totalHonorPoints, COALESCE(guild_member.guildid,0) AS guildid FROM characters LEFT JOIN guild_member ON guild_member.guid = characters.guid WHERE characters.online= 1 ' . ($gm_online == '0' ? 'AND characters.extra_flags &1 = 0 ' : '') . $order_side . ' and account = ' . $char['id']));
if (isset($temp['guid'])) {
$char = $temp;
} else {
continue;
}
}
$gm = $sqlr->result($sqlr->query('SELECT gmlevel FROM account_access WHERE id=' . $char['account'] . ''), 0);
$guild_name = $sqlc->result($sqlc->query('SELECT name FROM guild WHERE guildid=' . $char['guildid'] . ''));
$output .= '
<tr>
<td>';
if ($user_lvl >= $gm) {
$output .= '
<a href="char.php?id=' . $char['guid'] . '">
<span onmousemove="toolTip(\'' . id_get_gm_level($gm) . '\', \'item_tooltip\')" onmouseout="toolTip()">' . htmlentities($char['name']) . '</span>
</a>';
} else {
$output .= '
<span onmousemove="toolTip(\'' . id_get_gm_level($gm) . '\', \'item_tooltip\')" onmouseout="toolTip()">' . htmlentities($char['name']) . '</span>';
}
$output .= '
</td>
<td>
<img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
</td>
<td>
<img src="img/c_icons/' . $char['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
</td>
<td>' . char_get_level_color($char['level']) . '</td>
<td>
<span onmouseover="toolTip(\'' . char_get_pvp_rank_name($char['totalHonorPoints'], char_get_side_id($char['race'])) . '\', \'item_tooltip\')" onmouseout="toolTip()" style="color: white;"><img src="img/ranks/rank' . char_get_pvp_rank_id($char['totalHonorPoints'], char_get_side_id($char['race'])) . '.gif" alt="" /></span>
</td>
<td>
<a href="guild.php?action=view_guild&error=3&id=' . $char['guildid'] . '">' . htmlentities($guild_name) . '</a>
</td>
<td><span onmousemove="toolTip(\'MapID:' . $char['map'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_map_name($char['map'], $sqlm) . '</span></td>
<td><span onmousemove="toolTip(\'ZoneID:' . $char['zone'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_zone_name($char['zone'], $sqlm) . '</span></td>';
if ($showcountryflag) {
$country = misc_get_country_by_account($char['account'], $sqlr, $sqlm);
$output .= '
<td>' . ($country['code'] ? '<img src="img/flags/' . $country['code'] . '.png" onmousemove="toolTip(\'' . $country['country'] . '\',\'item_tooltip\')" onmouseout="toolTip()" alt="" />' : '-') . '</td>';
}
$output .= '
</tr>';
}
$output .= '
<tr>';
$output .= '
<td colspan="' . (10 - $showcountryflag) . '" align="right" class="hidden" width="25%">';
$output .= generate_pagination('index.php?start_m=' . $start_m . '&order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $total_online, $itemperpage, $start);
unset($total_online);
$output .= '
</td>
</tr>
</table>
<br />
</center>';
}
}
示例10: browse_chars
//.........这里部分代码省略.........
$query_1 = $sqlc->query("SELECT count(*) FROM `characters`");
$query = $sqlc->query("SELECT characters.guid, characters.name, characters.account, characters.race, characters.class, characters.zone, characters.map, totalHonorPoints AS highest_rank,\r\n online,level, gender, logout_time, guild.guildid as gname\r\n FROM `characters`, guild_member, guild WHERE characters.guid = guild_member.guid AND guild_member.guildid = guild.guildid GROUP BY characters.guid ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
}
$all_record = $sqlc->result($query_1, 0);
unset($query_1);
$this_page = $sqlc->num_rows($query) or die(error($lang_global['err_no_result']));
//==========================top tage navigaion starts here========================
$output .= '
<script type="text/javascript" src="libs/js/check.js"></script>
<center>
<table class="top_hidden">
<tr>
<td>';
// cleanup unknown working condition
//if($user_lvl >= $action_permission['delete'])
// makebutton($lang_char_list['cleanup'], 'cleanup.php', 130);
makebutton($lang_global['back'], 'javascript:window.history.back()', 130);
$search_by && $search_value ? makebutton($lang_char_list['characters'], 'char_list.php" type="def', 130) : ($output .= '');
$output .= '
</td>
<td align="right" width="25%" rowspan="2">';
$output .= generate_pagination('char_list.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1) . ($search_value && $search_by ? '&search_by=' . $search_by . '&search_value=' . $search_value . '' : ''), $all_record, $itemperpage, $start);
$output .= "\r\n </td>\r\n </tr>\r\n <tr align=\"left\">\r\n <td>\r\n <table class=\"hidden\">\r\n <tr>\r\n <td>\r\n <form action=\"char_list.php\" method=\"get\" name=\"form\">\r\n <input type=\"hidden\" name=\"error\" value=\"3\" />\r\n <input type=\"text\" size=\"24\" maxlength=\"50\" name=\"search_value\" value=\"{$search_value}\" />\r\n <select name=\"search_by\">\r\n <option value=\"name\"" . ($search_by == 'name' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_name']}</option>\r\n <option value=\"guid\"" . ($search_by == 'guid' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_id']}</option>\r\n <option value=\"account\"" . ($search_by == 'account' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_account']}</option>\r\n <option value=\"level\"" . ($search_by == 'level' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_level']}</option>\r\n <option value=\"greater_level\"" . ($search_by == 'greater_level' ? " selected=\"selected\"" : "") . ">{$lang_char_list['greater_level']}</option>\r\n <option value=\"guild\"" . ($search_by == 'guild' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_guild']}</option>\r\n <option value=\"race\"" . ($search_by == 'race' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_race_id']}</option>\r\n <option value=\"class\"" . ($search_by == 'class' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_class_id']}</option>\r\n <option value=\"map\"" . ($search_by == 'map' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_map_id']}</option>\r\n <option value=\"highest_rank\"" . ($search_by == 'highest_rank' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_honor_kills']}</option>\r\n <option value=\"greater_rank\"" . ($search_by == 'greater_rank' ? " selected=\"selected\"" : "") . ">{$lang_char_list['greater_honor_kills']}</option>\r\n <option value=\"online\"" . ($search_by == 'online' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_online']}</option>\r\n <option value=\"gold\"" . ($search_by == 'gold' ? " selected=\"selected\"" : "") . ">{$lang_char_list['chars_gold']}</option>\r\n <option value=\"item\"" . ($search_by == 'item' ? " selected=\"selected\"" : "") . ">{$lang_char_list['by_item']}</option>\r\n </select>\r\n </form>\r\n </td>\r\n <td>";
makebutton($lang_global['search'], 'javascript:do_submit()', 80);
$output .= '
</td>
</tr>
</table>
</td>
</tr>
</table>';
//==========================top tage navigaion ENDS here ========================
$output .= "\r\n <form method=\"get\" action=\"char_list.php\" name=\"form1\">\r\n <input type=\"hidden\" name=\"action\" value=\"del_char_form\" />\r\n <input type=\"hidden\" name=\"start\" value=\"{$start}\" />\r\n <table class=\"lined\">\r\n <tr>\r\n <th width=\"1%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=guid&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'guid' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['id']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=name&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'name' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['char_name']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=account&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'account' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['account']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=race&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'race' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['race']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=class&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'class' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['class']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=level&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'level' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['level']}</a></th>\r\n <th width=\"10%\"><a href=\"char_list.php?order_by=map&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'map ' . $order_dir . ', zone' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['map']}</a></th>\r\n <th width=\"10%\"><a href=\"char_list.php?order_by=zone&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'zone ' . $order_dir . ', map' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['zone']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=highest_rank&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'highest_rank' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['honor_kills']}</a></th>\r\n <th width=\"10%\"><a href=\"char_list.php?order_by=gname&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'gname' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['guild']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=logout_time&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'logout_time' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['lastseen']}</a></th>\r\n <th width=\"1%\"><a href=\"char_list.php?order_by=online&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'online' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['online']}</a></th>";
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$output .= '
<th width="1%">' . $lang_global['country'] . '</th>';
}
$output .= '
</tr>';
$looping = $this_page < $itemperpage ? $this_page : $itemperpage;
for ($i = 1; $i <= $looping; $i++) {
$char = $sqlr->fetch_row($query) or die(error($lang_global['err_no_user']));
// to disalow lower lvl gm to view accounts of other gms
$result = $sqlr->query("SELECT gmlevel, username FROM account WHERE id ='{$char['2']}'");
$owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
if ($owner_gmlvl == null) {
$owner_gmlvl = 0;
}
$owner_acc_name = $sqlr->result($result, 0, 'username');
$lastseen = date('Y-m-d G:i:s', $char[11]);
$guild_name = $sqlc->fetch_row($sqlc->query('SELECT name FROM guild WHERE guildid = ' . $char[12] . ''));
if ($user_lvl >= $owner_gmlvl || $owner_acc_name == $user_name) {
$output .= '
<tr>
<td>';
if ($user_lvl >= $action_permission['delete'] || $owner_acc_name == $user_name) {
$output .= '
<input type="checkbox" name="check[]" value="' . $char[0] . '" onclick="CheckCheckAll(document.form1);" />';
}
$output .= "\r\n </td>\r\n <td>{$char['0']}</td>\r\n <td><a href=\"char.php?id={$char['0']}\">" . htmlentities($char[1]) . "</a></td>\r\n <td><a href=\"user.php?action=edit_user&error=11&id={$char['2']}\">" . htmlentities($owner_acc_name) . "</a></td>\r\n <td><img src='img/c_icons/{$char[3]}-{$char[10]}.gif' onmousemove='toolTip(\"" . char_get_race_name($char[3]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" /></td>\r\n <td><img src='img/c_icons/{$char[4]}.gif' onmousemove='toolTip(\"" . char_get_class_name($char[4]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" /></td>\r\n <td>" . char_get_level_color($char[9]) . "</td>\r\n <td class=\"small\"><span onmousemove='toolTip(\"MapID:" . $char[6] . "\",\"item_tooltip\")' onmouseout='toolTip()'>" . get_map_name($char[6], $sqlm) . "</span></td>\r\n <td class=\"small\"><span onmousemove='toolTip(\"ZoneID:" . $char[5] . "\",\"item_tooltip\")' onmouseout='toolTip()'>" . get_zone_name($char[5], $sqlm) . "</span></td>\r\n <td>{$char['7']}</td>\r\n <td class=\"small\"><a href=\"guild.php?action=view_guild&error=3&id={$char['12']}\">" . htmlentities($guild_name[0]) . "</a></td>\r\n <td class=\"small\">{$lastseen}</td>\r\n <td>" . ($char[8] ? "<img src=\"img/up.gif\" alt=\"\" />" : "-") . "</td>";
if ($showcountryflag) {
$country = misc_get_country_by_account($char[2], $sqlr, $sqlm);
$output .= "\r\n <td>" . ($country['code'] ? "<img src='img/flags/" . $country['code'] . ".png' onmousemove='toolTip(\"" . $country['country'] . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />" : "-") . "</td>";
}
$output .= '
</tr>';
} else {
$output .= '
<tr>
<td>*</td><td>***</td><td>***</td><td>You</td><td>Have</td><td>No</td><td class=\\"small\\">Permission</td><td>to</td><td>View</td><td>this</td><td>Data</td><td>***</td><td>*</td>';
if ($showcountryflag) {
$output .= '<td>*</td>';
}
$output .= '
</tr>';
}
}
unset($char);
unset($result);
$output .= '
<tr>
<td colspan="13" align="right" class="hidden" width="25%">';
$output .= generate_pagination('char_list.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1) . ($search_value && $search_by ? '&search_by=' . $search_by . '&search_value=' . $search_value . '' : ''), $all_record, $itemperpage, $start);
$output .= '
</td>
</tr>
<tr>
<td colspan="6" align="left" class="hidden">';
if ($user_lvl >= $action_permission['delete'] || $owner_acc_name == $user_name) {
makebutton($lang_char_list['del_selected_chars'], 'javascript:do_submit(\'form1\',0)" type="wrn', 220);
}
$output .= '
</td>
<td colspan="7" align="right" class="hidden">' . $lang_char_list['tot_chars'] . ' : ' . $all_record . '</td>
</tr>
</table>
</form>
</center>';
}
示例11: view_team
//.........这里部分代码省略.........
<td>
<img src="img/aff_cross.png" alt="" onclick="answerBox(\'' . lang("global", "delete") . '\': <spen class=\'color_white\'>' . $member[1] . '</span><br />' . lang("global", "are_you_sure") . '\', \'arenateam.php?action=rem_char_from_team&id=' . $member[0] . '&arenateam_id=' . $arenateam_id . '\');" id="arenateam_delete_cursor" />
</td>';
} else {
$output .= '
<td>
</td>';
}
if ($member[1]) {
$ww_pct = round(10000 * $member[2] / $member[1]) / 100;
} else {
$ww_pct = $member[1];
}
if ($member[3]) {
$ws_pct = round(10000 * $member[4] / $member[3]) / 100;
} else {
$ws_pct = $member[3];
}
$output .= '
<td><a href="char.php?id=' . $member[0] . '">' . htmlentities($member_char[1], ENT_COMPAT, $site_encoding) . '</a></td>
<td><img src="img/c_icons/' . $member_char[3] . '-' . $member_char[7] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($member_char[3]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" /></td>
<td><img src="img/c_icons/' . $member_char[4] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($member_char[4]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" /></td>
<td>' . $member[5] . '</td>
<td>' . get_days_with_color($member_char[6]) . '</td>
<td><img src="img/' . ($member_char[5] ? 'up' : 'down') . '.gif" alt="" /></td>
<td>' . $member[1] . '</td>
<td>' . $member[2] . '</td>
<td>' . $ww_pct . '</td>
<td>' . $member[3] . '</td>
<td>' . $member[4] . '</td>
<td>' . $ws_pct . '</td>';
if ($showcountryflag) {
require_once './libs/misc_lib.php';
$country = misc_get_country_by_account($member_char[0]);
$output .= '
<td>' . ($country["code"] ? '<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />' : '-') . '</td>';
}
$output .= '
</tr>';
}
} else {
while ($member = $sql["char"]->fetch_assoc($m_query)) {
$query = "SELECT account AS acct, name, level, race, class, online, logout_time AS timestamp, gender\r\n FROM characters WHERE guid='" . $member["guid"] . "'";
$result = $sql["char"]->query($query);
$member_char = $sql["char"]->fetch_assoc($result);
$accid = $member_char["acct"];
$output .= '
<tr>';
if ($user_lvl >= $action_permission["delete"] || $accid == $user_id) {
$output .= '
<td><img src="img/aff_cross.png" alt="" onclick="answerBox(\'' . lang("global", "delete") . '\': <span class=\'color_white\'>' . $member["name"] . '</span><br />' . lang("global", "are_you_sure") . '\', \'arenateam.php?action=rem_char_from_team&id=' . $member["guid"] . '&arenateam_id=' . $arenateam_id . '\');" class="arenateam_delete_cursor" /></td>';
} else {
$output .= '
<td>
</td>';
}
if ($member["played_week"]) {
$ww_pct = round(10000 * $member["wons_week"] / $member["played_week"]) / 100;
} else {
$ww_pct = $member["played_week"];
}
if ($member["played_season"]) {
$ws_pct = round(10000 * $member["wons_season"] / $member["played_season"]) / 100;
} else {
$ws_pct = $member["played_season"];
}
示例12: view_team
function view_team()
{
global $lang_arenateam, $lang_global, $output, $characters_db, $realm_id, $realm_db, $mmfpm_db, $action_permission, $user_lvl, $user_id, $showcountryflag;
if (!isset($_GET['id'])) {
redirect("arenateam.php?error=1");
}
$sqlc = new SQL();
$sqlc->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
$arenateam_id = $sqlc->quote_smart($_GET['id']);
$query = $sqlc->query("SELECT arenateamid, name, type FROM arena_team WHERE arenateamid = '{$arenateam_id}'");
$arenateam_data = $sqlc->fetch_row($query);
$query = $sqlc->query("SELECT arenateamid, rating, weekGames, weekWins, seasonGames, seasonWins, rank FROM arena_team WHERE arenateamid = '{$arenateam_id}'");
$arenateamstats_data = $sqlc->fetch_row($query);
$rating_offset = 1550;
if ($arenateam_data[2] == 3) {
$rating_offset += 6;
} else {
if ($arenateam_data[2] == 5) {
$rating_offset += 12;
}
}
$members = $sqlc->query("SELECT arena_team_member.guid,characters.name, arena_team_member.personalRating, level, arena_team_member.weekGames, arena_team_member.weekWins, arena_team_member.seasonGames, arena_team_member.seasonWins, characters.race, characters.class, characters.online, characters.account, characters.logout_time, gender, account FROM arena_team_member,characters LEFT JOIN arena_team_member k1 ON k1.guid=characters.guid AND k1.arenateamid='{$arenateam_id}' WHERE arena_team_member.arenateamid = '{$arenateam_id}' AND arena_team_member.guid=characters.guid ORDER BY characters.name");
$total_members = $sqlc->num_rows($members);
$losses_week = $arenateamstats_data[2] - $arenateamstats_data[3];
if ($arenateamstats_data[2]) {
$winperc_week = round(10000 * $arenateamstats_data[3] / $arenateamstats_data[2]) / 100;
} else {
$winperc_week = $arenateamstats_data[2];
}
$losses_season = $arenateamstats_data[4] - $arenateamstats_data[5];
if ($arenateamstats_data[4]) {
$winperc_season = round(10000 * $arenateamstats_data[5] / $arenateamstats_data[4]) / 100;
} else {
$winperc_season = $arenateamstats_data[4];
}
$output .= "\r\n <script type=\"text/javascript\">\r\n answerbox.btn_ok='{$lang_global['yes_low']}';\r\n answerbox.btn_cancel='{$lang_global['no']}';\r\n </script>\r\n <center>\r\n <fieldset>\r\n <legend>{$lang_arenateam['arenateam']} ({$arenateam_data[2]}v{$arenateam_data[2]})</legend>\r\n <table class=\"lined\" style=\"width: 100%;\">\r\n <tr class=\"bold\">\r\n <td colspan=\"" . ($showcountryflag ? 14 : 13) . "\">" . htmlentities($arenateam_data[1]) . "</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"" . ($showcountryflag ? 14 : 13) . "\">{$lang_arenateam['tot_members']}: {$total_members}</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"4\">{$lang_arenateam['this_week']}</td>\r\n <td colspan=\"2\">{$lang_arenateam['games_played']} : {$arenateamstats_data['2']}</td>\r\n <td colspan=\"2\">{$lang_arenateam['games_won']} : {$arenateamstats_data['3']}</td>\r\n <td colspan=\"2\">{$lang_arenateam['games_lost']} : {$losses_week}</td>\r\n <td colspan=\"" . ($showcountryflag ? 4 : 3) . "\">{$lang_arenateam['ratio']} : {$winperc_week} %</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"4\">{$lang_arenateam['this_season']}</td>\r\n <td colspan=\"2\">{$lang_arenateam['games_played']} : {$arenateamstats_data['4']}</td>\r\n <td colspan=\"2\">{$lang_arenateam['games_won']} : {$arenateamstats_data['5']}</td>\r\n <td colspan=\"2\">{$lang_arenateam['games_lost']} : {$losses_season}</td>\r\n <td colspan=\"" . ($showcountryflag ? 4 : 3) . "\">{$lang_arenateam['ratio']} : {$winperc_season} %</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"" . ($showcountryflag ? 14 : 13) . "\">{$lang_arenateam['standings']} {$arenateamstats_data[6]} ({$arenateamstats_data[1]})</td>\r\n </tr>\r\n <tr>\r\n <th width=\"1%\">{$lang_arenateam['remove']}</th>\r\n <th width=\"1%\">{$lang_arenateam['name']}</th>\r\n <th width=\"1%\">Race</th>\r\n <th width=\"1%\">Class</th>\r\n <th width=\"1%\">Personal Rating</th>\r\n <th width=\"1%\">Last Login (Days)</th>\r\n <th width=\"1%\">Online</th>\r\n <th width=\"1%\">{$lang_arenateam['played_week']}</th>\r\n <th width=\"1%\">{$lang_arenateam['wons_week']}</th>\r\n <th width=\"1%\">Win %</th>\r\n <th width=\"1%\">{$lang_arenateam['played_season']}</th>\r\n <th width=\"1%\">{$lang_arenateam['wons_season']}</th>\r\n <th width=\"1%\">Win %</th>";
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$sqlr = new SQL();
$sqlr->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
$output .= "\r\n <th width=\"1%\">{$lang_global['country']}</th>";
}
$output .= "\r\n </tr>";
while ($member = $sqlc->fetch_row($members)) {
$accid = $member[11];
$output .= "\r\n <tr>";
if ($user_lvl >= $action_permission['delete'] || $accid == $user_id) {
$output .= "\r\n <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[1]}</font><br />{$lang_global['are_you_sure']}', 'arenateam.php?action=rem_char_from_team&id={$member['0']}&arenateam_id={$arenateam_id}');\" style=\"cursor:pointer;\" /></td>";
} else {
$output .= "\r\n <td> </td>";
}
if ($member[4]) {
$ww_pct = round(10000 * $member[5] / $member[4]) / 100;
} else {
$ww_pct = $member[4];
}
if ($member[6]) {
$ws_pct = round(10000 * $member[7] / $member[6]) / 100;
} else {
$ws_pct = $member[6];
}
$output .= "\r\n <td><a href=\"char.php?id={$member['0']}\">" . htmlentities($member[1]) . "</a></td>\r\n <td><img src='img/c_icons/{$member[8]}-{$member[13]}.gif' onmousemove='toolTip(\"" . char_get_race_name($member[8]) . "\",\"item_tooltip\")' onmouseout='toolTip()' /></td>\r\n <td><img src='img/c_icons/{$member[9]}.gif' onmousemove='toolTip(\"" . char_get_class_name($member[9]) . "\",\"item_tooltip\")' onmouseout='toolTip()' /></td>\r\n <td>{$member['2']}</td>\r\n <td>" . get_days_with_color($member[12]) . "</td>\r\n <td>" . ($member[10] ? "<img src=\"img/up.gif\" alt=\"\" />" : "-") . "</td>\r\n <td>{$member['4']}</td>\r\n <td>{$member['5']}</td>\r\n <td>{$ww_pct} %</td>\r\n <td>{$member['6']}</td>\r\n <td>{$member['7']}</td>\r\n <td>{$ws_pct} %</td>";
if ($showcountryflag) {
$country = misc_get_country_by_account($member[14], $sqlr, $sqlm);
$output .= "\r\n <td>" . ($country['code'] ? "<img src='img/flags/" . $country['code'] . ".png' onmousemove='toolTip(\"" . $country['country'] . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />" : "-") . "</td>";
}
$output .= "\r\n </tr>";
}
$output .= "\r\n </table>\r\n <br />\r\n <table class=\"hidden\">\r\n <tr>\r\n <td>";
if ($user_lvl >= $action_permission['delete']) {
makebutton($lang_arenateam['del_team'], "arenateam.php?action=del_team&id={$arenateam_id}\" type=\"wrn", 180);
$output .= "\r\n </td>\r\n <td>";
makebutton($lang_arenateam['arenateams'], "arenateam.php\" type=\"def", 130);
$output .= "\r\n </td>\r\n </tr>\r\n <tr>\r\n </tr>";
} else {
makebutton($lang_arenateam['arenateams'], "arenateam.php", 130);
$output .= "\r\n </td>\r\n </tr>";
}
$output .= "\r\n </table>\r\n </fieldset>\r\n </center>";
}
示例13: browse_chars
//.........这里部分代码省略.........
$output .= "\n\t<table class=\"lined\">\n\t\t<tr>\n\t\t\t<th width=\"1%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=guid&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'guid' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['id']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=name&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'name' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['char_name']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=account&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'account' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['account']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=race&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'race' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['race']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=class&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'class' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['class']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=level&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'level' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['level']}</a></th>\n\t\t\t<th width=\"10%\"><a href=\"characters.php?order_by=map&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'map ' . $order_dir . ', zone' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['map']}</a></th>\n\t\t\t<th width=\"10%\"><a href=\"characters.php?order_by=zone&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'zone ' . $order_dir . ', map' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['zone']}</a></th>\n\t\t\t<th width=\"10%\"><a href=\"characters.php?order_by=gname&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'gname' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['guild']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=logout_time&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'logout_time' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['lastseen']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=online&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'online' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['online']}</a></th>";
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$output .= '
<th width="1%">' . $lang_global['country'] . '</th>';
}
$output .= '
</tr>';
$looping = $this_page < $itemperpage ? $this_page : $itemperpage;
for ($i = 1; $i <= $looping; $i++) {
$char = $sqlr->fetch_assoc($query) or die(error($lang_global['err_no_user']));
// to disalow lower lvl gm to view accounts of other gms
$result = $sqlr->query('
SELECT gmlevel, username
FROM account
WHERE id = ' . $char['account'] . '');
$owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
if ($owner_gmlvl == null) {
$owner_gmlvl = 0;
}
$owner_acc_name = $sqlr->result($result, 0, 'username');
$lastseen = date('Y-m-d G:i:s', $char['logout_time']);
$guild_name = $sqlc->fetch_assoc($sqlc->query('
SELECT name
FROM guild
WHERE guildid = ' . $char['gname'] . ''));
if ($user_lvl >= $owner_gmlvl || $owner_acc_name == $user_name) {
$output .= '
<tr>
<td>';
if ($user_lvl >= $action_permission['delete'] || $owner_acc_name == $user_name) {
$output .= '
<input type="checkbox" name="check[]" value="' . $char['guid'] . '" onclick="CheckCheckAll(document.form1);" />';
}
$output .= '
</td>
<td>' . $char['guid'] . '</td>
<td><a href="char.php?id=' . $char['guid'] . '">' . htmlentities($char['name']) . '</a></td>
<td><a href="accounts.php?action=edit_user&error=11&id=' . $char['account'] . '">' . htmlentities($owner_acc_name) . '</a></td>
<td><img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" /></td>
<td><img src="img/c_icons/' . $char['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\',\'item_tooltip\')" onmouseout="toolTip()" alt="" /></td>
<td>' . char_get_level_color($char['level']) . '</td>
<td class="small"><span onmousemove="toolTip(\'MapID:' . $char['map'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_map_name($char['map'], $sqlm) . '</span></td>
<td class="small"><span onmousemove="toolTip(\'ZoneID:' . $char['zone'] . '\',\'item_tooltip\')" onmouseout="toolTip()">' . get_zone_name($char['zone'], $sqlm) . '</span></td>
<td class="small"><a href="guild.php?action=view_guild&error=3&id=' . $char['gname'] . '">' . htmlentities($guild_name['name']) . '</a></td>
<td class="small">' . $lastseen . '</td>
<td>' . ($char['online'] ? "<img src=\"img/up.gif\" alt=\"\" />" : "-") . '</td>';
if ($showcountryflag) {
$country = misc_get_country_by_account($char['account'], $sqlr, $sqlm);
$output .= "\n\t\t\t<td>" . ($country['code'] ? "<img src='img/flags/" . $country['code'] . ".png' onmousemove='toolTip(\"" . $country['country'] . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />" : "-") . "</td>";
}
$output .= '
</tr>';
} else {
$output .= '
<tr>
<td>*</td><td>***</td><td>***</td><td>You</td><td>Have</td><td>No</td><td class=\\"small\\">Permission</td><td>to</td><td>View</td><td>this</td><td>Data</td><td>***</td><td>*</td>';
if ($showcountryflag) {
$output .= '
<td>*</td>';
}
$output .= '
</tr>';
}
}
unset($char);
unset($result);
$output .= '
</table>
<table class="lined">
<tr>
<th>
</th>
</tr>
</table>
<table class="lined">
<tr>
<td "class="hidden" align="left" width="25%">';
$output .= '
' . $lang_char_list['tot_chars'] . ' : ' . $all_record . '
</td>
<td "class="hidden" align="right" width="25%">';
$output .= generate_pagination('characters.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1) . ($search_value && $search_by ? '&search_by=' . $search_by . '&search_value=' . $search_value . '' : ''), $all_record, $itemperpage, $start);
$output .= '
</td>
</tr>
</table>
<table class="top_hidden">
<tr>
<td>';
if ($user_lvl >= $action_permission['delete'] || $owner_acc_name == $user_name) {
makebutton($lang_char_list['del_selected_chars'], 'javascript:do_submit(\'form1\',0)" type="wrn', 220);
}
$output .= '
</td>
</tr>
</table>
</form>
</center>';
}