本文整理汇总了PHP中char_get_class_name函数的典型用法代码示例。如果您正苦于以下问题:PHP char_get_class_name函数的具体用法?PHP char_get_class_name怎么用?PHP char_get_class_name使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了char_get_class_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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>';
}
}
示例2:
<?php
$output .= '
<fieldset>
<legend>Menu</legend>
<div id="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['char_sheet'] . '</a></li>
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['inventory'] . '</a></li>
<li><a href="char_extra.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['extra'] . '</a></li>
' . ($char['level'] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['talents'] . '</a></li>') . '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['achievements'] . '</a></li>
<li><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['reputation'] . '</a></li>
<li><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['skills'] . '</a></li>
<li><a href="char_spell.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['spells'] . '</a></li>
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['quests'] . '</a></li>';
if (char_get_class_name($char['class']) === 'Hunter') {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['pets'] . '</a></li>';
}
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['friends'] . '</a></li>
<li><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['mail'] . '</a></li>
</ul>
</div>
</fieldset>';
示例3: char_select
function char_select(&$sqlr, &$sqlm, &$sqlc)
{
global $output, $lang_rewards, $lang_global, $characters_db, $mmfpm_db, $realm_id, $user_id;
require_once 'libs/char_lib.php';
$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']);
$output .= '
<center>
<div id="tab_content">
<div id="tab">
<ul>
<li><a href="rewards.php">INFO</a></li>
<li id="selected"><a href="rewards.php?action=char_select">SELECT CHAR</a></li>
<li><a href="rewards.php?action=show_reward_gold">GOLD</a></li>
<li><a href="rewards.php?action=show_reward_item">ITEM</a></li>
</ul>
</div>
<div id="tab_content2">
<table class="lined" style="width: 200px;">
<tr>
<th align="center">
Select Character
</th>
</tr>';
$result = $sqlc->query('SELECT account, name, race, class, gender, level
FROM characters
WHERE account = ' . $user_id . '');
while ($char = $sqlc->fetch_assoc($result)) {
$output .= '
<tr>
<td align="right">
<font>
' . 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>
</td>
</tr>
<BR />';
}
unset($char);
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
$result = $sqlm->query('SELECT *
FROM mm_reward_char
WHERE account = ' . $user_id . '
LIMIT 1');
while ($char = $sqlc->fetch_assoc($result)) {
$output .= '
<tr>
<th align="center">
Selected Character
</th>
</tr>
<tr>
<td align="right">
<font>
' . 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>
</td>
</tr>';
}
$output .= '
</table>
</div>
<br />
</div>
</center>';
}
示例4: char_rep
//.........这里部分代码省略.........
<ul>
<li class="selected"><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
if ($view_inv_override) {
$output .= '
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "inventory") . '</a></li>';
}
if ($view_talent_override) {
$output .= '
' . ($char["level"] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "talents") . '</a></li>') . '';
}
if ($view_achieve_override) {
$output .= '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "achievements") . '</a></li>';
}
if ($view_quest_override) {
$output .= '
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "quests") . '</a></li>';
}
if ($view_friends_override) {
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "friends") . '</a></li>';
}
if ($view_view_override) {
$output .= '
<li><a href="char_view.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "view") . '</a></li>';
}
$output .= '
</ul>
</div>
<div class="tab_content center">
<div class="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
if (char_get_class_name($char["class"]) == "Hunter" && $view_pets_override) {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "pets") . '</a></li>';
}
$output .= '
<li class="selected"><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "reputation") . '</a></li>';
if ($view_skill_override) {
$output .= '
<li><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "skills") . '</a></li>';
}
if ($view_pvp_override) {
$output .= '
<li><a href="char_pvp.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "pvp") . '</a></li>';
}
if ($owner_name == $user_name || $user_lvl >= get_page_permission("insert", "char_mail.php")) {
$output .= '
<li><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "mail") . '</a></li>';
}
$output .= '
</ul>
</div>
<div class="tab_content2 center center_text">
<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 />
<br />';
$temp_out = array(1 => array('
<table class="lined" id="ch_rep_rep_alliance">
<tr>
<th colspan="3" align="left">
示例5: edit_user
//.........这里部分代码省略.........
$banned[3] = "";
}
if ($user_lvl >= $action_permission['update']) {
$output .= "\r\n <td><input type=\"checkbox\" name=\"banned\" value=\"1\" {$ban_checked}/>{$ban_info}</td>";
} else {
$output .= "\r\n <td>{$ban_info}</td>";
}
$output .= "\r\n </tr>\r\n <tr>\r\n <td>{$lang_user['banned_reason']}</td>";
if ($user_lvl >= $action_permission['update']) {
$output .= "\r\n <td><input type=\"text\" name=\"banreason\" size=\"42\" maxlength=\"255\" value=\"{$banned['3']}\" /></td>";
} else {
$output .= "\r\n <td>{$banned['3']}</td>";
}
if ($expansion_select) {
$output .= "\r\n </tr>\r\n <tr>";
if ($user_lvl >= $action_permission['update']) {
$output .= "\r\n <td>{$lang_user['client_type']}</td>";
$output .= "\r\n <td>\r\n <select name=\"expansion\">";
$output .= "\r\n <option value=\"0\">{$lang_user['classic']}</option>\r\n <option value=\"1\" ";
if ($data['expansion'] == 1) {
$output .= "selected=\"selected\" ";
}
$output .= ">{$lang_user['tbc']}</option>\r\n <option value=\"2\" ";
if ($data['expansion'] == 2) {
$output .= "selected=\"selected\" ";
}
$output .= ">{$lang_user['wotlk']}</option>\r\n </select>\r\n </td>";
} else {
$output .= "\r\n <td>{$lang_user['classic']}</td>";
}
}
$output .= "\r\n </tr>\r\n <tr>\r\n <td>{$lang_user['failed_logins_long']}</td>";
if ($user_lvl >= $action_permission['update']) {
$output .= '
<td><input type="text" name="failed" size="42" maxlength="3" value="' . $data['failed_logins'] . '" /></td>';
} else {
$output .= '
<td>' . $data['failed_logins'] . '</td>';
}
$output .= "\r\n </tr>\r\n <tr>\r\n <td>{$lang_user['locked']}</td>";
$lock_checked = $data['locked'] ? " checked=\"checked\"" : "";
if ($user_lvl >= $action_permission['update']) {
$output .= "\r\n <td><input type=\"checkbox\" name=\"locked\" value=\"1\" {$lock_checked}/></td>";
} else {
$output .= "\r\n <td></td>";
}
$output .= '
</tr>
<tr>
<td>' . $lang_user['last_login'] . '</td>
<td>' . $data['last_login'] . '</td>
</tr>
<tr>
<td>' . $lang_user['online'] . '</td>';
$output .= "\r\n <td>" . ($data['active_realm_id'] ? $lang_global['yes'] : $lang_global['no']) . "</td>\r\n </tr>";
$query = $sqlr->query("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '{$id}'");
$tot_chars = $sqlr->result($query, 0);
$query = $sqlc->query("SELECT count(*) FROM `characters` WHERE account = {$id}");
$chars_on_realm = $sqlc->result($query, 0);
$output .= "\r\n <tr>\r\n <td>{$lang_user['tot_chars']}</td>\r\n <td>{$tot_chars}</td>\r\n </tr>";
$realms = $sqlr->query("SELECT id, name FROM realmlist");
if ($developer_test_mode && $multi_realm_mode && ($sqlr->num_rows($realms) > 1 && count($server) > 1 && count($characters_db) > 1)) {
require_once "scripts/get_lib.php";
while ($realm = $sqlr->fetch_array($realms)) {
$sqlc->connect($characters_db[$realm[0]]['addr'], $characters_db[$realm[0]]['user'], $characters_db[$realm[0]]['pass'], $characters_db[$realm[0]]['name']);
$query = $sqlc->query("SELECT count(*) FROM `characters` WHERE account = {$id}");
$chars_on_realm = $sqlc->result($query, 0);
$output .= "\r\n <tr>\r\n <td>{$lang_user['chars_on_realm']} " . get_realm_name($realm[0]) . "</td>\r\n <td>{$chars_on_realm}</td>\r\n </tr>";
if ($chars_on_realm) {
$char_array = $sqlc->query("SELECT guid, name, race, class, level, gender\r\n FROM `characters` WHERE account = {$id}");
while ($char = $sqlc->fetch_array($char_array)) {
$output .= "\r\n <tr>\r\n <td> '---></td>\r\n <td>\r\n <a href=\"char.php?id={$char['0']}&realm={$realm['0']}\">{$char['1']} - <img src='img/c_icons/{$char[2]}-{$char[5]}.gif' onmousemove='toolTip(\"" . char_get_race_name($char[2]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />\r\n <img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"" . char_get_class_name($char[3]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\"/> - lvl " . char_get_level_color($char[4]) . "</a>\r\n </td>\r\n </tr>";
}
}
}
} else {
$query = $sqlc->query("SELECT count(*) FROM `characters` WHERE account = {$id}");
$chars_on_realm = $sqlc->result($query, 0);
$output .= "\r\n <tr>\r\n <td>{$lang_user['chars_on_realm']}</td>\r\n <td>{$chars_on_realm}</td>\r\n </tr>";
if ($chars_on_realm) {
$char_array = $sqlc->query("SELECT guid,name,race,class, level, gender FROM `characters` WHERE account = {$id}");
while ($char = $sqlc->fetch_array($char_array)) {
$output .= "\r\n <tr>\r\n <td> '---></td>\r\n <td>\r\n <a href=\"char.php?id={$char['0']}\">{$char['1']} - <img src='img/c_icons/{$char[2]}-{$char[5]}.gif' onmousemove='toolTip(\"" . char_get_race_name($char[2]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />\r\n <img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"" . char_get_class_name($char[3]) . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\"/> - lvl " . char_get_level_color($char[4]) . "</a>\r\n </td>\r\n </tr>";
}
}
}
$output .= "\r\n <tr>\r\n <td>";
if ($user_lvl >= $action_permission['delete']) {
makebutton($lang_user['del_acc'], "user.php?action=del_user&check%5B%5D={$id}\" type=\"wrn", 130);
}
$output .= "\r\n </td>\r\n <td>";
if ($user_lvl >= $action_permission['update']) {
makebutton($lang_user['update_data'], "javascript:do_submit_data()", 130);
}
makebutton($lang_global['back'], "javascript:window.history.back()\" type=\"def", 130);
$output .= "\r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n </fieldset>\r\n <br /><br />\r\n </center>\r\n";
} else {
error($lang_global['err_no_user']);
}
}
示例6: char_mail
function char_mail(&$sqlr, &$sqlc)
{
global $output, $lang_global, $lang_char, $lang_mail, $realm_id, $realm_db, $mmfpm_db, $characters_db, $action_permission, $user_lvl, $user_name, $item_datasite, $itemperpage;
if (empty($_GET['id'])) {
error($lang_global['empty_fields']);
}
// this is multi realm support, as of writing still under development
// this page is already implementing it
if (empty($_GET['realm'])) {
$realmid = $realm_id;
} else {
$realmid = $sqlr->quote_smart($_GET['realm']);
if (is_numeric($realmid)) {
$sqlc->connect($characters_db[$realmid]['addr'], $characters_db[$realmid]['user'], $characters_db[$realmid]['pass'], $characters_db[$realmid]['name']);
} else {
$realmid = $realm_id;
}
}
$id = $sqlc->quote_smart($_GET['id']);
if (is_numeric($id)) {
} else {
$id = 0;
}
//==========================$_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']) : 'id';
if (preg_match('/^[_[:lower:]]{1,12}$/', $order_by)) {
} else {
$order_by = 'id';
}
$dir = isset($_GET['dir']) ? $sqlc->quote_smart($_GET['dir']) : 1;
if (preg_match('/^[01]{1}$/', $dir)) {
} else {
$dir = 1;
}
$order_dir = $dir ? 'ASC' : 'DESC';
$dir = $dir ? 0 : 1;
//==========================$_GET and SECURE end=============================
// getting character data from database
$result = $sqlc->query('SELECT account, name, race, class, level, gender
FROM characters WHERE guid = ' . $id . ' LIMIT 1');
if ($sqlc->num_rows($result)) {
$char = $sqlc->fetch_assoc($result);
// we get user permissions first
$owner_acc_id = $sqlc->result($result, 0, 'account');
$result = $sqlr->query('SELECT gmlevel, username FROM account WHERE id = ' . $char['account'] . '');
$owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
$owner_name = $sqlr->result($result, 0, 'username');
if ($user_lvl > $owner_gmlvl || $owner_name === $user_name) {
//------------------------Character Tabs---------------------------------
// we start with a lead of 10 spaces,
// because last line of header is an opening tag with 8 spaces
// keep html indent in sync, so debuging from browser source would be easy to read
$output .= '
<center>
<div id="tab_content">
<div id="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['char_sheet'] . '</a></li>
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['inventory'] . '</a></li>
<li><a href="char_extra.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['extra'] . '</a></li>
' . ($char['level'] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['talents'] . '</a></li>') . '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['achievements'] . '</a></li>
<li><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['reputation'] . '</a></li>
<li><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['skills'] . '</a></li>
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['quests'] . '</a></li>';
if (char_get_class_name($char['class']) === 'Hunter') {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['pets'] . '</a></li>';
}
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['friends'] . '</a></li>
<li><a href="char_spell.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['spells'] . '</a></li>
</ul>
<ul>';
// selected char tab at last
$output .= '
<li id="selected"><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['mail'] . '</a></li>';
$output .= '
</ul>
</div>
<div id="tab_content2">
<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 /><br />
<table class="lined" style="width: 100%">';
//---------------Page Specific Starts Ends here----------------------------
$query = $sqlc->query('SELECT a.id as id, a.messageType as messagetype, a.sender as sender,
a.subject as subject, a.itemTextId as itemtextid, a.has_items as hasitems, a.money as money, a.cod as cod, a.checked as checked,
b.item_template as itemtemplate
FROM mail a INNER JOIN mail_items b ON a.id = b.mail_id where a.receiver = ' . $id . ' LIMIT ' . $start . ', ' . $itemperpage . '');
//.........这里部分代码省略.........
示例7: char_rep
function char_rep(&$sqlr, &$sqlc)
{
global $output, $lang_global, $lang_char, $realm_id, $characters_db, $mmfpm_db, $action_permission, $user_lvl, $user_name;
require_once 'libs/fact_lib.php';
$reputation_rank = fact_get_reputation_rank_arr();
$reputation_rank_length = fact_get_reputation_rank_length();
if (empty($_GET['id'])) {
error($lang_global['empty_fields']);
}
// this is multi realm support, as of writing still under development
// this page is already implementing it
if (empty($_GET['realm'])) {
$realmid = $realm_id;
} else {
$realmid = $sqlr->quote_smart($_GET['realm']);
if (is_numeric($realmid)) {
$sqlc->connect($characters_db[$realmid]['addr'], $characters_db[$realmid]['user'], $characters_db[$realmid]['pass'], $characters_db[$realmid]['name']);
} else {
$realmid = $realm_id;
}
}
$id = $sqlc->quote_smart($_GET['id']);
if (is_numeric($id)) {
} else {
$id = 0;
}
$result = $sqlc->query('SELECT account, name, race, class, level, gender FROM characters WHERE guid = ' . $id . ' LIMIT 1');
if ($sqlc->num_rows($result)) {
$char = $sqlc->fetch_assoc($result);
// we get user permissions first
$owner_acc_id = $sqlc->result($result, 0, 'account');
$result = $sqlr->query('SELECT gmlevel, username FROM account WHERE id = ' . $char['account'] . '');
$owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
$owner_name = $sqlr->result($result, 0, 'username');
if ($user_lvl > $owner_gmlvl || $owner_name === $user_name) {
$result = $sqlc->query('SELECT faction, standing FROM character_reputation WHERE guid = ' . $id . ' AND (flags & 1 = 1)');
$output .= '
<center>
<div id="tab_content">
<div id="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['char_sheet'] . '</a></li>
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['inventory'] . '</a></li>
<li><a href="char_extra.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['extra'] . '</a></li>
' . ($char['level'] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['talents'] . '</a></li>') . '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['achievements'] . '</a></li>
<li><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['skills'] . '</a></li>
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['quests'] . '</a></li>';
if (char_get_class_name($char['class']) === 'Hunter') {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['pets'] . '</a></li>';
}
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['friends'] . '</a></li>
<li><a href="char_spell.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['spells'] . '</a></li>
<li><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['mail'] . '</a></li>
</ul>
<ul>';
// selected char tab at last
$output .= '
<li id="selected"><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['reputation'] . '</a></li>';
$output .= '
</ul>
</div>
<div id="tab_content2">
<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 /><br />';
$temp_out = array(1 => array('
<table class="lined" style="width: 550px;">
<tr>
<th colspan="3" align="left">
<div id="divi1" onclick="expand(\'i1\', this, \'Alliance\')">[-] Alliance</div>
</th>
</tr>
<tr>
<td>
<table id="i1" class="lined" style="width: 535px; display: table;">', 0), 2 => array('
<table class="lined" style="width: 550px;">
<tr>
<th colspan="3" align="left">
<div id="divi2" onclick="expand(\'i2\', this, \'Horde\')">[-] Horde</div>
</th>
</tr>
<tr>
<td>
<table id="i2" class="lined" style="width: 535px; display: table;">', 0), 3 => array('
<table class="lined" style="width: 550px;">
<tr>
<th colspan="3" align="left">
<div id="divi3" onclick="expand(\'i3\', this, \'Alliance Forces\')">[-] Alliance Forces</div>
</th>
</tr>
<tr>
<td>
//.........这里部分代码省略.........
示例8: show_list
function show_list()
{
global $realm_id, $output, $logon_db, $characters_db, $itemperpage, $action_permission, $user_lvl, $sql, $core;
valid_login($action_permission["view"]);
if ($core == 1) {
$query = "SELECT * FROM characters WHERE acct='" . $_SESSION["user_id"] . "'";
} else {
$query = "SELECT * FROM characters WHERE account='" . $_SESSION["user_id"] . "'";
}
$result = $sql["char"]->query($query);
$num_rows = $sql["char"]->num_rows($result);
$output .= '
<table class="top_hidden">
<tr>
<td>
<div class="half_frame fieldset_border center">
<span class="legend">' . lang("ultra", "selectchar") . '</span>';
if ($num_rows == 0) {
// Localization
$nochars = lang("ultra", "nochars");
$nochars = str_replace("%1", $_SESSION["login"], $nochars);
$output .= '
<table>
<tr>
<td>
<b>' . $nochars . '</b>
</td>
</tr>
<tr>
<td>';
makebutton(lang("global", "back"), "javascript:window.history.back()\" type=\"def", 130);
$output .= '
</td>
</tr>
</table>';
} else {
$output .= '
<form method="get" action="ultra_vendor.php" id="form">
<div>
<input type="hidden" name="action" value="selected_char" />
</div>
<table class="lined" id="xname_char_table">
<tr>
<th class="xname_radio"> </th>
<th class="xname_name">' . lang("xname", "char") . '</th>
<th class="xname_LRC">' . lang("xname", "lvl") . '</th>
<th class="xname_LRC">' . lang("xname", "race") . '</th>
<th class="xname_LRC">' . lang("xname", "class") . '</th>
</tr>';
if ($num_rows > 1) {
while ($field = $sql["char"]->fetch_assoc($result)) {
$output .= '
<tr>
<td>
<input type="radio" name="charname" value="' . $field["name"] . '" />
</td>
<td>' . $field["name"] . '</td>
<td>' . char_get_level_color($field["level"]) . '</td>
<td>
<img src="img/c_icons/' . $field["race"] . '-' . $field["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($field["race"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
<td>
<img src="img/c_icons/' . $field["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($field["class"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
</tr>';
}
} else {
$field = $sql["char"]->fetch_assoc($result);
$output .= '
<tr>
<td>
<input type="radio" name="charname" value="' . $field["name"] . '" checked="true" />
</td>
<td>' . $field["name"] . '</td>
<td>' . char_get_level_color($field["level"]) . '</td>
<td>
<img src="img/c_icons/' . $field["race"] . '-' . $field["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($field["race"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
<td>
<img src="img/c_icons/' . $field["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($field["class"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
</td>
</tr>';
}
$output .= '
<tr>
<td class="hidden" colspan="3">';
makebutton(lang("ultra", "select"), "javascript:do_submit()\" type=\"def", 180);
$output .= '
</td>
<td class="hidden" colspan="2">';
makebutton(lang("global", "back"), "javascript:window.history.back()\" type=\"def", 130);
$output .= '
</td>
</tr>
</table>
</form>';
}
$output .= '
</div>
//.........这里部分代码省略.........
示例9: char_main
//.........这里部分代码省略.........
if ($view_inv_override) {
$output .= '
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "inventory") . '</a></li>';
}
if ($view_talent_override) {
$output .= '
' . ($char["level"] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "talents") . '</a></li>') . '';
}
if ($view_achieve_override) {
$output .= '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "achievements") . '</a></li>';
}
if ($view_quest_override) {
$output .= '
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "quests") . '</a></li>';
}
if ($view_friends_override) {
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "friends") . '</a></li>';
}
if ($view_view_override) {
$output .= '
<li><a href="char_view.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "view") . '</a></li>';
}
$output .= '
</ul>
</div>';
if ($view_override || $user_lvl > $owner_gmlvl || $owner_name === $user_name || $user_lvl == $action_permission["delete"]) {
$output .= '
<div class="tab_content center">
<div class="tab">
<ul>
<li class="selected"><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
if (char_get_class_name($char["class"]) === "Hunter" && $view_pets_override) {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "pets") . '</a></li>';
}
if ($view_rep_override) {
$output .= '
<li><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "reputation") . '</a></li>';
}
if ($view_skill_override) {
$output .= '
<li><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "skills") . '</a></li>';
}
if ($view_pvp_override) {
$output .= '
<li><a href="char_pvp.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "pvp") . '</a></li>';
}
if ($owner_name == $user_name || $user_lvl >= get_page_permission("insert", "char_mail.php")) {
$output .= '
<li><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "mail") . '</a></li>';
}
$output .= '
</ul>
</div>';
} else {
$output .= '
<div class="tab_content center">
<div class="tab">
</div>';
}
$output .= '
<div class="tab_content2 center">
<table class="lined" id="char_character_sheet">
<tr>
示例10: view_raffle
//.........这里部分代码省略.........
}
$char_list[] = $realm_char_list;
}
for ($i = 0; $i < count($char_list); $i++) {
$realm_chars = $char_list[$i];
$cur_realm = $realm_list[$i];
$realm_name_query = "SELECT * FROM config_servers WHERE `Index`='" . $cur_realm . "'";
$realm_name_result = $sql["mgr"]->query($realm_name_query);
$realm_name_result = $sql["mgr"]->fetch_assoc($realm_name_result);
$cur_realm_name = $realm_name_result["Name"];
$sqlt = new SQL();
$sqlt->connect($characters_db[$cur_realm]["addr"], $characters_db[$cur_realm]["user"], $characters_db[$cur_realm]["pass"], $characters_db[$cur_realm]["name"], $characters_db[$cur_realm]["encoding"]);
if (count($realm_list) > 1) {
$output .= '
<div class="coupon_part_chars">
<span>' . $cur_realm_name . '</span>
</div>';
}
$output .= '
<div class="coupon_part_chars">
<div class="fake_table">';
$first = true;
// we want the first character to be selected
foreach ($realm_chars as $row) {
if ($core == 1) {
$char_query = "SELECT *, gold AS money FROM characters WHERE guid='" . $row . "'";
} else {
$char_query = "SELECT * FROM characters WHERE guid='" . $row . "'";
}
$char_result = $sqlt->query($char_query);
$char = $sqlt->fetch_assoc($char_result);
// extract gold/silver/copper from single gold number
$char["money"] = str_pad($char["money"], 4, "0", STR_PAD_LEFT);
$char_g = substr($char["money"], 0, -4);
if ($char_g == "") {
$char_g = 0;
}
$char_s = substr($char["money"], -4, 2);
if ($char_s == "" || $char_s == "00") {
$char_s = 0;
}
$char_c = substr($char["money"], -2);
if ($char_c == "" || $char_c == "00") {
$char_c = 0;
}
$output .= '
<div class="fake_table_cell">
<input type="radio" name="money_character" value="' . ($i + 1) . "-" . $row . '-' . $char["name"] . '"' . (isset($first) ? ' checked="checked"' : '') . ($char["online"] || $char["money"] < $raffle["cost_money"] ? ' disabled="disabled"' : '') . ' />
<a href="char.php?id=' . $row . '&realm=' . $cur_realm . '">' . $char["name"] . '</a> - <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"]) . '
</div>
<div class="fake_table_cell">
<span>' . $char_g . '</span>
<img src="img/gold.gif" alt="gold" style="position: relative; bottom: -6px;" />
<span>' . $char_s . '</span>
<img src="img/silver.gif" alt="silver" style="position: relative; bottom: -6px;" />
<span>' . $char_c . '</span>
<img src="img/copper.gif" alt="copper" style="position: relative; bottom: -6px;" />
</div>';
unset($first);
}
}
}
$output .= '
</div>
</div>
</td>
</tr>';
}
if ($raffle["tickets_per_user"] > 1) {
$output .= '
<tr>
<td>
<div class="coupon_parts">' . lang("points", "tickets_purchased") . ': <b>' . $my_usage_count . '</b></div>
</td>
</tr>';
}
$output .= '
<tr>
<td align="right">
<a href="javascript:do_submit(\'form1\',0)">
<img src="img/aff_tick.png" width="16" height="16" alt="" />
<span> ' . lang("points", "confirm_purchase") . '</span>
</a>
</td>
</tr>
</table>
</form>';
}
} else {
$output .= '
<div class="tab_content center">';
$output .= '
<span>' . lang("points", "purchased") . '</span>';
}
$output .= '
</div>
<br />
<!-- end of point_system.php -->';
}
示例11: char_inv
//.........这里部分代码省略.........
<ul>
<li><a href="char.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
$output .= '
<li class="selected"><a href="char_inv.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "inventory") . '</a></li>';
if ($view_talent_override) {
$output .= '
' . ($char["level"] < 10 ? '' : '<li><a href="char_talent.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "talents") . '</a></li>') . '';
}
if ($view_achieve_override) {
$output .= '
<li><a href="char_achieve.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "achievements") . '</a></li>';
}
if ($view_quest_override) {
$output .= '
<li><a href="char_quest.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "quests") . '</a></li>';
}
if ($view_friends_override) {
$output .= '
<li><a href="char_friends.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "friends") . '</a></li>';
}
if ($view_view_override) {
$output .= '
<li><a href="char_view.php?id=' . $cid . '&realm=' . $realmid . '">' . lang("char", "view") . '</a></li>';
}
$output .= '
</ul>
</div>
<div class="tab_content center" id="ch_inv_bags_wrap">
<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 />
<br />
<table class="lined" id="ch_inv_bags">
<tr>';
//---------------Page Specific Data Starts Here--------------------------
// equipped bags
for ($i = 4; $i > 0; --$i) {
$output .= '
<th>';
if ($equiped_bag_id[$i]) {
$output .= '
<a href="' . $base_datasite . $item_datasite . $equiped_bag_id[$i][0] . '" rel="external">
<img class="bag_icon" src="' . get_item_icon($equiped_bag_id[$i][0]) . '" alt="" />
</a>
' . lang("item", "bag") . ' ' . $i . '<br />
<span class="small">' . $equiped_bag_id[$i][1] . ' ' . lang("item", "slots") . '</span>';
}
$output .= '
</th>';
}
$output .= '
</tr>
<tr>';
// equipped bag slots
for ($t = 4; $t > 0; --$t) {
// this_is_junk: style left hardcoded because it's calculated.
$output .= '
<td align="center">
<div class="bag" style="width: ' . 4 * 43 . 'px; height: ' . ceil($equiped_bag_id[$t][1] / 4) * 41 . 'px;">';
$dsp = $equiped_bag_id[$t][1] % 4;
if ($dsp) {
示例12: edit_user
//.........这里部分代码省略.........
$sql["char"]->connect($characters_db[$realm["Index"]]["addr"], $characters_db[$realm["Index"]]["user"], $characters_db[$realm["Index"]]["pass"], $characters_db[$realm["Index"]]["name"], $characters_db[$realm["Index"]]["encoding"]);
if ($core == 1) {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, gender, timestamp,\n IFNULL((SELECT SUM(points) FROM character_achievement LEFT JOIN `" . $dbc_db["name"] . "`.achievement ON `" . $dbc_db["name"] . "`.achievement.id=character_achievement.achievement WHERE character_achievement.guid=characters.guid), 0) AS ach_points\n FROM characters WHERE acct='" . $user_id . "'");
} else {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, gender, logout_time AS timestamp,\n IFNULL((SELECT SUM(points) FROM character_achievement LEFT JOIN `" . $dbc_db["name"] . "`.achievement ON `" . $dbc_db["name"] . "`.achievement.id=character_achievement.achievement WHERE character_achievement.guid=characters.guid), 0) AS ach_points\n FROM characters WHERE account='" . $user_id . "'");
}
// calculate timezone offset
$time_offset = $timezone_offset * 3600;
$output .= '
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3">' . lang("index", "realm") . ': ' . $realm["Name"] . '</td>
</tr>
<tr>
<td>' . lang("edit", "characters") . ':</td>
<td>' . $sql["char"]->num_rows($result) . '</td>
</tr>';
while ($char = $sql["char"]->fetch_assoc($result)) {
if ($char["timestamp"] != 0) {
$lastseen = date("F j, Y @ Hi", $char["timestamp"] + $time_offset);
} else {
$lastseen = '-';
}
// add this character's achievement points to our total
$total_achieve_points += $char["ach_points"];
$output .= '
<tr>
<td> \'---></td>
<td>
<a href="char.php?id=' . $char["guid"] . '&realm=' . $realm["Index"] . '">' . $char["name"] . '</a> -
<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"]) . '
</td>
<td>' . $lastseen . '</td>
</tr>';
}
}
unset($realm);
} else {
if ($core == 1) {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, gender, timestamp,\n IFNULL((SELECT SUM(points) FROM character_achievement LEFT JOIN `" . $dbc_db["name"] . "`.achievement ON `" . $dbc_db["name"] . "`.achievement.id=character_achievement.achievement WHERE character_achievement.guid=characters.guid), 0) AS ach_points\n FROM characters WHERE acct='" . $user_id . "'");
} else {
$result = $sql["char"]->query("SELECT guid, name, race, class, level, gender, logout_time AS timestamp,\n IFNULL((SELECT SUM(points) FROM character_achievement LEFT JOIN `" . $dbc_db["name"] . "`.achievement ON `" . $dbc_db["name"] . "`.achievement.id=character_achievement.achievement WHERE character_achievement.guid=characters.guid), 0) AS ach_points\n FROM characters WHERE account='" . $user_id . "'");
}
// calculate timezone offset
$time_offset = $timezone_offset * 3600;
$output .= '
<!-- tr>
<td>' . lang("edit", "characters") . ':</td>
<td>' . $sql["char"]->num_rows($result) . '</td>
</tr -->';
while ($char = $sql["char"]->fetch_assoc($result)) {
if ($char["timestamp"] != 0) {
$lastseen = date("F j, Y @ Hi", $char["timestamp"] + $time_offset);
} else {
$lastseen = '-';
}
// add this character's achievement points to our total
$total_achieve_points += $char["ach_points"];
$output .= '
<tr>
<td> \'---></td>
<td>
<a href="char.php?id=' . $char["guid"] . '">' . $char["name"] . '</a> -
示例13: char_skill
//.........这里部分代码省略.........
<ul>
<li class="selected"><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
if ($view_inv_override) {
$output .= '
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "inventory") . '</a></li>';
}
if ($view_talent_override) {
$output .= '
' . ($char["level"] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "talents") . '</a></li>') . '';
}
if ($view_achieve_override) {
$output .= '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "achievements") . '</a></li>';
}
if ($view_quest_override) {
$output .= '
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "quests") . '</a></li>';
}
if ($view_friends_override) {
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "friends") . '</a></li>';
}
if ($view_view_override) {
$output .= '
<li><a href="char_view.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "view") . '</a></li>';
}
$output .= '
</ul>
</div>
<div class="tab_content center">
<div class="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
if (char_get_class_name($char["class"]) == "Hunter" && $view_pets_override) {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "pets") . '</a></li>';
}
if ($view_rep_override) {
$output .= '
<li><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "reputation") . '</a></li>';
}
$output .= '
<li class="selected"><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "skills") . '</a></li>';
if ($view_pvp_override) {
$output .= '
<li><a href="char_pvp.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "pvp") . '</a></li>';
}
if ($owner_name == $user_name || $user_lvl >= get_page_permission("insert", "char_mail.php")) {
$output .= '
<li><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "mail") . '</a></li>';
}
$output .= '
</ul>
</div>
<div class="tab_content2 center center_text">
<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 />
<br />
<table class="lined" id="ch_ski_main">
<tr>
<th class="title" colspan="' . ($user_lvl ? '3' : '2') . '" align="left">' . lang("char", "skills") . '</th>
</tr>
示例14: 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>';
}
}
示例15: char_main
//.........这里部分代码省略.........
9 => array(($EQU_WRIST ? get_item_tooltip($EQU_WRIST) : 0),($EQU_WRIST ? get_item_icon($EQU_WRIST) : 0),($EQU_WRIST ? get_item_border($EQU_WRIST) : 0)),
10 => array(($EQU_GLOVES ? get_item_tooltip($EQU_GLOVES) : 0),($EQU_GLOVES ? get_item_icon($EQU_GLOVES) : 0),($EQU_GLOVES ? get_item_border($EQU_GLOVES) : 0)),
11 => array(($EQU_FINGER1 ? get_item_tooltip($EQU_FINGER1) : 0),($EQU_FINGER1 ? get_item_icon($EQU_FINGER1) : 0),($EQU_FINGER1 ? get_item_border($EQU_FINGER1) : 0)),
12 => array(($EQU_FINGER2 ? get_item_tooltip($EQU_FINGER2) : 0),($EQU_FINGER2 ? get_item_icon($EQU_FINGER2) : 0),($EQU_FINGER2 ? get_item_border($EQU_FINGER2) : 0)),
13 => array(($EQU_TRINKET1 ? get_item_tooltip($EQU_TRINKET1) : 0),($EQU_TRINKET1 ? get_item_icon($EQU_TRINKET1) : 0),($EQU_TRINKET1 ? get_item_border($EQU_TRINKET1) : 0)),
14 => array(($EQU_TRINKET2 ? get_item_tooltip($EQU_TRINKET2) : 0),($EQU_TRINKET2 ? get_item_icon($EQU_TRINKET2) : 0),($EQU_TRINKET2 ? get_item_border($EQU_TRINKET2) : 0)),
15 => array(($EQU_BACK ? get_item_tooltip($EQU_BACK) : 0),($EQU_BACK ? get_item_icon($EQU_BACK) : 0),($EQU_BACK ? get_item_border($EQU_BACK) : 0)),
16 => array(($EQU_MAIN_HAND ? get_item_tooltip($EQU_MAIN_HAND) : 0),($EQU_MAIN_HAND ? get_item_icon($EQU_MAIN_HAND) : 0),($EQU_MAIN_HAND ? get_item_border($EQU_MAIN_HAND) : 0)),
17 => array(($EQU_OFF_HAND ? get_item_tooltip($EQU_OFF_HAND) : 0),($EQU_OFF_HAND ? get_item_icon($EQU_OFF_HAND) : 0),($EQU_OFF_HAND ? get_item_border($EQU_OFF_HAND) : 0)),
18 => array(($EQU_RANGED ? get_item_tooltip($EQU_RANGED) : 0),($EQU_RANGED ? get_item_icon($EQU_RANGED) : 0),($EQU_RANGED ? get_item_border($EQU_RANGED) : 0)),
19 => array(($EQU_TABARD ? get_item_tooltip($EQU_TABARD) : 0),($EQU_TABARD ? get_item_icon($EQU_TABARD) : 0),($EQU_TABARD ? get_item_border($EQU_TABARD) : 0))
);
*/
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
$sqlw = new SQL();
$sqlw->connect($world_db[$realmid]['addr'], $world_db[$realmid]['user'], $world_db[$realmid]['pass'], $world_db[$realmid]['name']);
$equiped_items = array(1 => array('', $EQU_HEAD ? get_item_icon($EQU_HEAD, $sqlm, $sqlw) : 0, $EQU_HEAD ? get_item_border($EQU_HEAD, $sqlw) : 0), 2 => array('', $EQU_NECK ? get_item_icon($EQU_NECK, $sqlm, $sqlw) : 0, $EQU_NECK ? get_item_border($EQU_NECK, $sqlw) : 0), 3 => array('', $EQU_SHOULDER ? get_item_icon($EQU_SHOULDER, $sqlm, $sqlw) : 0, $EQU_SHOULDER ? get_item_border($EQU_SHOULDER, $sqlw) : 0), 4 => array('', $EQU_SHIRT ? get_item_icon($EQU_SHIRT, $sqlm, $sqlw) : 0, $EQU_SHIRT ? get_item_border($EQU_SHIRT, $sqlw) : 0), 5 => array('', $EQU_CHEST ? get_item_icon($EQU_CHEST, $sqlm, $sqlw) : 0, $EQU_CHEST ? get_item_border($EQU_CHEST, $sqlw) : 0), 6 => array('', $EQU_BELT ? get_item_icon($EQU_BELT, $sqlm, $sqlw) : 0, $EQU_BELT ? get_item_border($EQU_BELT, $sqlw) : 0), 7 => array('', $EQU_LEGS ? get_item_icon($EQU_LEGS, $sqlm, $sqlw) : 0, $EQU_LEGS ? get_item_border($EQU_LEGS, $sqlw) : 0), 8 => array('', $EQU_FEET ? get_item_icon($EQU_FEET, $sqlm, $sqlw) : 0, $EQU_FEET ? get_item_border($EQU_FEET, $sqlw) : 0), 9 => array('', $EQU_WRIST ? get_item_icon($EQU_WRIST, $sqlm, $sqlw) : 0, $EQU_WRIST ? get_item_border($EQU_WRIST, $sqlw) : 0), 10 => array('', $EQU_GLOVES ? get_item_icon($EQU_GLOVES, $sqlm, $sqlw) : 0, $EQU_GLOVES ? get_item_border($EQU_GLOVES, $sqlw) : 0), 11 => array('', $EQU_FINGER1 ? get_item_icon($EQU_FINGER1, $sqlm, $sqlw) : 0, $EQU_FINGER1 ? get_item_border($EQU_FINGER1, $sqlw) : 0), 12 => array('', $EQU_FINGER2 ? get_item_icon($EQU_FINGER2, $sqlm, $sqlw) : 0, $EQU_FINGER2 ? get_item_border($EQU_FINGER2, $sqlw) : 0), 13 => array('', $EQU_TRINKET1 ? get_item_icon($EQU_TRINKET1, $sqlm, $sqlw) : 0, $EQU_TRINKET1 ? get_item_border($EQU_TRINKET1, $sqlw) : 0), 14 => array('', $EQU_TRINKET2 ? get_item_icon($EQU_TRINKET2, $sqlm, $sqlw) : 0, $EQU_TRINKET2 ? get_item_border($EQU_TRINKET2, $sqlw) : 0), 15 => array('', $EQU_BACK ? get_item_icon($EQU_BACK, $sqlm, $sqlw) : 0, $EQU_BACK ? get_item_border($EQU_BACK, $sqlw) : 0), 16 => array('', $EQU_MAIN_HAND ? get_item_icon($EQU_MAIN_HAND, $sqlm, $sqlw) : 0, $EQU_MAIN_HAND ? get_item_border($EQU_MAIN_HAND, $sqlw) : 0), 17 => array('', $EQU_OFF_HAND ? get_item_icon($EQU_OFF_HAND, $sqlm, $sqlw) : 0, $EQU_OFF_HAND ? get_item_border($EQU_OFF_HAND, $sqlw) : 0), 18 => array('', $EQU_RANGED ? get_item_icon($EQU_RANGED, $sqlm, $sqlw) : 0, $EQU_RANGED ? get_item_border($EQU_RANGED, $sqlw) : 0), 19 => array('', $EQU_TABARD ? get_item_icon($EQU_TABARD, $sqlm, $sqlw) : 0, $EQU_TABARD ? get_item_border($EQU_TABARD, $sqlw) : 0));
if ($user_lvl > $owner_gmlvl || $owner_name === $user_name) {
$output .= '
<center>
<div id="tab_content">
<h1>' . $lang_char['char_sheet'] . '</h1><br />
<div id="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['char_sheet'] . '</a></li>
<li><a href="char_inv.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['inventory'] . '</a></li>
<li><a href="char_extra.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['extra'] . '</a></li>
' . ($char['level'] < 10 ? '' : '<li><a href="char_talent.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['talents'] . '</a></li>') . '
<li><a href="char_achieve.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['achievements'] . '</a></li>
<li><a href="char_rep.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['reputation'] . '</a></li>
<li><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['skills'] . '</a></li>
<li><a href="char_quest.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['quests'] . '</a></li>';
if (char_get_class_name($char['class']) === 'Hunter') {
$output .= '
<li><a href="char_pets.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['pets'] . '</a></li>';
}
$output .= '
<li><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['friends'] . '</a></li>
<li><a href="char_spell.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['spells'] . '</a></li>
<li><a href="char_mail.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['mail'] . '</a></li>';
} else {
$output .= '
<center>
<div id="tab_content">
<h1>' . $lang_char['char_sheet'] . '</h1><br />
<div id="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['char_sheet'] . '</a></li>';
}
$output .= '
</ul>
</div>
<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">