Ejemplo n.º 1
0
function GetRoleLocation($role_id, $serverid)
{
    $query_string = "select sc_sSceneName, cp_uPosX, cp_uPosY \n\t\tfrom tbl_char_position cp, tbl_scene s\n\t\twhere s.sc_uId=cp.sc_uId and cp.cs_uId='" . $role_id . "'";
    $result = MySQLQuery($query_string, "Game", $serverid);
    global $page_main;
    $str .= "<table class='list_table'>\n";
    $str .= sprintf("<tr><th>%s</th><th>%s</th><th>%s</th></tr>\n", $page_main["scene"], $page_main["x"], $page_main["y"]);
    while ($row = mysql_fetch_row($result)) {
        $str .= sprintf("<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n", Lan_Scene_GetDisplayName(Local2UTF8($row[0])), $row[1], $row[2]);
    }
    $str = $str . sprintf("</table>\n");
    return $str;
}
Ejemplo n.º 2
0
function GetRoleSceneLog($var, $gm)
{
    global $tbl_sys_msg, $page_main, $tbl_log_db, $tbl_serv_db;
    $server_id = $var["serverid"];
    LastLogTime();
    $role_id = ArgRoleId();
    if (!$role_id) {
        return true;
    }
    echo "<table class='list_table'>\n";
    printf("<tr><th style='width:120px;'>%s</th><th>%s</th></tr>\n", $tbl_sys_msg["time"], $page_main["scene"]);
    $qs = "select le.le_dtDateTime, ls.ls_sSceneName ";
    $qs .= "from tbl_log_event le, tbl_log_player lp, tbl_log_scene ls ";
    $qs .= "where ls.le_uId = le.le_uId and le.le_uId = lp.le_uId and ";
    $qs .= "lp.lcs_uId = '{$role_id}' " . getDateLimit($var, $server_id) . " ";
    $qs .= "order by le.le_uId";
    $result = MySQLQuery($qs, "Log", $server_id);
    while ($row = mysql_fetch_row($result)) {
        printf("<tr><td>%s</td><td>%s</td></tr>\n", $row[0], Lan_Scene_GetDisplayName(Local2UTF8($row[1])));
    }
    echo "</table>\n";
    return true;
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
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;
}