function RetGetTaskInfo($tbl_content, $role_name, $role_id) { $tbl_count = count($tbl_content); $str = ""; global $page_main, $tbl_sys_msg; echo "<table class='list_table'>\n"; echo sprintf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", $page_main["task"], $tbl_sys_msg["status"], $page_main["begin_time"], $page_main["end_time"]); for ($i = 0; $i < $tbl_count; $i++) { printf("<tr" . ($i % 2 == 0 ? "" : " class='even'") . "><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>", Lan_Quest_GetDisplayName(Local2UTF8($tbl_content[$i][0])), $tbl_content[$i][1], $tbl_content[$i][2], "1970-01-01 08:00:00" == $tbl_content[$i][3] ? "-" : $tbl_content[$i][3]); } echo "</table>\n"; ReturnAndBack(); }
function Main() { $now = Date("Y-m-d H:i:s"); P($now . "==============================\n"); global $tbl_gm_db, $tbl_serv_db, $tbl_game_server; $str = "("; $qs = "select * from tbl_channel_word"; $result = MySQLQuery($qs, "GMS"); $words = array(); while ($row = mysql_fetch_row($result)) { array_push($words, "lcc.lcc_sMsg like '%" . $row[0] . "%'"); } $str .= implode(" or ", $words); $str .= ")"; P("Number of Check Word: " . count($words) . "\n"); $qs = "select gv_value from tbl_gm_variable where gv_name = 'ChannelChatStemp'"; $result = MySQLQuery($qs, "GMS"); if ($row = mysql_fetch_row($result)) { P("Last updated at: " . $row[0] . "\n"); $str .= " and lcc.lcc_dtChatTime > '" . $row[0] . "' and lcc.lcc_dtChatTime <= '" . $now . "'"; } $qs = "update tbl_gm_variable set gv_value = '" . $now . "' where gv_name = 'ChannelChatStemp'"; MySQLQuery($qs, "GMS"); foreach ($tbl_serv_db as $key => $dbinfo) { P("Server: " . $key . "\t"); $insert = array(); $qs = "select lcc.cs_uId,lcc.lcc_dtChatTime,{$key} as serv_id,lcc.lcc_sMsg,lcc.lcc_sChannelName from tbl_log_channel_chat lcc where " . $str; $result = MySQLQuery($qs, "GameLog", $key); while ($row = mysql_fetch_row($result)) { $qs = "select c.c_sName, us.us_sName from tbl_char c, tbl_char_static cs, tbl_user_static us where c.cs_uId = cs.cs_uId and cs.us_uId = us.us_uId and cs.cs_uId = " . $row[0]; $rs = MySQLQuery($qs, "Game", $key); if ($r = mysql_fetch_row($rs)) { $row[0] = $r[0]; $user_name = $r[1]; } else { $row[0] = "[" . $row[0] . "]"; } array_push($insert, "insert into tbl_channel_chat values('" . $row[0] . "','" . $row[3] . "','" . $row[1] . "','" . Local2UTF8($row[4]) . "'," . $row[2] . ",'" . $user_name . "')"); } P("Number of Chat: " . count($insert) . "\n"); foreach ($insert as $query) { MySQLQuery($query, "GMS"); } } }
function attrtostr($arr) { $str = ""; foreach ($arr as $k => $s) { if ($k > 1) { $str .= Local2UTF8($s); } $str .= ","; } return $str; }
function GetTongLog_Produce($var, $gm) { global $tbl_sys_msg, $page_main, $tbl_tong_msg; $tong_name = $var["tong_name"]; $serverid = $var["serverid"]; LastLogTime(); $qs = "select t_uId from tbl_tong where t_sName = '" . $tong_name . "'"; $rs = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($rs)) { $tong_id = $row[0]; } else { PrintNotice($tbl_sys_msg["nobody"]); return false; } $query = "select le.le_dtDateTime, ltip.ltip_uEventType, ltip.ltip_sName, lc.lc_sName from tbl_log_tong_item_produce ltip left join tbl_log_char lc on ltip.ltip_uExecutorId = lc.lcs_uId, tbl_log_event le where ltip.le_uId = le.le_uId and lts_uId = " . $tong_id . " " . getDateLimit($var, $serverid); $rs = MySQLQuery($query, "Log", $serverid); echo "<table class='list_table'>\n"; printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", $tbl_sys_msg["time"], $page_main["type"], $page_main["item"], $tbl_sys_msg["Executor"]); while ($row = mysql_fetch_row($rs)) { if ($row[4] == null) { $row[4] = "-"; } printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[0], $tbl_tong_msg["produce_event"][$row[1]], Lan_Item_GetDisplayName(Local2UTF8($row[2]), 10), $row[3]); } echo "</table>\n"; return true; }
function Base642UTF8($var) { return Local2UTF8(Base642Local($var)); }
function GetRoleEquipByID($var, $gm) { $serverid = intval($var["serverid"]); $item_id = mysql_escape_string($var["item_id"]); global $tbl_role_equip_info; $qs = "select * from tbl_item_static where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { $item_type = $row[1]; $item_name = Local2UTF8($row[2]); } else { return false; } $style = <<<_style <style> .equip { \twidth: 230px; \tborder: 1px solid #ccc; \tpadding:10px; \tfloat:left; } .equip div{ \tfloat:left; } .equip .head, .equip .binding, .equip .durability, .equip .armor, .equip .armor .armor_item, .equip .advance, .equip .advance_item, .equip .intensify, .equip .intensify .intensify_item, .equip .equip_info .armor_item, .equip .JingLing { \twidth: 230px; } .equip .head .name { \tfloat:left; } .equip .head .level, .equip .equip_info .weapon_speed, .equip .intensify .intensify_total, .equip .advance .advance_times, .equip .addation, .equip .JingLingSkill { \tfloat:right; \ttext-align:right; \tclear: right; } .equip .binding, .equip .durability { \ttext-align:right; } .equip .armor .armor_item .armor_name, .equip .advance .advance_item .advance_name, .equip .intensify .intensify_name, .equip .equip_info .armor_item .armor_name { \twidth: 80px; } .equip .armor .armor_item .armor_value,.equip .advance .advance_item .advance_value,.equip .intensify .intensify_value,.equip .equip_info .armor_item .armor_value { \twidth: 30px; } .equip .armor, .equip .advance, .equip .intensify, .equip .JingLing { \tmargin-top: 5px; } </style> _style; echo $style; echo "<div class='equip'>\n"; switch ($item_type) { case 5: //weapon $qs = "select * from tbl_item_weapon where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { if ($row[1] != "") { $item_name = $row[1]; } $level = $row[2]; $intensify = $row[7]; $inten = $row[8]; $DPS = $row[4]; $speed = $row[5]; $rate = $row[6]; $min_attack = intval($DPS * $speed * (1 - $rate * 0.01)); $max_attack = intval($DPS * $speed * (1 + $rate * 0.01)); $equip_info = "<div class='weapon_attack'>" . sprintf($tbl_role_equip_info[1][0][0], $min_attack, $max_attack) . "<br/>" . sprintf($tbl_role_equip_info[1][0][2], $DPS) . "</div>\n<div class='weapon_speed'>" . sprintf($tbl_role_equip_info[1][0][1], $speed) . "</div>\n"; } break; case 6: //armor //armor case 9: //Jewelry $qs = "select * from tbl_item_armor where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { if ($row[1] != "") { $item_name = $row[1]; } $level = $row[2]; $intensify = $row[8]; $inten = $row[9]; $equip_info = "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][0] . "</div><div class='armor_value'>+" . $row[4] . "</div></div>\n"; $equip_info .= "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][1] . "</div><div class='armor_value'>+" . $row[5] . "</div></div>\n"; $equip_info .= "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][2] . "</div><div class='armor_value'>+" . $row[6] . "</div></div>\n"; } break; case 7: //shield $qs = "select * from tbl_item_shield where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { if ($row[1] != "") { $item_name = $row[1]; } $level = $row[2]; $intensify = $row[4]; $inten = $row[5]; } break; case 8: //ring $qs = "select * from tbl_item_ring where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { if ($row[1] != "") { $item_name = $row[1]; } $level = $row[2]; $intensify = $row[6]; $inten = $row[7]; $DPS = $row[4]; $equip_info = "<div class='ring_attack'>" . sprintf($tbl_role_equip_info[1][2][0], $DPS) . "</div>\n"; } break; } $addation = 0; $qs = "select * from tbl_item_equip_superaddation where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { $addation = $row[1]; } $addation_rate = 0; $addation_time = ""; $addation_desc = ""; switch ($addation) { case 1: $addation_rate = 10; break; case 2: $addation_rate = 21; break; case 3: $addation_rate = 33; break; case 4: $addation_rate = 46; break; case 5: $addation_rate = 60; break; case 6: $addation_rate = 75; break; case 7: $addation_rate = 91; break; case 8: $addation_rate = 108; break; } if ($addation > 0) { $addation_time = " +" . $addation; $addatiom_desc = "<div class='addation'>(" . $tbl_role_equip_info[6] . $addation_rate . "%)</div>\n"; } $inten_times = 0; $qs = "select * from tbl_item_equip_intensify where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { $inten_times = $row[10]; $inten_totle = $row[14]; $suit_info = Lan_Equip_GetSuitInfo(Local2UTF8($row[12]), $row[16]); $suit_name = $suit_info["name"]; if ($row[6]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[6])) . "</div>\n<div class='intensify_value'>+" . $row[7] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[7] / 100) . ")</div>\n") . "</div>\n"; } if ($row[8]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[8])) . "</div>\n<div class='intensify_value'>+" . $row[9] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[9] / 100) . ")</div>\n") . "</div>\n"; } } if ($suit_name != "") { $suit_name .= "<br/>"; } echo "<div class='head'>\n<div class='name'>" . $suit_name . Lan_Item_GetDisplayName($item_name, $item_type, false) . $addation_time . "</div>\n<div class='level'>" . $level . $tbl_role_equip_info[7] . "</div>\n" . $addatiom_desc . "</div>\n"; $qs = "select * from tbl_item_is_binding where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { if ($row[1] > 0) { global $tbl_item_is_binding; echo "<div class='binding'>" . $tbl_item_is_binding[$row[1]] . "</div>\n"; } } $qs = "select * from tbl_item_equip_durability where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { echo "<div class='durability'>" . sprintf($tbl_role_equip_info[0], $row[2], $row[1]) . "</div>\n"; } echo "<div class='equip_info'>\n{$equip_info}</div>\n"; $qs = "select * from tbl_item_equip_armor where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if (mysql_num_rows($result) > 0) { echo "<div class='armor'>\n"; while ($row = mysql_fetch_row($result)) { echo "<div class='armor_item'>\n"; $armor = Lan_Equip_GetArmorPiece(Local2UTF8($row[1])); echo "<div class='armor_name'>" . $armor[1] . "</div>\n"; echo "<div class='armor_value'>+" . $armor[2] * $row[2] . "</div>\n"; if ($armor[0] > 1) { echo "<div class='aromr_time'>(" . $row[2] . "/" . $armor[0] . ")</div>\n"; } } echo "</div>\n"; } $qs = "select * from tbl_item_equip_advance where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { echo "<div class='advance'>\n"; $advance_name = Local2UTF8($row[15]); $advance_cur_tiems = $row[1]; $advance_tot_tiems = $row[2]; if ($advance_tot_tiems > 0) { echo "<div class='advance_item'>\n<div class='advance_name'>" . sprintf($tbl_role_equip_info[2], $advance_name) . "</div>\n<div class='advance_value'>" . $advance_cur_tiems . "/" . $advance_tot_tiems . "</div>\n<div class='advance_times'>" . sprintf($tbl_role_equip_info[5], $row[10]) . "</div>\n</div>\n"; } if ($row[11] != null) { echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[16])) . "</div>\n<div class='advance_value'>+" . $row[11] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[11] / 100) . ")</div>\n") . "</div>\n"; } if ($row[12] != null) { echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[17])) . "</div>\n<div class='advance_value'>+" . $row[12] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[12] / 100) . ")</div>\n") . "</div>\n"; } if ($row[13] != null) { echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[18])) . "</div>\n<div class='advance_value'>+" . $row[13] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[13] / 100) . ")</div>\n") . "</div>\n"; } if ($row[14] != null) { echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[19])) . "</div>\n<div class='advance_value'>+" . $row[14] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[14] / 100) . ")</div>\n") . "</div>\n"; } $JingLingType = Local2UTF8($row[8]); $JingLingSkill = $row[7]; echo "</div>\n"; } global $tbl_item_inten_soul; $qs = "select * from tbl_item_equip_intensifyAddAttr where is_uId = {$item_id}"; $result = MySQLQuery($qs, "Game", $serverid); if ($row = mysql_fetch_row($result)) { if ($row[1]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[1])) . "</div>\n<div class='intensify_value'>+" . $row[2] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[2] / 100) . ")</div>\n") . "</div>\n"; } if ($row[3]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[3])) . "</div>\n<div class='intensify_value'>+" . $row[4] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[4] / 100) . ")</div>\n") . "</div>\n"; } if ($row[5]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[5])) . "</div>\n<div class='intensify_value'>+" . $row[6] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[6] / 100) . ")</div>\n") . "</div>\n"; } if ($row[7]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[7])) . "</div>\n<div class='intensify_value'>+" . $row[8] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[8] / 100) . ")</div>\n") . "</div>\n"; } if ($row[9]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[9])) . "</div>\n<div class='intensify_value'>+" . $row[10] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[10] / 100) . ")</div>\n") . "</div>\n"; } if ($row[11]) { $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[11])) . "</div>\n<div class='intensify_value'>+" . $row[12] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[12] / 100) . ")</div>\n") . "</div>\n"; } } echo "<div class='intensify'>\n"; echo "<div class='intensify_item'>\n"; if ($intensify > 0) { echo "<div class='intensify_name'>" . sprintf($tbl_role_equip_info[3], $tbl_item_inten_soul[Local2Base64($inten)]) . "</div>\n<div class='intensify_value'>{$inten_times}/{$intensify}</div>\n"; } if ($inten_totle) { echo "<div class='intensify_total'>" . sprintf($tbl_role_equip_info[4], $inten_totle) . "</div>\n"; } echo "</div>\n"; echo $inten_info; echo "<div class='intensify_item'>\n"; if ($suit_info["name"] != null) { echo $suit_info["name"] . "\n"; } echo "<div style='margin-left: 10px'>\n"; if ($suit_info["part"] != null) { foreach ($suit_info["part"] as $part) { echo $suit_info["name"] . $part . "<br/>\n"; } } if ($suit_info["desc"] != null) { foreach ($suit_info["desc"] as $i => $desc) { printf($tbl_role_equip_info[8], $i); echo $desc . "<br/>\n"; } } echo "</div>\n"; if ($suit_info["talent"] != null) { echo "<div>" . $tbl_role_equip_info[9] . $suit_info["talent"] . "</div>\n"; } echo "</div>\n"; echo "</div>\n"; global $tbl_JingLing_type; echo "<div class='JingLing'><div>" . $tbl_JingLing_type[UTF82Base64($JingLingType)] . "</div>"; if ($JingLingSkill > 0) { echo "<div class='JingLingSkill'>" . Lan_Equip_GetSkillName($JingLingType, $JingLingSkill) . "</div>"; } echo "</div>\n"; echo "</div>"; return true; }
function NpcInfo($var, $gm) { if ($var["serverindex"] == null || $var["serverindex"] == "") { $ret = eachServerFrame($var, $gm); return $ret; } global $tbl_npc_info, $tbl_camp, $bid2type, $tbl_jifen, $tbl_sys_msg, $page_main; $gm_name = mysql_escape_string($gm); $serverid = intval($var["serverindex"]); $action = ""; $npc_name = $var["npc_name"]; if ($npc_name == "") { PrintNotice($tbl_sys_msg["nobody"]); return false; } $npc_name = str_replace(" ", "+", $npc_name); $param = array(); $param["npc_name"] = Base642Local($npc_name); global $tbl_game_server; $gas_host = $tbl_game_server[$serverid][0]; $gas_port = $tbl_game_server[$serverid][1]; $ret = PostData($gas_host, $gas_port, "GetNpcInfo", $param); $xml = new DOMDocument(); $xml->loadXML(Local2UTF8($ret)); $root = $xml->getElementsByTagName("root")->item(0); $npc = $root->getElementsByTagName("npc")->item(0); echo "<h2>" . $tbl_npc_info[0] . "</h2>\n"; echo "<table class='form_table'>\n"; $npc_name = $npc->getElementsByTagName("npc-name")->item(0)->nodeValue; echo "<tr><th>" . $page_main["npc_name"] . "</th><td>" . Lan_Npc_GetDisplayName($npc_name, false) . "</td></tr>\n"; echo "<tr><th>" . $page_main["real_name"] . "</th><td>" . $npc_name . "</td></tr>\n"; echo "<tr><th>Base 64</th><td>" . UTF82Base64($npc_name) . "</td></tr>\n"; echo "<tr><th>" . $tbl_sys_msg["camp"] . "</th><td>" . $tbl_camp[intval($npc->getElementsByTagName("npc-camp")->item(0)->nodeValue)] . "</td></tr>\n"; echo "</table>\n"; $questset = $npc->getElementsByTagName("npc-quests")->item(0); if ($questset) { echo "<h2>" . $tbl_npc_info[1] . "</h2>\n"; $npc_pos = $questset->getElementsByTagName("npc-quest-pos")->item(0); echo "<table class='list_table'>\n"; echo "<tr><th>" . $page_main["scene"] . "</th><th>" . $page_main["pos"] . "</th></tr>\n"; echo "<tr><td>" . Lan_Scene_GetDisplayName($npc_pos->getAttribute("scene")) . "</td><td>" . $npc_pos->getAttribute("x") . "," . $npc_pos->getAttribute("y") . "</td></tr>\n"; echo "</table>\n"; echo "<table class='list_table'>\n"; echo "<tr><th>" . $page_main["task"] . "</th></tr>\n"; $npc_quests = $questset->getElementsByTagName("npc-quest"); foreach ($npc_quests as $quest) { echo "<tr><td>" . Lan_Quest_GetDisplayName($quest->nodeValue) . "</td></tr>\n"; } echo "</table>\n"; } $shop = $npc->getElementsByTagName("npc-shop")->item(0); if ($shop) { echo "<h2>" . $tbl_npc_info[4] . "</h2>\n"; echo "<table class='form_table'>\n"; $shop_pay = $shop->getElementsByTagName("npc-shop-pay")->item(0); if ($shop_pay) { echo "<tr><th>" . $page_main["category"] . "</th><td>" . $tbl_jifen[intval($shop_pay->nodeValue)] . "</td></tr>\n"; } echo "</table>\n"; echo "<table class='list_table'>\n"; echo "<tr><th>" . $page_main["type"] . "</th><th>" . $page_main["item"] . "</th></tr>\n"; $shop_items = $shop->getElementsByTagName("npc-shop-items")->item(0)->getElementsByTagName("npc-shop-item"); foreach ($shop_items as $shop_item) { echo "<tr><td>" . $bid2type[intval($shop_item->getAttribute("type"))] . "</td><td>" . Lan_Item_GetDisplayName($shop_item->nodeValue) . "</td></tr>\n"; } } $drop = $npc->getElementsByTagName("npc-drop")->item(0); if ($drop) { echo "<h2>" . $tbl_npc_info[2] . "</h2>\n"; echo "<table class='form_table'>\n"; $drop_scene = $drop->getElementsByTagName("npc-drop-scene")->item(0)->nodeValue; if ($drop_scene) { echo "<tr><th>" . $page_main["scene"] . "</th><td>" . Lan_Scene_GetDisplayName($drop_scene) . "</td></tr>\n"; } $drop_level = $drop->getElementsByTagName("npc-drop-level")->item(0)->nodeValue; if ($drop_level) { echo "<tr><th>" . $page_main["level"] . "</th><td>" . $drop_level . "</td></tr>\n"; } echo "</table>\n"; $drop_teams = $drop->getElementsByTagName("npc-drop-team"); foreach ($drop_teams as $drop_team) { $group_rate = $drop_team->getAttribute("rate"); $drop_team_num = $drop_team->getElementsByTagName("npc-drop-team-num")->item(0); $group_number = $drop_team_num->getAttribute("min") . "-" . $drop_team_num->getAttribute("max"); echo "<table class='list_table'>\n"; echo "<tr><th style='width:50%'>" . $page_main["item"] . "</th><th style='width:25%;'>" . $tbl_npc_info[3] . "</th><th>" . $page_main["number"] . "</th></tr>\n"; $drop_items = $drop_team->getElementsByTagName("npc-drop-team-item"); foreach ($drop_items as $drop_item) { echo "<tr><td>" . Lan_Item_GetDisplayName($drop_item->nodeValue) . "</td><td>" . $group_rate . "*" . $drop_item->getAttribute("rate") . "</td><td>" . $group_number . "</td></tr>\n"; } echo "</table>\n"; } } return true; }
function GetObjDropLimit($var, $gm) { global $page_main, $tbl_sys_msg; if ($var["serverindex"] == null || $var["serverindex"] == "") { $js_src = <<<_js_src <script type="text/javascript"> function DelObjDropLimit(item_name,obj) { \tdocument.form1.target = "block"; \tdocument.form1.action_name.value = '152'; \tdocument.form1.item_name.value = item_name; \tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4); \tdocument.form1.submit(); } </script> _js_src; echo $js_src . "\n"; form($var, $gm); echo "<input type='hidden' name='item_name'/>"; echo "</form>\n"; $ret = eachServerFrame($var, $gm); ReturnAndBack(); return $ret; } else { $serverid = intval($var["serverindex"]); } $query_string = "select odl_sObjName from tbl_obj_drop_limit"; $result = MySQLQuery($query_string, "Game", $serverid); echo "<table class='list_table'>\n"; echo "<tr><th>" . $page_main["item"] . "</th><th>" . $tbl_sys_msg["act"] . "</th></tr>\n"; while ($row = mysql_fetch_row($result)) { $func_str = sprintf("<input type=button value='%s' onclick='DelObjDropLimit(\"%s\",this)'/>", $tbl_sys_msg["cancel"], Local2UTF8($row[0])); echo sprintf("<tr" . ($i % 2 == 0 ? "" : " class='even'") . "><td align='center'>%s</td><td align='center'>%s</td></tr>\n", Local2UTF8($row[0]), $func_str); } echo "</table>\n"; return true; }
function GetTongItemLog($var, $gm) { global $tbl_sys_msg, $page_main, $tbl_tong_depot_log, $tbl_tong_pos; $server_id = $var["serverid"]; $tong_name = $var["tong_name"]; LastLogTime(); $qs = "select t_uId from tbl_tong where t_sName = '{$tong_name}'"; $rs = MySQLQuery($qs, "Game", $server_id); if ($row = mysql_fetch_row($rs)) { $tong_id = $row[0]; } else { PrintNotice($tbl_sys_msg["nobody"]); return false; } echo "<table class='list_table'>\n"; printf("<tr><th style='width:120px;'>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", $tbl_sys_msg["time"], $page_main["type"], $page_main["item"], $page_main["number"], $page_main["role_name"] . "(" . $page_main["position"] . ")"); $qs = "select le.le_dtDateTime, ltd.ltd_uType, lis.lis_sName, ltd.ltd_uExecutorId, ltd.ltd_uExecutorPosition, count(*) "; $qs .= "from tbl_log_tong_depot ltd, tbl_log_event le, tbl_log_item_static lis "; $qs .= "where ltd.le_uId = le.le_uId and ltd.lis_uId = lis.lis_uId and "; $qs .= "lts_uId = {$tong_id}" . getDateLimit($var, $server_id) . " "; $qs .= "group by le.le_dtDateTime, lis.lis_sName, ltd.ltd_uExecutorId"; $result = MySQLQuery($qs, "Log", $server_id); while ($row = mysql_fetch_row($result)) { if ($row[3] == 0) { $role_name = $tbl_sys_msg["admin"]; } else { $role_name = GetRoleName($row[3], $server_id); } if ($row[4] == 0) { $position = $tbl_sys_msg["admin"]; } else { $position = $tbl_tong_pos[$row[4]]; } printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[0], $tbl_tong_depot_log[$row[1]], Lan_Item_GetDisplayName(Local2UTF8($row[2])), $row[5], $role_name . "(" . $position . ")"); } echo "</table>\n"; return true; }
function OnlineIPSearch($var, $gm) { global $tbl_serv_db, $tbl_game_server, $tbl_sys_msg, $page_main; if ($var["servers"] != null && $var["servers"] != "") { $servers = explode(",", $var["servers"]); } else { $servers = $var["server_id"]; } $ip = $var["ip"]; echo "<script type='text/javascript' src='/js/checkbox.js'></script>\n"; form($var, $gm); checkbox(true, true); echo "</form>"; echo "<table class='list_table'>\n"; echo "<tr><th>" . $tbl_sys_msg["server"] . "</th><th>" . $page_main["user_name"] . "</th><th>" . $page_main["role_name"] . "</th><th>" . $page_main["level"] . "</th><th>" . $page_main["scene"] . "</th><th>" . $tbl_sys_msg["time"] . "</th></tr>\n"; foreach ($servers as $serv) { $qs = "select us.us_sName, c.c_sName, cb.cb_uLevel, sc.sc_sSceneName, uo.uo_dtLoginTime from tbl_user_online uo, tbl_user_static us, tbl_char_static cs, tbl_char_online co, tbl_char c, tbl_char_basic cb, tbl_char_position cp, tbl_scene sc where uo.us_uId = us.us_uId and cs.us_uId = us.us_uId and cs.cs_uId = co.cs_uId and cs.cs_uId = c.cs_uId and cs.cs_uId = cb.cs_uId and cs.cs_uId = cp.cs_uId and cp.sc_uId = sc.sc_uId and uo.uo_sIp = '{$ip}'"; $rs = MySQLQuery($qs, "Game", $serv); while ($row = mysql_fetch_row($rs)) { printf("<tr><td>%s</td><td><input type='checkbox' flag='user' value='%s' onclick='Checkbox(this)' />%s</td><td><input type='checkbox' flag='role' value='%s' onclick='Checkbox(this)' />%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $tbl_game_server[$serv][2], $row[0], $row[0], $row[1], $row[1], $row[2], Lan_Scene_GetDisplayName(Local2UTF8($row[3])), $row[4]); } } echo "</table>\n"; return true; }