本文整理汇总了PHP中char_get_race_name函数的典型用法代码示例。如果您正苦于以下问题:PHP char_get_race_name函数的具体用法?PHP char_get_race_name怎么用?PHP char_get_race_name使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了char_get_race_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chooseacct
function chooseacct()
{
global $output, $action_permission, $characters_db, $corem_db, $realm_id, $user_name, $transfer_credits, $user_id, $user_lvl, $sql, $core;
valid_login($action_permission["view"]);
$guid = $sql["char"]->quote_smart($_GET["char"]);
$new = '';
if (isset($_GET["new"])) {
$new = $sql["char"]->quote_smart($_GET["new"]);
}
// if we came here from char_list.php (and have permission)
// then we need to skip the approval process
if ($_GET["priority"] == 1 && $user_lvl >= $action_permission["update"]) {
$priority = 1;
}
if ($core == 1) {
$accts_query = "SELECT acct, accounts.login, IFNULL(`" . $corem_db["name"] . "`.config_accounts.ScreenName, '') AS ScreenName\r\n FROM accounts\r\n LEFT JOIN `" . $corem_db["name"] . "`.config_accounts ON config_accounts.Login=accounts.login COLLATE utf8_general_ci\r\n WHERE acct<>(SELECT acct FROM `" . $characters_db[$realm_id]['name'] . "`.characters WHERE guid='" . $guid . "') ORDER BY ScreenName ASC";
} else {
$accts_query = "SELECT id AS acct, username AS login, IFNULL(`" . $corem_db["name"] . "`.config_accounts.ScreenName, '') AS ScreenName\r\n FROM account\r\n LEFT JOIN `" . $corem_db["name"] . "`.config_accounts ON config_accounts.Login=account.username\r\n WHERE id<>(SELECT account FROM `" . $characters_db[$realm_id]['name'] . "`.characters WHERE guid='" . $guid . "') ORDER BY ScreenName ASC";
}
$accts = $sql["logon"]->query($accts_query);
$query = "SELECT * FROM characters WHERE guid='" . $guid . "'";
$char = $sql["char"]->fetch_assoc($sql["char"]->query($query));
// credits
if ($transfer_credits >= 0) {
// get our credit balance
$cr_query = "SELECT Credits FROM config_accounts WHERE Login='" . $user_name . "'";
$cr_result = $sql["mgr"]->query($cr_query);
$cr_result = $sql["mgr"]->fetch_assoc($cr_result);
$credits = $cr_result["Credits"];
}
$output .= '
<div id="xname_fieldset" class="fieldset_border center">
<span class="legend">' . lang("xacct", "chooseacct") . '</span>
<form method="get" action="change_char_account.php" id="form">
<div>
<input type="hidden" name="action" value="' . ($priority != 1 ? 'getapproval' : 'direct') . '" />
<input type="hidden" name="guid" value="' . $char["guid"] . '" />
</div>
<table id="xname_char_table" class="center">
<tr>
<td rowspan="4" style="width: 170px;">
<div style="width: 64px; margin-left: auto; margin-right: auto;">
<img src="' . char_get_avatar_img($char["level"], $char["gender"], $char["race"], $char["class"]) . '" alt="" />
</div>
</td>
<td>
<span class="xname_char_name">' . $char["name"] . '</span>
</td>
</tr>
<tr>
<td>' . lang("xacct", "level") . ': ' . $char["level"] . '</td>
</tr>
<tr>
<td>' . lang("xacct", "race") . ': ' . char_get_race_name($char["race"]) . '</td>
</tr>
<tr>
<td>' . lang("xacct", "class") . ': ' . char_get_class_name($char["class"]) . '</td>
</tr>
<tr>
<td> </td>
</tr>';
if ($transfer_credits > 0) {
$cost_line = lang("xacct", "credit_cost");
$cost_line = str_replace("%1", '<b>' . $transfer_credits . '</b>', $cost_line);
$output .= '
<tr>
<td colspan="2">' . $cost_line . '</td>
</tr>';
if ($credits >= 0) {
$credit_balance = lang("xacct", "credit_balance");
$credit_balance = str_replace("%1", '<b>' . (double) $credits . '</b>', $credit_balance);
$output .= '
<tr>
<td colspan="2">' . $credit_balance . '</td>
</tr>';
if ($credits < $transfer_credits) {
$output .= '
<tr>
<td colspan="2">' . lang("xacct", "insufficient_credits") . '</td>
</tr>';
} else {
$output .= '
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">' . lang("xacct", "delay_warning") . '</td>
</tr>';
}
} else {
$output .= '
<tr>
<td colspan="2">' . lang("global", "credits_unlimited") . '</td>
</tr>';
}
$output .= '
<tr>
<td colspan="2"> </td>
</tr>';
}
//.........这里部分代码省略.........
示例2: char_main
//.........这里部分代码省略.........
<li id="selected"><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . $lang_char['char_sheet'] . '</a></li>
</ul>
</div>
<div id="tab_content">
<div id="tab">
<ul>';
}
$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">
<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>';
示例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_friends
//.........这里部分代码省略.........
FROM character_social
WHERE guid = ' . $id . ' and flags <= 1)
ORDER BY ' . $order_by . ' ' . $order_dir . '');
if ($sqlc->num_rows($result)) {
$output .= '
<tr>
<th colspan="7" align="left">' . $lang_char['friends'] . '</th>
</tr>
<tr>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=name&dir=' . $dir . '"' . ($order_by === 'name' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['name'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=race&dir=' . $dir . '"' . ($order_by === 'race' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['race'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=class&dir=' . $dir . '"' . ($order_by === 'class' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['class'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=level&dir=' . $dir . '"' . ($order_by === 'level' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['level'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=map&dir=' . $dir . '"' . ($order_by === 'map ' . $order_dir . ', zone' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['map'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=zone&dir=' . $dir . '"' . ($order_by === 'zone ' . $order_dir . ', map' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['zone'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=online&dir=' . $dir . '"' . ($order_by === 'online' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['online'] . '</a></th>
</tr>';
while ($data = $sqlc->fetch_assoc($result)) {
$char_gm_level = $sqlr->result($sqlr->query('
SELECT gmlevel
FROM account
WHERE id = ' . $data['account'] . ''), 0, 'gmlevel');
$output .= '
<tr>
<td>';
if ($user_lvl >= $char_gm_level) {
$output .= '
<a href="char.php?id=' . $data['guid'] . '">' . $data['name'] . '</a>';
} else {
$output .= $data['name'];
}
$output .= '
</td>
<td><img src="img/c_icons/' . $data['race'] . '-' . $data['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($data['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" /></td>
<td><img src="img/c_icons/' . $data['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($data['class']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" /></td>
<td>' . char_get_level_color($data['level']) . '</td>
<td class="small"><span onmousemove="toolTip(\'MapID:' . $data['map'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_map_name($data['map'], $sqlm) . '</span></td>
<td class="small"><span onmousemove="toolTip(\'ZoneID:' . $data['zone'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_zone_name($data['zone'], $sqlm) . '</span></td>
<td>' . ($data['online'] ? '<img src="img/up.gif" alt="" />' : '-') . '</td>
</tr>';
}
}
$result = $sqlc->query('
SELECT name, race, class, map, zone, level, gender, online, account, guid
FROM characters
WHERE guid in
(SELECT guid
FROM character_social
WHERE friend = ' . $id . ' and flags <= 1)
ORDER BY ' . $order_by . ' ' . $order_dir . '');
if ($sqlc->num_rows($result)) {
$output .= '
<tr>
<th colspan="7" align="left">' . $lang_char['friendof'] . '</th>
</tr>
<tr>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=name&dir=' . $dir . '"' . ($order_by === 'name' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['name'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=race&dir=' . $dir . '"' . ($order_by === 'race' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['race'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=class&dir=' . $dir . '"' . ($order_by === 'class' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['class'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=level&dir=' . $dir . '"' . ($order_by === 'level' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['level'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=map&dir=' . $dir . '"' . ($order_by === 'map ' . $order_dir . ', zone' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['map'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=zone&dir=' . $dir . '"' . ($order_by === 'zone ' . $order_dir . ', map' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['zone'] . '</a></th>
<th width="1%"><a href="char_friends.php?id=' . $id . '&realm=' . $realmid . '&order_by=online&dir=' . $dir . '"' . ($order_by === 'online' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_char['online'] . '</a></th>
</tr>';
while ($data = $sqlc->fetch_assoc($result)) {
$char_gm_level = $sqlr->result($sqlr->query('
示例5: char_pets
//.........这里部分代码省略.........
<li><a href="char_view.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "view") . '</a></li>';
}
$output .= '
</ul>
</div>
<div class="tab_content">
<div class="tab">
<ul>
<li><a href="char.php?id=' . $id . '&realm=' . $realmid . '">' . lang("char", "char_sheet") . '</a></li>';
$output .= '
<li class="selected"><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>
<div class="tab_content2">
<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 />
<br />';
if ($core == 1) {
$result = $sql["char"]->query("SELECT petnumber, level, fields,\n SUBSTRING_INDEX(SUBSTRING_INDEX(`fields`, ' ', 77), ' ', -1) AS cur_xp,\n SUBSTRING_INDEX(SUBSTRING_INDEX(`fields`, ' ', 78), ' ', -1) AS next_level_xp,\n name, happinessupdate\n FROM playerpets\n WHERE ownerguid='" . $id . "'");
} else {
$result = $sql["char"]->query("SELECT id AS petnumber, level, abdata AS fields,\n exp AS cur_xp,\n SUBSTRING_INDEX(SUBSTRING_INDEX(`abdata`, ' ', 78), ' ', -1) AS next_level_xp,\n name, curhappiness AS happinessupdate\n FROM character_pet \n WHERE owner='" . $id . "'");
}
if ($sql["char"]->num_rows($result)) {
while ($pet = $sql["char"]->fetch_assoc($result)) {
$pet_data = explode(' ', $pet["fields"]);
$happiness = floor($pet_data[UNIT_FIELD_MAXPOWER3] / 333000);
if ($happiness == 1) {
$hap_text = 'Content';
$hap_val = 1;
} elseif ($happiness == 2) {
$hap_text = 'Happy';
$hap_val = 2;
} else {
$hap_text = 'Unhappy';
$hap_val = 0;
}
if ($core == 1) {
$pet_next_lvl_xp = $pet["next_level_xp"];
} else {
$pet_next_lvl_xp = floor(char_get_xp_to_level($pet["level"]) / 4);
}
// this_is_junk: style left hardcoded because it's calculated.
$output .= '
<font class="bold">' . $pet["name"] . ' - lvl ' . char_get_level_color($pet["level"]) . '
<a class="ch_pet_padding" onmouseover="oldtoolTip(\'' . $hap_text . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()"><img src="img/pet/happiness_' . $hap_val . '.jpg" alt="" /></a>
示例6: approve
function approve()
{
global $output, $action_permission, $characters_db, $realm_id, $user_name, $arcm_db, $user_id, $hearthstone_credits, $sql, $core;
valid_login($action_permission["view"]);
$guid = $sql["char"]->quote_smart($_GET["char"]);
$new1 = '';
if (isset($_GET["new1"])) {
$new1 = $sql["char"]->quote_smart($_GET["new1"]);
}
$new2 = '';
if (isset($_GET["new2"])) {
$new2 = $sql["char"]->quote_smart($_GET["new2"]);
}
if ($core == 1) {
$query = "SELECT * FROM characters WHERE guid='" . $guid . "'";
} elseif ($core == 2) {
$query = "SELECT *, characters.guid AS guid,\n characters.map AS mapId, characters.zone AS zoneId,\n character_homebind.map AS bindmapId, character_homebind.zone AS bindzoneId\n FROM characters LEFT JOIN character_homebind ON characters.guid=character_homebind.guid WHERE characters.guid='" . $guid . "'";
} else {
$query = "SELECT *, characters.guid AS guid,\n characters.map AS mapId, characters.zone AS zoneId,\n character_homebind.mapId AS bindmapId, character_homebind.zoneId AS bindzoneId\n FROM characters LEFT JOIN character_homebind ON characters.guid=character_homebind.guid WHERE characters.guid='" . $guid . "'";
}
$char = $sql["char"]->fetch_assoc($sql["char"]->query($query));
// credits
if ($hearthstone_credits >= 0) {
// get our credit balance
$cr_query = "SELECT Credits FROM config_accounts WHERE Login='" . $user_name . "'";
$cr_result = $sql["mgr"]->query($cr_query);
$cr_result = $sql["mgr"]->fetch_assoc($cr_result);
$credits = $cr_result["Credits"];
}
// MaNGOS & Trinity don't automatically add a home bind location for a character.
if ($core != 1) {
if (!isset($char["bindmapId"])) {
$query = "SELECT * FROM playercreateinfo WHERE race='" . $char["race"] . "' AND class='" . $char["class"] . "'";
$result = $sql["world"]->query($query);
$fields = $sql["world"]->fetch_assoc($result);
$char["bindmapId"] = $fields["map"];
$char["bindzoneId"] = $fields["zone"];
}
}
$output .= '
<div id="xname_fieldset" class="fieldset_border center">
<span class="legend">' . lang("unstuck", "newloc_legend") . '</span>
<form method="get" action="hearthstone.php" id="form">
<div>
<input type="hidden" name="action" value="save" />
<input type="hidden" name="guid" value="' . $char["guid"] . '" />
</div>
<table id="xname_char_table" class="center">
<tr>
<td rowspan="4" style="width: 170px;">
<div style="width: 64px; margin-left: auto; margin-right: auto;">
<img src="' . char_get_avatar_img($char["level"], $char["gender"], $char["race"], $char["class"]) . '" alt="" />
</div>
</td>
<td>
<span class="xname_char_name">' . $char["name"] . '</span>
</td>
</tr>
<tr>
<td>' . lang("unstuck", "level") . ': ' . $char["level"] . '</td>
</tr>
<tr>
<td>' . lang("unstuck", "race") . ': ' . char_get_race_name($char["race"]) . '</td>
</tr>
<tr>
<td>' . lang("unstuck", "class") . ': ' . char_get_class_name($char["class"]) . '</td>
</tr>
<tr>
<td> </td>
</tr>';
if ($hearthstone_credits > 0) {
$cost_line = lang("unstuck", "credit_cost");
$cost_line = str_replace("%1", '<b>' . $hearthstone_credits . '</b>', $cost_line);
$output .= '
<tr>
<td colspan="2">' . $cost_line . '</td>
</tr>';
if ($credits >= 0) {
$credit_balance = lang("unstuck", "credit_balance");
$credit_balance = str_replace("%1", '<b>' . (double) $credits . '</b>', $credit_balance);
$output .= '
<tr>
<td colspan="2">' . $credit_balance . '</td>
</tr>';
if ($credits < $hearthstone_credits) {
$output .= '
<tr>
<td colspan="2">' . lang("xacct", "insufficient_credits") . '</td>
</tr>';
} else {
$output .= '
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">' . lang("xacct", "delay_warning") . '</td>
</tr>';
}
} else {
$output .= '
//.........这里部分代码省略.........
示例7: 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>
//.........这里部分代码省略.........
示例8: char_inv
//.........这里部分代码省略.........
<!-- start of char_inv.php -->
<div class="tab">
<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;">';
示例9: 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>
//.........这里部分代码省略.........
示例10: edit_user
//.........这里部分代码省略.........
while ($realm = $sql["mgr"]->fetch_assoc($realms)) {
$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>
示例11: 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 -->';
}
示例12: char_skill
//.........这里部分代码省略.........
<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>
<tr>
' . ($user_lvl ? '<th><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '&order_by=0&dir=' . $dir . '"' . ($order_by == 0 ? ' class="' . $order_dir . '"' : '') . '>' . lang("char", "skill_id") . '</a></th>' : '') . '
<th align="right"><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '&order_by=1&dir=' . $dir . '"' . ($order_by == 1 ? ' class="' . $order_dir . '"' : '') . '>' . lang("char", "skill_name") . '</a></th>
<th><a href="char_skill.php?id=' . $id . '&realm=' . $realmid . '&order_by=2&dir=' . $dir . '"' . ($order_by == 2 ? ' class="' . $order_dir . '"' : '') . '>' . lang("char", "skill_value") . '</a></th>
</tr>';
$skill_array = array();
$class_array = array();
$prof_1_array = array();
$prof_2_array = array();
$weapon_array = array();
$armor_array = array();
$language_array = array();
$skill_rank_array = array(75 => lang("char", "apprentice"), 150 => lang("char", "journeyman"), 225 => lang("char", "expert"), 300 => lang("char", "artisan"), 375 => lang("char", "master"), 450 => lang("char", "inherent"), 385 => lang("char", "wise"));
for ($i = PLAYER_SKILL_INFO_1_1; $i <= PLAYER_SKILL_INFO_1_1 + 384; $i += 3) {
if ($char_data[$i] && skill_get_name($char_data[$i] & 0xffff)) {
$temp = unpack("S", pack("L", $char_data[$i + 1]));
$skill = $char_data[$i] & 0xffff;
if (skill_get_type($skill) == 6) {
array_push($weapon_array, array($user_lvl ? $skill : '', skill_get_name($skill), $temp[1]));
} elseif (skill_get_type($skill) == 7) {
array_push($class_array, array($user_lvl ? $skill : '', skill_get_name($skill), $temp[1]));
} elseif (skill_get_type($skill) == 8) {
array_push($armor_array, array($user_lvl ? $skill : '', skill_get_name($skill), $temp[1]));
} elseif (skill_get_type($skill) == 9) {
示例13: 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>';
}
}
示例14: 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>';
}
}
示例15: while
</tr>';
while ($char = $sql["char"]->fetch_assoc($query)) {
if ($core == 1) {
$guild_id = $sql["char"]->result($sql["char"]->query("SELECT guildid FROM guild_data WHERE playerid='" . $char["guid"] . "'"), 0);
$guild_name = $sql["char"]->result($sql["char"]->query("SELECT guildname FROM guilds WHERE guildid='" . $guild_id . "'"), 0);
} else {
$guild_name = $sql["char"]->fetch_assoc($sql["char"]->query("SELECT `name` FROM `guild` WHERE `guildid`=" . $char["GNAME"] . ";"));
$guild_name = $guild_name["name"];
}
$output .= '
<tr>
<td>
<a href="char.php?id=' . $char["guid"] . '">' . htmlentities($char["name"], ENT_COMPAT, $site_encoding) . '</a>
</td>
<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>' . char_get_level_color($char["level"]) . '</td>
<td>
<span onmouseover="oldtoolTip(\'' . char_get_pvp_rank_name($char["honor"], char_get_side_id($char["race"])) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" class="honor_tooltip">
<img src="img/ranks/rank' . char_get_pvp_rank_id($char["honor"], char_get_side_id($char["race"])) . '.gif" alt="" />
</span>
</td>
<td>' . $char["honor"] . '</td>
<td>' . $char["kills"] . '</td>
<td>' . $char["arena"] . '</td>
<td>
<a href="guild.php?action=view_guild&error=3&id=' . $char["GNAME"] . '">' . htmlentities($guild_name, ENT_COMPAT, $site_encoding) . '</a>