本文整理汇总了PHP中get_map_name函数的典型用法代码示例。如果您正苦于以下问题:PHP get_map_name函数的具体用法?PHP get_map_name怎么用?PHP get_map_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_map_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __update
function __update($data)
{
$this->list->clear();
foreach ($data as $char) {
$z = get_zone_name($char['map'], $char["xpos"], $char["ypos"]);
if ($z == " ") {
$z = get_map_name($char['map']);
}
$this->list->append(array($char['name'], GdkPixbuf::new_from_file("./img/{$char['race']}-{$char['gender']}.gif"), GdkPixbuf::new_from_file("./img/{$char['class']}.gif"), $char['level'], $char['latency'], $z));
}
$this->list->set_sort_column_id(0, Gtk::SORT_ASCENDING);
}
示例2: char_friends
//.........这里部分代码省略.........
<table class="lined" style="width: 1%;">';
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
$result = $sqlc->query('SELECT name, race, class, map, zone, level, gender, online, account, guid
FROM characters WHERE guid in (SELECT friend 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('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>
示例3: char_main
//.........这里部分代码省略.........
<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>';
if ($char['class'] == 11) {
//druid
$output .= '
</br>
示例4: mysql_fetch_array
$rep = mysql_fetch_array($req);
if ($_SESSION['auth'] == "yes" and Securite::bdd($_SESSION['gmlevel']) >= $rep['config_value2']) {
if ($rep['config_value'] == 1) {
mysql_connect($characters[1]['host'], $characters[1]['user'], $characters[1]['password']) or die(mysql_error());
mysql_select_db($characters[1]['db']) or die(mysql_error());
switch ($_GET['action']) {
case "editer":
require_once "../kernel/fonctions.php";
require_once "../kernel/fonctions_armurerie.php";
require_once "../kernel/defines/309.php";
$id = Securite::bdd($_POST['id']);
$id = Securite::bdd($_GET['id']);
$reponse = mysql_query("SELECT guid,account,data,name,race,class,position_x,position_y,map,online,totaltime,position_z,zone\tFROM `characters` WHERE `name`='{$id}' OR `guid`='{$id}' ") or die(mysql_error());
$char = mysql_fetch_row($reponse);
$char_data = explode(' ', $char[2]);
echo "\n\t\t\t\t<center>\n\t\t\t\t\t<form method=\"get\" action=\"index.php?module=perso&action=editer_v\" name=\"form\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"do_edit_char\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$id}\" />\n\t\t\t\t\t\t<table class=\"lined\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t <td colspan=\"8\"><font class=\"bold\"><input type=\"text\" name=\"name\" size=\"14\" maxlength=\"12\" value=\"{$char['3']}\" /> - " . get_player_race($char[4]) . " " . get_player_class($char[5]) . " lvl {$char_data[CHAR_DATA_OFFSET_LEVEL]}</font><br />{$online}</td>\n</tr>\n<tr>\n\t\t\t\t <td colspan=\"8\">" . get_map_name($char[9]) . " - " . get_zone_name($char[12]) . "</td>\n</tr>\n<tr>\n\t\t\t\t <td colspan=\"8\">{$lang_char['guild']}: {$guild_name} | {$lang_char['rank']}: {$guild_rank}</td>\n</tr>\n<tr>\n\t\t\t\t <td colspan=\"8\">{$lang_char['honor_points']}: <input type=\"text\" name=\"honor_points\" size=\"8\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_HONOR_POINTS]}\" />/\n\t\t\t\t <input type=\"text\" name=\"arena_points\" size=\"8\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_ARENA_POINTS]}\" /> - {$lang_char['honor_kills']}: <input type=\"text\" name=\"total_kills\" size=\"8\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_HONOR_KILL]}\" /></td>\n</tr>\n\t\t\t\t <tr>\n\t\t\t\t <td width=\"2%\"><input type=\"checkbox\" name=\"check[]\" value=\"a0\" /></td><td width=\"18%\">{$lang_item['head']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_HEAD]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_HEAD]) . "</a></td>\n\t\t\t\t <td width=\"15%\">{$lang_item['health']}:</td><td width=\"15%\"><input type=\"text\" name=\"health\" size=\"10\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_HEALTH]}\" /></td>\n\t\t\t\t <td width=\"15%\">{$lang_item['res_holy']}:</td><td width=\"15%\"><input type=\"text\" name=\"res_holy\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_RES_HOLY]}\" /></td>\n\t\t\t\t <td width=\"18%\">{$lang_item['gloves']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_GLOVES]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]) . "</a></td><td width=\"2%\"><input type=\"checkbox\" name=\"check[]\" value=\"a9\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a1\" /></td><td>{$lang_item['neck']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_NECK]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_NECK]) . "</a></td>\n\t\t\t\t <td>{$lang_item['mana']}:</td><td><input type=\"text\" name=\"mana\" size=\"10\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_MANA]}\" /></td>\n\t\t\t\t <td>{$lang_item['res_arcane']}:</td><td><input type=\"text\" name=\"res_arcane\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_RES_ARCANE]}\" /></td>\n\t\t\t\t <td>{$lang_item['belt']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_BELT]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_BELT]) . "</a></td> <td><input type=\"checkbox\" name=\"check[]\" value=\"a5\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a2\" /></td><td>{$lang_item['shoulder']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]) . "</a></td>\n\t\t\t\t <td>{$lang_item['strength']}:</td><td><input type=\"text\" name=\"str\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_STR]}\" /></td>\n\t\t\t\t <td>{$lang_item['res_fire']}:</td><td><input type=\"text\" name=\"res_fire\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_RES_FIRE]}\" /></td>\n\t\t\t\t <td>{$lang_item['legs']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_LEGS]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_LEGS]) . "</a></td><td><input type=\"checkbox\" name=\"check[]\" value=\"a6\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a14\" /></td><td>{$lang_item['back']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_BACK]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_BACK]) . "</a></td>\n\t\t\t\t <td>{$lang_item['agility']}:</td><td><input type=\"text\" name=\"agi\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_AGI]}\" /></td>\n\t\t\t\t <td>{$lang_item['res_nature']}:</td><td><input type=\"text\" name=\"res_nature\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_RES_NATURE]}\" /></td>\n\t\t\t\t <td>{$lang_item['feet']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_FEET]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_FEET]) . "</a></td><td><input type=\"checkbox\" name=\"check[]\" value=\"a7\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a4\" /></td><td>{$lang_item['chest']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_CHEST]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_CHEST]) . "</a></td>\n\t\t\t\t <td>{$lang_item['stamina']}:</td><td><input type=\"text\" name=\"sta\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_STA]}\" /></td>\n\t\t\t\t <td>{$lang_item['res_frost']}:</td><td><input type=\"text\" name=\"res_frost\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_RES_FROST]}\" /></td>\n\t\t\t\t <td>{$lang_item['finger']} 1<br /><a href=\"{$item_datasite}{$char_data[380]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]) . "</a></td><td><input type=\"checkbox\" name=\"check[]\" value=\"a10\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a3\" /></td><td>{$lang_item['shirt']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_SHIRT]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]) . "</a></td>\n\t\t\t\t <td>{$lang_item['intellect']}:</td><td><input type=\"text\" name=\"int\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_INT]}\" /></td>\n\t\t\t\t <td>{$lang_item['res_shadow']}:</td><td><input type=\"text\" name=\"res_shadow\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_RES_SHADOW]}\" /></td>\n\t\t\t\t <td>{$lang_item['finger']} 2<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_FINGER2]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]) . "</a></td><td><input type=\"checkbox\" name=\"check[]\" value=\"a11\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a18\" /></td><td>{$lang_item['tabard']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_TABARD]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_TABARD]) . "</a></td>\n\t\t\t\t <td>{$lang_item['spirit']}:</td><td><input type=\"text\" name=\"spi\" size=\"10\" maxlength=\"4\" value=\"{$char_data[CHAR_DATA_OFFSET_SPI]}\" /></td>\n\t\t\t\t <td>{$lang_char['exp']}:</td><td><input type=\"text\" name=\"exp\" size=\"10\" maxlength=\"8\" value=\"{$char_data[CHAR_DATA_OFFSET_EXP]}\" /></td>\n\t\t\t\t <td>{$lang_item['trinket']} 1<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]) . "</a></td><td><input type=\"checkbox\" name=\"check[]\" value=\"a12\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a8\" /></td><td>{$lang_item['wrist']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_WRIST]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_WRIST]) . "</a></td>\n\t\t\t\t <td>{$lang_item['armor']}:</td><td><input type=\"text\" name=\"armor\" size=\"10\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_ARMOR]}\" /></td>\n\t\t\t\t <td>{$lang_char['melee_ap']}: <input type=\"text\" name=\"attack_power\" size=\"10\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_AP]}\" /></td><td>{$lang_char['ranged_ap']}: <input type=\"text\" name=\"range_attack_power\" size=\"10\" maxlength=\"6\" value=\"{$char_data[CHAR_DATA_OFFSET_RANGED_AP]}\" /></td>\n\t\t\t\t <td>{$lang_item['trinket']} 2<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]) . "</a></td><td><input type=\"checkbox\" name=\"check[]\" value=\"a13\" /></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a15\" /></td>\n\t\t\t\t <td colspan=\"2\">{$lang_item['main_hand']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]) . "</a></td>\n\t\t\t\t <td colspan=\"2\"><input type=\"checkbox\" name=\"check[]\" value=\"a16\" /> {$lang_item['off_hand']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]) . "</a></td>\n\t\t\t\t <td colspan=\"2\">{$lang_item['ranged']}<br /><a href=\"{$item_datasite}{$char_data[CHAR_DATA_OFFSET_EQU_RANGED]}\" target=\"_blank\">" . get_item_name($char_data[CHAR_DATA_OFFSET_EQU_RANGED]) . "</a></td>\n\t\t\t\t <td><input type=\"checkbox\" name=\"check[]\" value=\"a17\" /></td>\n<tr>\n<td colspan=\"8\">{$lang_char['block']} : <input type=\"text\" name=\"block\" size=\"5\" maxlength=\"3\" value=\"{$block}\" />% \n| {$lang_char['dodge']}: <input type=\"text\" name=\"dodge\" size=\"5\" maxlength=\"3\" value=\"{$dodge}\" />% \n| {$lang_char['parry']}: <input type=\"text\" name=\"parry\" size=\"5\" maxlength=\"3\" value=\"{$parry}\" />% \n| {$lang_char['crit']}: <input type=\"text\" name=\"crit\" size=\"5\" maxlength=\"3\" value=\"{$crit}\" />%\n| {$lang_char['range_crit']}: <input type=\"text\" name=\"range_crit\" size=\"3\" maxlength=\"14\" value=\"{$range_crit}\" />%</td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n<td colspan=\"4\">{$lang_char['gold']}: <input type=\"text\" name=\"money\" size=\"10\" maxlength=\"8\" value=\"{$char_data[CHAR_DATA_OFFSET_GOLD]}\" /></td>\n\t\t\t\t <td colspan=\"4\">{$lang_char['tot_paly_time']}: <input type=\"text\" name=\"tot_time\" size=\"8\" maxlength=\"14\" value=\"{$char[10]}\" /></td>\n</tr>\n<tr>\n\t\t\t\t\t<td colspan=\"5\">{$lang_char['location']}: \n\t\t\t\t\tX:<input type=\"text\" name=\"x\" size=\"10\" maxlength=\"8\" value=\"{$char[6]}\" />\n\t\t\t\t\tY:<input type=\"text\" name=\"y\" size=\"8\" maxlength=\"16\" value=\"{$char[7]}\" />\n\t\t\t\t\tZ:<input type=\"text\" name=\"z\" size=\"8\" maxlength=\"16\" value=\"{$char[11]}\" />\n\t\t\t\t\tMap:<input type=\"text\" name=\"map\" size=\"8\" maxlength=\"16\" value=\"{$char[8]}\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td colspan=\"3\">{$lang_char['move_to']}:<input type=\"text\" name=\"tp_to\" size=\"24\" maxlength=\"64\" value=\"\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br />\n\t\t\t\t<a href=\"index.php?module=perso&action=inventaire&id={$id}\">Voir l'inventaire</a> - \n\t\t\t\t<a href=\"index.php?module=perso&action=monnaie&id={$id}\">Voir les Marques d'honneur</a> - \n\t\t\t\t<a href=\"index.php?module=perso&action=quetes&id={$id}\">Voir les quêtes</a> - \n\t\t\t\t<a href=\"index.php?module=perso&action=talents&id={$id}\">Voir les Talents</a> - \n\t\t\t\t<a href=\"index.php?module=perso&action=skills&id={$id}\">Voir les Compétences</a>\n\t\t\t\t";
break;
case "editer_v":
break;
case "quetes":
$id = mysql_real_escape_string(htmlspecialchars($_GET['id'], ENT_QUOTES));
$retour = mysql_query("SELECT * FROM character_queststatus WHERE guid = {$id} AND ( status = 3 OR status = 1 ) ORDER BY status DESC");
echo "<p class=\"title\">Les Quêtes</p><br />";
echo "<table class=\"lined\" width=\"99%\" style='border-collapse: collapse'; width='90%' border='1' cellspacing='1' cellpadding='1'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th width=\"30\">ID</th>\n\t\t\t\t\t\t\t\t<th width=\"30\">Niveau</th>\n\t\t\t\t\t\t\t\t<th width=\"30\">Titre</th>\n\t\t\t\t\t\t\t\t<th width=\"30\">status</th>\n\t\t\t\t\t\t\t</tr>";
while ($donnees = mysql_fetch_assoc($retour)) {
$retour2 = mysql_query("SELECT QuestLevel,title FROM `" . $mangos[1]['db'] . "`.`quest_template` LEFT JOIN `" . $mangos[1]['db'] . "`.`locales_quest` ON `quest_template`.`entry` = `locales_quest`.`entry` WHERE `quest_template`.`entry` ='" . $donnees['quest'] . "'");
$donnees2 = mysql_fetch_array($retour2);
echo "<tr><td align=\"center\">";
echo "<a href=\"http://fr.wowhead.com/?quest=" . $donnees['quest'] . "\">" . $donnees['quest'] . "</a>";
echo "</td><td align=\"center\">";
echo "" . $donnees2['QuestLevel'] . "";
示例5: approve
//.........这里部分代码省略.........
<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 .= '
<tr>
<td colspan="2">' . lang("global", "credits_unlimited") . '</td>
</tr>';
}
$output .= '
<tr>
<td colspan="2"> </td>
</tr>';
}
$output .= '
<tr>
<td><b>' . lang("unstuck", "curloc") . ':</b></td>
</tr>
<tr>
<td>' . get_map_name($char["mapId"]) . '</td>
<td>' . get_zone_name($char["zoneId"]) . '</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan="2"><b>' . lang("unstuck", "newloc") . ':</b></td>
</tr>
<tr>
<td>' . get_map_name($char["bindmapId"]) . '</td>
<td>' . get_zone_name($char["bindzoneId"]) . '</td>
</tr>';
// if we have unlimited credits, then we fake our credit balance here
$credits = $credits < 0 ? $hearthstone_credits : $credits;
if ($hearthstone_credits <= 0 || $credits >= $hearthstone_credits) {
$output .= '
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">';
makebutton(lang("unstuck", "save"), "javascript:do_submit()", 180);
$output .= '
</td>
</tr>';
}
$output .= '
</table>
</form>
</div>
<br />';
}
示例6: browse_tele
function browse_tele()
{
global $output, $world_db, $realm_id, $arcm_db, $itemperpage, $action_permission, $user_lvl, $sqlw, $sqlm, $sqld;
//==========================$_GET and SECURE=================================
$start = isset($_GET['start']) ? $sqlw->quote_smart($_GET['start']) : 0;
if (is_numeric($start)) {
} else {
$start = 0;
}
$order_by = isset($_GET['order_by']) ? $sqlw->quote_smart($_GET['order_by']) : "id";
if (!preg_match("/^[_[:lower:]]{1,12}\$/", $order_by)) {
$order_by = "id";
}
$dir = isset($_GET['dir']) ? $sqlw->quote_smart($_GET['dir']) : 1;
if (!preg_match("/^[01]{1}\$/", $dir)) {
$dir = 1;
}
$order_dir = $dir ? "ASC" : "DESC";
$dir = $dir ? 0 : 1;
//==========================$_GET and SECURE end=============================
//==========================Browse/Search CHECK==============================
$search_by = '';
$search_value = '';
if (isset($_GET['search_value']) && isset($_GET['search_by'])) {
$search_value = $sqlw->quote_smart($_GET['search_value']);
$search_by = $sqlw->quote_smart($_GET['search_by']);
$search_menu = array("name", "id", "mapid");
if (!in_array($search_by, $search_menu)) {
$search_by = 'name';
}
unset($search_menu);
if (preg_match('/^[\\t\\v\\b\\f\\a\\n\\r\\\\"\'\\? <>[](){}_=+-|!@#$%^&*~`.,0123456789\\0]{1,30}$/', $search_value)) {
redirect("tele.php?error=1");
}
$query_1 = $sqlw->query("SELECT count(*) FROM recall WHERE {$search_by} LIKE '%{$search_value}%'");
$query = $sqlw->query("SELECT id, name, mapid, positionx, positiony, positionz, orientation\r\n FROM recall WHERE {$search_by} LIKE '%{$search_value}%' ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
} else {
$query_1 = $sqlw->query("SELECT count(*) FROM recall");
$query = $sqlw->query("SELECT id, name, mapid, positionx, positiony, positionz, orientation\r\n FROM recall ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
}
$all_record = $sqlw->result($query_1, 0);
unset($query_1);
//=====================top tage navigaion starts here========================
$output .= "\r\n <center>\r\n <table class=\"top_hidden\">\r\n <tr>\r\n <td>";
if ($user_lvl >= $action_permission['insert']) {
makebutton(lang('tele', 'add_new'), "tele.php?action=add_tele", 130);
}
makebutton(lang('global', 'back'), "javascript:window.history.back()", 130);
$search_by && $search_value ? makebutton(lang('tele', 'teleports'), "tele.php\" type=\"def", 130) : ($output .= "");
$output .= "\r\n </td>\r\n <td width=\"25%\" align=\"right\" rowspan=\"2\">";
$output .= generate_pagination("tele.php?order_by={$order_by}&dir=" . ($dir ? 0 : 1) . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : ""), $all_record, $itemperpage, $start);
$output .= "\r\n </td>\r\n </tr>\r\n <tr align=\"left\">\r\n <td>\r\n <table class=\"hidden\">\r\n <tr>\r\n <td>\r\n <form action=\"tele.php\" method=\"get\" name=\"form\">\r\n <input type=\"hidden\" name=\"error\" value=\"4\" />\r\n <input type=\"text\" size=\"24\" name=\"search_value\" value=\"{$search_value}\" />\r\n <select name=\"search_by\">\r\n <option value=\"name\"" . ($search_by == 'name' ? " selected=\"selected\"" : "") . ">" . lang('tele', 'loc_name') . "</option>\r\n <option value=\"id\"" . ($search_by == 'id' ? " selected=\"selected\"" : "") . ">" . lang('tele', 'loc_id') . "</option>\r\n <option value=\"mapid\"" . ($search_by == 'mapid' ? " selected=\"selected\"" : "") . ">" . lang('tele', 'on_map') . "</option>\r\n </select>\r\n </form>\r\n </td>\r\n <td>";
makebutton(lang('global', 'search'), "javascript:do_submit()", 80);
$output .= "\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>";
//======================top tage navigaion ENDS here ========================
$output .= "\r\n <script type=\"text/javascript\">\r\n answerbox.btn_ok='" . lang('global', 'yes') . "';\r\n answerbox.btn_cancel='" . lang('global', 'no') . "';\r\n var question = '" . lang('global', 'are_you_sure') . "';\r\n var del_tele = 'tele.php?action=del_tele&order_by={$order_by}&start={$start}&dir={$dir}&id=';\r\n </script>\r\n <table class=\"lined\">\r\n <tr>";
if ($user_lvl >= $action_permission['delete']) {
$output .= "\r\n <th width=\"5%\">" . lang('global', 'delete_short') . "</th>";
}
$output .= "\r\n <th width=\"5%\"><a href=\"tele.php?order_by=id&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'id' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'id') . "</a></th>\r\n <th width=\"28%\"><a href=\"tele.php?order_by=name&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'name' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'name') . "</a></th>\r\n <th width=\"22%\"><a href=\"tele.php?order_by=mapid&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'mapid' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'map') . "</a></th>\r\n <th width=\"9%\"><a href=\"tele.php?order_by=positionx&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'positionx' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'x') . "</a></th>\r\n <th width=\"9%\"><a href=\"tele.php?order_by=positiony&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'positiony' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'y') . "</a></th>\r\n <th width=\"9%\"><a href=\"tele.php?order_by=positionz&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'positionz' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'z') . "</a></th>\r\n <th width=\"10%\"><a href=\"tele.php?order_by=orientation&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\"" . ($order_by == 'orientation' ? " class=\"{$order_dir}\"" : "") . ">" . lang('tele', 'orientation') . "</a></th>\r\n </tr>";
while ($data = $sqlw->fetch_row($query)) {
$output .= "\r\n <tr>";
if ($user_lvl >= $action_permission['delete']) {
$output .= "\r\n <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('" . lang('global', 'delete') . ": <font color=white>{$data[1]}</font><br /> ' + question, del_tele + {$data['0']});\" id=\"tele_delete_cursor\" /></td>";
}
$output .= "\r\n <td>{$data['0']}</td>\r\n <td>";
if ($user_lvl >= $action_permission['update']) {
$output .= "\r\n <a href=\"tele.php?action=edit_tele&id={$data['0']}\">{$data['1']}</a>";
} else {
$output .= "{$data['1']}";
}
$output .= "\r\n </td>\r\n <td>" . get_map_name($data[2], $sqld) . " ({$data['2']})</td>\r\n <td>{$data['3']}</td>\r\n <td>{$data['4']}</td>\r\n <td>{$data['5']}</td>\r\n <td>{$data['6']}</td>\r\n </tr>";
}
unset($query);
unset($data);
$output .= "\r\n <tr>\r\n <td colspan=\"7\" class=\"hidden\" align=\"right\" width=\"25%\">";
$output .= generate_pagination("tele.php?order_by={$order_by}&dir=" . ($dir ? 0 : 1) . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : ""), $all_record, $itemperpage, $start);
$output .= "\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"7\" class=\"hidden\" align=\"right\">" . lang('tele', 'tot_locations') . " : {$all_record}</td>\r\n </tr>\r\n </table>\r\n </center>\r\n";
}
示例7: browse_chars
//.........这里部分代码省略.........
<td>';
if ($user_lvl >= $action_permission["delete"] || $owner_acc_name == $user_name) {
$output .= '
<input type="checkbox" name="check[]" value="' . $char["guid"] . '" onclick="CheckCheckAll(document.form1);" />';
}
$output .= '
</td>
<td>' . $char["guid"] . '</td>
<td>
<a href="char.php?id=' . $char["guid"] . '">' . htmlentities($char["name"], ENT_COMPAT, $site_encoding) . '</a>
</td>';
if ($sn["ScreenName"]) {
$output .= '
<td>
<a href="user.php?action=edit_user&error=11&acct=' . $char["acct"] . '">' . htmlentities($sn["ScreenName"], ENT_COMPAT, $site_encoding) . '</a>
</td>';
} else {
$output .= '
<td>
<a href="user.php?action=edit_user&error=11&acct=' . $char["acct"] . '">' . htmlentities($owner_acc_name, ENT_COMPAT, $site_encoding) . '</a>
</td>';
}
$output .= '
<td>
<img src="img/c_icons/' . $char["race"] . '-' . $char["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($char["race"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
<td>
<img src="img/c_icons/' . $char["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($char["class"]) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>
<td>
<span>' . char_get_level_color($char["level"]) . '</span>
</td>
<td>
<span onmousemove="oldtoolTip(\'MapID:' . $char["mapid"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()">' . get_map_name($char["mapid"]) . '</span>
</td>
<td>
<span onmousemove="oldtoolTip(\'ZoneID:' . $char["zoneid"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()">' . get_zone_name($char["zoneid"]) . '</span>
</td>
<td>
<span>' . $char["highest_rank"] . '</span>
</td>
<td>
<a href="guild.php?action=view_guild&error=3&id=' . $guild_id . '">' . htmlentities($guild_name, ENT_COMPAT, $site_encoding) . '</a>
</td>
<td>
<span>' . $lastseen . '</span>
</td>
<td>
<img src="img/' . ($char["online"] ? 'up' : 'down') . '.gif" alt="" />
</td>';
if ($showcountryflag) {
$country = misc_get_country_by_account($char["acct"]);
if ($country["code"]) {
$output .= '
<td>
<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
</td>';
} else {
$output .= '
<td>
<span>-</span>
</td>';
}
}
if ($user_lvl >= $action_permission["update"]) {
$output .= '
示例8: mysql_connect
<?php
include_once "../conf.php";
include_once "zone_tables.php";
mysql_connect($config['hostname'], $config['username'], $config['password']) or die("Невозможно создать соединение с базой сервера." . mysql_error());
mysql_select_db($config['dbName']) or die(mysql_error());
$id = intval(@$_REQUEST['id']);
$where = @$_REQUEST['where'];
$map = intval(@$_REQUEST['map']);
$x = intval(@$_REQUEST['x']);
$y = intval(@$_REQUEST['y']);
if ($map != 0 and $map != 1 and $map != 530) {
include "instance.php";
} else {
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
$areaName = get_map_name($map);
$zone = get_zone($map, $x, $y);
if ($zone == 0) {
echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Неизвестная зона</center></td></tr></table></center>";
die;
}
$area = get_Area($zone[5]);
if ($area == 0) {
echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Карта не найдена(</center></td></tr></table></center>";
die;
}
$background = "img/map_image/{$areaName}/{$area['3']}.jpg";
$mapID = $area[1];
$areaY1 = $area[4];
$areaY2 = $area[5];
$areaX1 = $area[6];
示例9: instances
function instances()
{
global $output, $lang_instances, $realm_id, $world_db, $mmfpm_db, $itemperpage;
$sqlw = new SQL();
$sqlw->connect($world_db[$realm_id]['addr'], $world_db[$realm_id]['user'], $world_db[$realm_id]['pass'], $world_db[$realm_id]['name']);
//-------------------SQL Injection Prevention--------------------------------
// this page has multipage support and field ordering, so we need these
$start = isset($_GET['start']) ? $sqlw->quote_smart($_GET['start']) : 0;
if (is_numeric($start)) {
} else {
$start = 0;
}
$order_by = isset($_GET['order_by']) ? $sqlw->quote_smart($_GET['order_by']) : 'level_min';
if (preg_match('/^[_[:lower:]]{1,11}$/', $order_by)) {
} else {
$order_by = 'level_min';
}
$dir = isset($_GET['dir']) ? $sqlw->quote_smart($_GET['dir']) : 1;
if (preg_match('/^[01]{1}$/', $dir)) {
} else {
$dir = 1;
}
$order_dir = $dir ? 'ASC' : 'DESC';
$dir = $dir ? 0 : 1;
// for multipage support
$all_record = $sqlw->result($sqlw->query('SELECT count(*) FROM instance_template'), 0);
// main data that we need for this page, instances
$result = $sqlw->query('SELECT map, levelMin as level_min, levelMax as level_max
FROM instance_template ORDER BY ' . $order_by . ' ' . $order_dir . ' LIMIT ' . $start . ', ' . $itemperpage . ';');
/*---------------Page Specific Data Starts Here--------------------------
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
Instances Template
*/
$output .= '
<center>
<table class="top_hidden">
<tr>
<td width="25%" align="right">';
// multi page links
$output .= $lang_instances['total'] . ' : ' . $all_record . '<br /><br />' . generate_pagination('instances.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start);
// column headers, with links for sorting
$output .= '
</td>
</tr>
</table>
<table class="lined">
<tr>
<th width="40%"><a href="instances.php?order_by=map&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'map' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_instances['map'] . '</a></th>
<th width="30%"><a href="instances.php?order_by=level_min&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'level_min' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_instances['level_min'] . '</a></th>
<th width="30%"><a href="instances.php?order_by=level_max&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'level_max' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_instances['level_max'] . '</a></th>
</tr>';
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
while ($instances = $sqlw->fetch_assoc($result)) {
$days = floor(round($instances['reset_delay'] / 3600) / 24);
$hours = round($instances['reset_delay'] / 3600) - $days * 24;
$reset = "";
if ($days) {
$reset .= $days . ' days';
}
if ($hours) {
$reset .= $hours . ' hours';
}
$output .= '
<tr valign="top">
<td>' . get_map_name($instances['map'], $sqlm) . ' (' . $instances['map'] . ')</td>
<td>' . $instances['level_min'] . '</td>
<td>' . $instances['level_max'] . '</td>
</tr>';
}
unset($reset);
unset($hours);
unset($days);
unset($instances);
unset($result);
$output .= '
<tr>
<td colspan="3" class="hidden" align="right" width="25%">';
// multi page links
$output .= generate_pagination('instances.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start);
unset($start);
$output .= '
</td>
</tr>
<tr>
<td colspan="3" class="hidden" align="right">' . $lang_instances['total'] . ' : ' . $all_record . '</td>
</tr>
</table>
</center>';
}
示例10: mysql_query
echo "<tr>Поиск существ</tr>";
if ($name != "") {
$res = mysql_query("SELECT * FROM `creature_template` WHERE name like '%{$name}%' ORDER BY `name`") or die(mysql_error());
} else {
if ($entry != "") {
$res = mysql_query("SELECT * FROM `creature_template` WHERE entry = '{$entry}' ORDER BY `name`") or die(mysql_error());
}
}
while ($row = mysql_fetch_array($res)) {
$res2 = mysql_query("SELECT * FROM `creature` WHERE id = '{$row['entry']}'") or die(mysql_error());
$count = mysql_num_rows($res2);
$row2 = mysql_fetch_array($res2);
if ($row2['map'] == 0 or $row2['map'] == 1 or $row2['map'] == 530) {
$map = get_zone_name($row2['map'], $row2['position_x'], $row2['position_y']);
} else {
$map = get_map_name($row2['map']);
}
echo "<tr>";
echo "<td><img src=img/human.gif></td>";
echo "<td><{$row['minlevel']}-{$row['maxlevel']}></td>";
if ($count == 0) {
echo "<td>{$row['name']}</td>";
} else {
echo "<td><a href=\"gps2.php?id={$row['entry']}\" target=\"zzz\">{$row['name']}";
}
if ($map != "") {
echo "<br><FONT color=#F0F00F size=-2><{$map}></FONT>";
}
echo "</a></td>";
echo "<td>{$count}</td>";
echo "</tr>";
示例11: browse_chars
//.........这里部分代码省略.........
$output .= "\n\t<table class=\"lined\">\n\t\t<tr>\n\t\t\t<th width=\"1%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=guid&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'guid' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['id']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=name&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'name' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['char_name']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=account&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'account' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['account']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=race&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'race' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['race']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=class&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'class' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['class']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=level&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'level' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['level']}</a></th>\n\t\t\t<th width=\"10%\"><a href=\"characters.php?order_by=map&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'map ' . $order_dir . ', zone' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['map']}</a></th>\n\t\t\t<th width=\"10%\"><a href=\"characters.php?order_by=zone&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'zone ' . $order_dir . ', map' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['zone']}</a></th>\n\t\t\t<th width=\"10%\"><a href=\"characters.php?order_by=gname&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'gname' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['guild']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=logout_time&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'logout_time' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['lastseen']}</a></th>\n\t\t\t<th width=\"1%\"><a href=\"characters.php?order_by=online&start={$start}" . ($search_value && $search_by ? "&search_by={$search_by}&search_value={$search_value}" : "") . "&dir={$dir}\">" . ($order_by == 'online' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_char_list['online']}</a></th>";
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$output .= '
<th width="1%">' . $lang_global['country'] . '</th>';
}
$output .= '
</tr>';
$looping = $this_page < $itemperpage ? $this_page : $itemperpage;
for ($i = 1; $i <= $looping; $i++) {
$char = $sqlr->fetch_assoc($query) or die(error($lang_global['err_no_user']));
// to disalow lower lvl gm to view accounts of other gms
$result = $sqlr->query('
SELECT gmlevel, username
FROM account
WHERE id = ' . $char['account'] . '');
$owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
if ($owner_gmlvl == null) {
$owner_gmlvl = 0;
}
$owner_acc_name = $sqlr->result($result, 0, 'username');
$lastseen = date('Y-m-d G:i:s', $char['logout_time']);
$guild_name = $sqlc->fetch_assoc($sqlc->query('
SELECT name
FROM guild
WHERE guildid = ' . $char['gname'] . ''));
if ($user_lvl >= $owner_gmlvl || $owner_acc_name == $user_name) {
$output .= '
<tr>
<td>';
if ($user_lvl >= $action_permission['delete'] || $owner_acc_name == $user_name) {
$output .= '
<input type="checkbox" name="check[]" value="' . $char['guid'] . '" onclick="CheckCheckAll(document.form1);" />';
}
$output .= '
</td>
<td>' . $char['guid'] . '</td>
<td><a href="char.php?id=' . $char['guid'] . '">' . htmlentities($char['name']) . '</a></td>
<td><a href="accounts.php?action=edit_user&error=11&id=' . $char['account'] . '">' . htmlentities($owner_acc_name) . '</a></td>
<td><img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif" onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" /></td>
<td><img src="img/c_icons/' . $char['class'] . '.gif" onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\',\'item_tooltip\')" onmouseout="toolTip()" alt="" /></td>
<td>' . char_get_level_color($char['level']) . '</td>
<td class="small"><span onmousemove="toolTip(\'MapID:' . $char['map'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_map_name($char['map'], $sqlm) . '</span></td>
<td class="small"><span onmousemove="toolTip(\'ZoneID:' . $char['zone'] . '\',\'item_tooltip\')" onmouseout="toolTip()">' . get_zone_name($char['zone'], $sqlm) . '</span></td>
<td class="small"><a href="guild.php?action=view_guild&error=3&id=' . $char['gname'] . '">' . htmlentities($guild_name['name']) . '</a></td>
<td class="small">' . $lastseen . '</td>
<td>' . ($char['online'] ? "<img src=\"img/up.gif\" alt=\"\" />" : "-") . '</td>';
if ($showcountryflag) {
$country = misc_get_country_by_account($char['account'], $sqlr, $sqlm);
$output .= "\n\t\t\t<td>" . ($country['code'] ? "<img src='img/flags/" . $country['code'] . ".png' onmousemove='toolTip(\"" . $country['country'] . "\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />" : "-") . "</td>";
}
$output .= '
</tr>';
} else {
$output .= '
<tr>
<td>*</td><td>***</td><td>***</td><td>You</td><td>Have</td><td>No</td><td class=\\"small\\">Permission</td><td>to</td><td>View</td><td>this</td><td>Data</td><td>***</td><td>*</td>';
if ($showcountryflag) {
$output .= '
<td>*</td>';
}
$output .= '
</tr>';
}
}
unset($char);
unset($result);
$output .= '
</table>
<table class="lined">
<tr>
<th>
</th>
</tr>
</table>
<table class="lined">
<tr>
<td "class="hidden" align="left" width="25%">';
$output .= '
' . $lang_char_list['tot_chars'] . ' : ' . $all_record . '
</td>
<td "class="hidden" align="right" width="25%">';
$output .= generate_pagination('characters.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1) . ($search_value && $search_by ? '&search_by=' . $search_by . '&search_value=' . $search_value . '' : ''), $all_record, $itemperpage, $start);
$output .= '
</td>
</tr>
</table>
<table class="top_hidden">
<tr>
<td>';
if ($user_lvl >= $action_permission['delete'] || $owner_acc_name == $user_name) {
makebutton($lang_char_list['del_selected_chars'], 'javascript:do_submit(\'form1\',0)" type="wrn', 220);
}
$output .= '
</td>
</tr>
</table>
</form>
</center>';
}
示例12: edit_char
function edit_char()
{
global $output, $logon_db, $characters_db, $realm_id, $corem_db, $action_permission, $user_lvl, $item_datasite, $core, $sql;
//wowhead_tt();
valid_login($action_permission["delete"]);
if (empty($_GET["id"])) {
error(lang("global", "empty_fields"));
}
$id = $_GET["id"];
// we need at least an id or we would have nothing to show
// also, make sure id is numeric to prevent SQL injection
if (empty($_GET["id"]) || !is_numeric($id)) {
error(lang("global", "empty_fields"));
}
if ($core == 1) {
$result = $sql["char"]->query("SELECT acct FROM `characters` WHERE guid='" . $id . "'");
} else {
$result = $sql["char"]->query("SELECT account AS acct FROM `characters` WHERE guid='" . $id . "'");
}
if ($sql["char"]->num_rows($result)) {
$char = $sql["char"]->fetch_assoc($result);
// we get user permissions first
$owner_acc_id = $sql["char"]->result($result, 0, "acct");
if ($core == 1) {
$result = $sql["logon"]->query("SELECT login FROM accounts WHERE acct='" . $char["acct"] . "'");
} else {
$result = $sql["logon"]->query("SELECT username AS login FROM account WHERE id='" . $char["acct"] . "'");
}
$owner_name = $sql["logon"]->result($result, 0, "login");
$sec_res = $sql["mgr"]->query("SELECT SecurityLevel AS gm FROM config_accounts WHERE Login='" . $owner_name . "'");
$owner_gmlvl = $sql["mgr"]->result($sec_res, 0, "gm");
if ($owner_gmlvl >= 1073741824) {
$owner_gmlvl -= 1073741824;
}
if ($user_lvl >= $owner_gmlvl) {
if ($core == 1) {
$query = "SELECT guid, acct, data, name, race, class, positionx, positiony,\r\n mapid, online, SUBSTRING_INDEX(SUBSTRING_INDEX(playedtime, ' ', 2),' ', -1) AS totaltime,\r\n positionz, zoneid, level, gender\r\n FROM `characters` WHERE guid='" . $id . "'";
} else {
$query = "SELECT guid, account AS acct, guid AS data, name, race, class, position_x AS positionx, position_y AS positiony,\r\n map AS mapid, online, totaltime,\r\n position_z AS positionz, zone AS zoneid, level, gender, totalHonorPoints, arenaPoints, totalKills, money\r\n FROM `characters` WHERE guid='" . $id . "'";
}
$result = $sql["char"]->query($query);
$char = $sql["char"]->fetch_assoc($result);
if ($core == 1) {
$char_data = explode(';', $char["data"]);
} else {
$char_data[PLAYER_FIELD_COINAGE] = isset($char["money"]) ? $char["money"] : 0;
$char_data[PLAYER_FIELD_HONOR_CURRENCY] = isset($char["totalHonorPoints"]) ? $char["totalHonorPoints"] : 0;
$char_data[PLAYER_FIELD_ARENA_CURRENCY] = isset($char["arenaPoints"]) ? $char["arenaPoints"] : 0;
$char_data[PLAYER_FIELD_LIFETIME_HONORBALE_KILLS] = isset($char["totalKills"]) ? $char["totalKills"] : 0;
}
if ($char["online"]) {
$online = '<font class="error">' . lang("char", "edit_offline_only_char") . '</font>';
} else {
$online = lang("char", "offline");
}
if ($core == 1) {
$char_data[PLAYER_GUILDID] = $sql["char"]->result($sql["char"]->query("SELECT guildid FROM guild_data WHERE playerid='" . $char["guid"] . "'"), 0);
$char_data[PLAYER_GUILDRANK] = $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 {
$char_data[PLAYER_GUILDID] = $sql["char"]->result($sql["char"]->query("SELECT guildid FROM guild_member WHERE guid='" . $char["guid"] . "'"), 0);
$char_data[PLAYER_GUILDRANK] = $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='" . $char_data[PLAYER_GUILDID] . "'"));
}
if ($char_data[PLAYER_GUILDID]) {
if ($user_lvl > 0) {
$guild_name = '<a href="guild.php?action=view_guild&error=3&id=' . $char_data[PLAYER_GUILDID] . '" >' . $guild_name . '</a>';
}
if ($char_data[PLAYER_GUILDRANK]) {
if ($core == 1) {
$guild_rank_query = $sql["char"]->query("SELECT rankname A rname FROM guild_ranks WHERE guildid='" . $char_data[PLAYER_GUILDID] . "' AND rid='" . $char_data[PLAYER_GUILDRANK] . "'");
} else {
$guild_rank_query = $sql["char"]->query("SELECT rname FROM guild_rank WHERE guildid='" . $char_data[PLAYER_GUILDID] . "' AND rid='" . $char_data[PLAYER_GUILDRANK] . "'");
}
$guild_rank = $sql["char"]->result($guild_rank_query, 0, "rname");
} else {
$guild_rank = lang("char", "guild_leader");
}
} else {
$guild_name = lang("global", "none");
$guild_rank = lang("global", "none");
}
$output .= '
<!-- start of char_edit.php -->
<form method="get" action="char_edit.php" id="form">
<div>
<input type="hidden" name="action" value="do_edit_char" />
<input type="hidden" name="id" value="' . $id . '" />
</div>
<table class="lined center center_text">
<tr>
<td colspan="8">
<span class="bold">' . $char["name"] . ' - <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 />
<span>' . lang("char", "location") . ': ' . get_map_name($char["mapid"]) . ' - ' . get_zone_name($char["zoneid"]) . '</span>
<br />
<span>' . 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] . '</span>
<br />
<span>' . lang("char", "guild") . ': ' . $guild_name . ' | ' . lang("char", "rank") . ': ' . $guild_rank . '</span>
<br />
//.........这里部分代码省略.........
示例13: mysql_connect
mysql_connect($config['hostname'], $config['username'], $config['password']) or die("Невозможно создать соединение с базой сервера." . mysql_error());
mysql_select_db($config['dbName']) or die(mysql_error());
echo "<html>";
echo "<head>";
echo "<meta http-equiv=Content-Type content=text/html; charset=utf-8>";
echo "<title></title>";
static $baseImagePath = "img/map_image/";
$id = intval(@$_REQUEST['id']);
if ($map == "") {
$map = intval(@$_REQUEST['map']);
}
$x = intval(@$_REQUEST['x']);
$y = intval(@$_REQUEST['y']);
$map_info = get_Map($map);
if ($map_info == 0) {
$name = get_map_name($map);
echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Отсутствует карта: {$name}</center></td></tr></table></center>";
} else {
$map = $map_info[0];
$name = $map_info[1];
$areaX1 = $map_info[2];
$areaX2 = $map_info[3];
$areaY1 = $map_info[4];
$areaY2 = $map_info[5];
$imageX = $map_info[6];
$imageY = $map_info[7];
$background = $baseImagePath . $map_info[8];
?>
<style type="text/css">
<!--
body {
示例14: instances
function instances()
{
global $output, $lang_instances, $realm_id, $world_db, $mmfpm_db, $itemperpage;
$sqlw = new SQL();
$sqlw->connect($world_db[$realm_id]['addr'], $world_db[$realm_id]['user'], $world_db[$realm_id]['pass'], $world_db[$realm_id]['name']);
//-------------------SQL Injection Prevention--------------------------------
// this page has multipage support and field ordering, so we need these
$start = isset($_GET['start']) ? $sqlw->quote_smart($_GET['start']) : 0;
if (is_numeric($start)) {
} else {
$start = 0;
}
$order_by = isset($_GET['order_by']) ? $sqlw->quote_smart($_GET['order_by']) : 'levelMin';
if (preg_match('/^[_[:lower:]]{1,11}$/', $order_by)) {
} else {
$order_by = 'levelMin';
}
$dir = isset($_GET['dir']) ? $sqlw->quote_smart($_GET['dir']) : 1;
if (preg_match('/^[01]{1}$/', $dir)) {
} else {
$dir = 1;
}
$order_dir = $dir ? 'ASC' : 'DESC';
$dir = $dir ? 0 : 1;
//-------------------SQL Injection Prevention--------------------------------
// for multipage support
$all_record = $sqlw->result($sqlw->query('SELECT count(*) FROM instance_template'), 0);
// main data that we need for this page, instances
$result = $sqlw->query('
SELECT map, levelMin, levelMax
FROM instance_template
ORDER BY ' . $order_by . ' ' . $order_dir . ' LIMIT ' . $start . ', ' . $itemperpage . ';');
//---------------Page Specific Data Starts Here--------------------------
$output .= '
<center>
<table class="top_hidden">
<tr>
<td width="25%" align="right">';
// multi page links
$output .= $lang_instances['total'] . ' : ' . $all_record . '<br /><br />' . generate_pagination('instances.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start);
// column headers, with links for sorting
$output .= '
</td>
</tr>
</table>
<table class="lined">
<tr>
<th width="20%"><a href="instances.php?order_by=map&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'map' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_instances['map'] . '</a></th>
<th width="5%"><a href="instances.php?order_by=levelMin&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'levelMin' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_instances['level_min'] . '</a></th>
<th width="5%"><a href="instances.php?order_by=levelMax&start=' . $start . '&dir=' . $dir . '"' . ($order_by === 'levelMax' ? ' class="' . $order_dir . '"' : '') . '>' . $lang_instances['level_max'] . '</a></th>
<th width="20%">' . $lang_instances['area'] . '</th>
<th width="10%">' . $lang_instances['type'] . '</th>
<th width="5%">' . $lang_instances['expansion'] . '</th>
<th width="5%">' . $lang_instances['ppl'] . '</th>
</tr>';
$sqlm = new SQL();
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
while ($instances = $sqlw->fetch_assoc($result)) {
$output .= '
<tr valign="top">
<td>' . get_map_name($instances['map'], $sqlm) . '</td>
<td>' . char_get_level_color($instances['levelMin']) . '</td>
<td>' . char_get_level_color($instances['levelMax']) . '</td>
<td>' . get_map_zone($instances['map'], $sqlm) . '</td>
<td>' . get_map_type($instances['map'], $sqlm) . '</td>
<td>' . get_map_exp($instances['map'], $sqlm) . '</td>
<td>' . get_map_ppl($instances['map'], $sqlm) . '</td>
</tr>';
}
unset($reset);
unset($hours);
unset($days);
unset($instances);
unset($result);
$output .= '
</table>
<table class="top_hidden">
<tr>
<td width="25%" align="right">';
// multi page links
$output .= $lang_instances['total'] . ' : ' . $all_record . '<br /><br />' . generate_pagination('instances.php?order_by=' . $order_by . '&dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start);
unset($start);
$output .= '
</td>
</tr>
</table>
</center>';
}
示例15: char_main
//.........这里部分代码省略.........
$output .= '
<div class="tab_content2 center">
<table class="lined" id="char_character_sheet">
<tr>
<td colspan="2">
<div>
<img src="' . char_get_avatar_img($char["level"], $char["gender"], $char["race"], $char["class"], 0) . '" alt="avatar" />
</div>
<div>';
// this_is_junk: auras are stored in a string in the characters table.
// not sure how to query a string as though it were a record
if ($core == 1) {
} else {
$a_results = $sql["char"]->query("SELECT DISTINCT spell FROM character_aura WHERE guid='" . $id . "'");
}
if ($sql["char"]->num_rows($a_results)) {
while ($aura = $sql["char"]->fetch_assoc($a_results)) {
$output .= '
<a class="char_icon_padding" href="' . $base_datasite . $spell_datasite . $aura["spell"] . '" rel="external">
<img src="' . spell_get_icon($aura["spell"]) . '" alt="' . $aura["spell"] . '" width="24" height="24" />
</a>';
}
}
$output .= '
</div>
</td>
<td colspan="4">
<span class="bold">
' . htmlentities($char["name"], ENT_COMPAT, $site_encoding) . ' -
<img src="img/c_icons/' . $char["race"] . '-' . $char["gender"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_race_name($char["race"]) . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
<img src="img/c_icons/' . $char["class"] . '.gif" onmousemove="oldtoolTip(\'' . char_get_class_name($char["class"]) . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />
- ' . lang("char", "level_short") . char_get_level_color($char["level"]) . '
</span>
<br />' . lang("char", "location") . ': ' . get_map_name($char["mapid"]) . ' - ' . get_zone_name($char["zoneid"]) . '
<br />' . lang("char", "honor_points") . ': ' . $char_data[PLAYER_FIELD_HONOR_CURRENCY] . ' | ' . lang("char", "arena_points") . ': ' . $char_data[PLAYER_FIELD_ARENA_CURRENCY] . ' | ' . lang("char", "honor_kills") . ': ' . $char_data[PLAYER_FIELD_LIFETIME_HONORBALE_KILLS] . '
<br />' . lang("char", "guild") . ': ' . $guild_name . ' | ' . lang("char", "rank") . ': ' . htmlentities($guild_rank, ENT_COMPAT, $site_encoding) . '
<br />' . lang("char", "online") . ': ' . ($char["online"] ? '<img src="img/up.gif" onmousemove="oldtoolTip(\'' . lang("char", "online") . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="online" />' : '<img src="img/down.gif" onmousemove="oldtoolTip(\'' . lang("char", "offline") . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="offline" />');
if ($showcountryflag) {
require_once 'libs/misc_lib.php';
$country = misc_get_country_by_account($char["acct"]);
$output .= ' | ' . lang("global", "country") . ': ' . ($country["code"] ? '<img src="img/flags/' . $country["code"] . '.png" onmousemove="oldtoolTip(\'' . $country["country"] . '\', \'old_item_tooltip\')" onmouseout="oldtoolTip()" alt="" />' : '-');
unset($country);
}
$output .= '
</td>
</tr>
<tr>
<td style="width: 6%;">';
if ($equiped_items[1][1]) {
$output .= '
<a class="char_icon_padding" href="' . $base_datasite . $item_datasite . $EQU_HEAD . '" rel="external" onmouseover="ShowTooltip(this,\'_b' . 'HEAD' . '\');" onmouseout="HideTooltip(\'_b' . 'HEAD' . '\');">
<img src="' . $equiped_items[1][1] . '" class="' . $equiped_items[1][2] . '" alt="Head" />
</a>';
if ($mode) {
$output .= '
<div style="position: relative;">
<a href="char.php?action=delete_item&id=' . $id . '&bag=' . $equiped_items[1][3]["bag"] . '&slot=' . $equiped_items[1][3]["slot"] . '&item=' . $equiped_items[1][3]["item_template"] . '&mode=' . $mode . '" id="ch_item_delete">
<img src="img/aff_cross.png" />
</a>
</div>';
}
// build a tooltip object for this item
$i_fields = get_item_info($equiped_items[1][3]["item_template"]);
$output .= '
<div class="item_tooltip" id="tooltip_b' . 'HEAD' . '">
<table>