示例#1
0
function GetAllComplaints($var, $gm)
{
    global $tbl_list_complaint;
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        echo "<script src='/js/page.js'></script>\n";
        echo "<script src='/js/checkbox.js'></script>\n";
        form($var, $gm);
        checkbox(true, true);
        ReturnAndBack();
        echo "</form>\n";
        return eachServerFrame($var, $gm);
    } else {
        $serv_id = intval($var["serverindex"]);
    }
    global $page_main, $tbl_sys_msg;
    $query_string = "select ua.ua_nMsgType, us.us_sName, c.c_sName, ua.ua_sErrorMsg, ua.ua_dtTime, ua.ua_uErrorCode from tbl_user_advice ua, tbl_char c, tbl_char_static cs, tbl_user_static us where ua.cs_uId = c.cs_uId and c.cs_uId = cs.cs_uId and cs.us_uId = us.us_uId order by ua_dtTime desc";
    page($var, $query_string, 58, "Game", $serv_id, $result, $page, $desc);
    echo "<table class='list_table'>\n";
    echo "<tr><th class='type' style='width:60px;'>" . $page_main["category"] . "</th><th style='width:80px;'>" . $page_main["user_name"] . "</th><th style='width:80px;'>" . $page_main["role_name"] . "</th><th>" . $page_main["content"] . "</th><th style='width:40px;'>" . $tbl_sys_msg["status"] . "</th><th style='width:120px;'>" . $tbl_sys_msg["time"] . "</th></tr>\n";
    while ($row = mysql_fetch_row($result)) {
        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_list_complaint[$row[0]], $row[1], $row[1], $row[2], $row[2], $row[3], "-", $row[4]);
    }
    echo "</table>\n";
    echo $page;
    return true;
}
示例#2
0
function RoleToUser($var, $gm)
{
    global $page_main;
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        echo "<script src='/js/checkbox.js' type='text/javascript'></script>\n";
        form($var, $gm);
        checkbox(true, false);
        echo "</form>\n";
        ReturnAndBack();
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        return $ret;
    }
    $serverid = $var["serverindex"];
    $role_names = $var["role_name"];
    $role_names = implode("','", explode(",", $role_names));
    $qs = "select distinct us.us_uId, us.us_sName from tbl_char_static cs, tbl_char c, tbl_user_static us where cs.cs_uId = c.cs_uId and cs.us_uId = us.us_uId and c.c_sName in ('" . $role_names . "');";
    $result = MySQLQuery($qs, "Game", $serverid);
    echo "<table class='list_table'>\n";
    echo "<tr><th>" . $page_main["user_id"] . "</th><th>" . $page_main["user_name"] . "</th></tr>\n";
    while ($row = mysql_fetch_row($result)) {
        printf("<tr" . ($i++ % 2 == 0 ? "" : " class='even'") . "><td>%s</td><td><input type='checkbox' flag='user' onclick='Checkbox(this);' value='%s'/>%s</td></tr>\n", $row[0], $row[1], $row[1]);
    }
    echo "</table>\n";
    return true;
}
示例#3
0
function GetCmpstByGM($var, $gm)
{
    global $tbl_sys_msg, $page_main, $tbl_list_compensate;
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        $js_src = <<<_js_src
<script type='text/javascript' src='/js/checkbox.js'></script>
<script type='text/javascript' src='/js/page.js'></script>
<script type='text/javascript'>
function cancel(id)
{
\tdocument.form1.target = "_block"
\tdocument.form1.action_name.value='124';
\tdocument.form1.id.value=id;
\tdocument.form1.submit();
}
</script>
_js_src;
        echo $js_src . "\n";
        echo "<script type='text/javascript' src='/js/log_info.js'></script>\n";
        form($var, $gm);
        echo "<input type='hidden' name='flag' />\n";
        echo "<input type='hidden' name='role_name' />\n";
        echo "<input type='hidden' name='str' />\n";
        echo "<input type='hidden' name='urs' />\n";
        echo "<input type='hidden' name='id' />";
        checkbox(false, true);
        ReturnAndBack();
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        echo "</form>\n";
        return $ret;
    }
    $serv_id = intval($var["serverindex"]);
    $gm_name = mysql_escape_string($gm);
    $filter = "";
    if ($var["flag"] != "" || $var["role_name"] != "") {
        $filter = " and";
        if ($var["flag"] != "") {
            $filter .= " reason like '%#[" . $var["flag"] . "[%'";
        }
        if ($var["flag"] != "" && $var["role_name"] != "") {
            $filter .= " and";
        }
        if ($var["role_name"] != "") {
            $k = $var["role_name"];
            $filter .= " (reason like '%[" . $k . ",%' or reason like '%," . $k . "]%' or reason like '%," . $k . ",%' or reason like '%[" . $k . "]%')";
        }
    }
    $query = "select gca_uId, gm, action_id, reason, action_state from tbl_gm_compensate_action where server_id = '{$serv_id}' and gm = '{$gm_name}'" . $filter . " order by gca_uId desc";
    page($var, $query, 123, "GMS", 0, $result, $page, $desc);
    echo "<table class='list_table'>\n";
    echo "<tr><th style='width:60px;'>" . $page_main["user_name"] . "</th><th style='width:160px;'>" . $page_main["event_type"] . "</th><th>" . $tbl_sys_msg["desc"] . "</th><th style='width:60px;'>" . $tbl_sys_msg["act"] . "</th><th style='width:80px;'>" . $tbl_sys_msg["status"] . "</th></tr>\n";
    while ($row = mysql_fetch_row($result)) {
        printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class='server' title='" . $serv_id . "'>%s</td></tr>", $row[1], GetGMCommandLogAction($row[2]), LogInfo($row[3]), hasAuth(124, $gm) && $row[4] == 1 ? "<input type=button value='" . $tbl_sys_msg["cancel"] . "' onclick='cancel(" . $row[0] . ")'/>" : "", $tbl_list_compensate[$row[4]]);
    }
    echo "</table>\n";
    echo $page;
    return true;
}
示例#4
0
function GetGMMgrInfo($var, $gm)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        $js_src = <<<_js_src
<script type="text/javascript">
<!--//
function DelGMMmr(obj,id,game_id)
{
\tdocument.form1.action =  "/cgi-bin/gm_tools/FrameWork.php";
\tdocument.form1.action_name.value = '89';
\tdocument.form1.target = "block";
\tdocument.form1.id.value = id;
\tdocument.form1.game_id.value = game_id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function ChangeGMLevel(obj,id,game_id)
{\t
\tdocument.form1.action =  "/lib/gm_tools/ChangeGMLevel.php";
\tdocument.form1.target = "block";
\tdocument.form1.id.value = id;
\tdocument.form1.game_id.value = game_id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
\t
}
</script>
_js_src;
        echo $js_src . "\n";
        form($var, $gm);
        echo "<input type='hidden' name='id'/>\n";
        echo "<input type='hidden' name='game_id'/>\n";
        $ret = eachServerFrame($var, $gm);
        echo "</form>\n";
        ReturnAndBack();
        return $ret;
    } else {
        $serverid = intval($var["serverindex"]);
    }
    global $page_main, $tbl_sys_msg;
    $query_string = "select username,gv_uLevel, us_uGameID from tbl_gm_validate";
    $result = MySQLQuery($query_string, "Game", $serverid);
    echo "<table class='list_table'>\n";
    printf("<tr><th>%s</th><th>%s</th><th>%s</th></tr>\n", $page_main["user_name"], $tbl_sys_msg["level"], $tbl_sys_msg["act"]);
    while ($row = mysql_fetch_row($result)) {
        $func_str = "";
        if (hasAuth(89, $gm)) {
            $func_str .= sprintf("<input type=button value=\"%s\" onclick=\"DelGMMmr(this,'%s',%d)\"/>", $tbl_sys_msg["delete"], $row[0], $row[2]);
        }
        if (hasAuth(96, $gm)) {
            $func_str .= sprintf("<input type=button value=\"%s\" onclick=\"ChangeGMLevel(this,'%s',%d)\"/>", $tbl_sys_msg["edit"], $row[0], $row[2]);
        }
        printf("<tr" . ($i % 2 == 0 ? "" : " class='even'") . "><td>%s</td><td>%d</td><td>%s</td></tr>\n", $row[0], $row[1], $func_str);
    }
    echo "</table>\n";
    return true;
}
示例#5
0
function GetRoles($var, $gm, $fun)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        $js_src = <<<_js_src
<script type='text/javascript' src='/js/checkbox.js'></script>
<script type='text/javascript' src='/js/page.js'></script>
<script>
\tfunction ViewUser(obj,urs)
\t{
\t\talert(\$(obj).html());
\t\tdocument.form1.action_name.value = '50';
\t\tdocument.form1.serverid.value = \$(obj).parents(".panel").find("input[name='serverindex']").val();
\t\tdocument.form1.urs.value = urs;
\t\tdocument.form1.submit();
\t}
\tfunction ViewRole(obj,role_name)
\t{
\t\tdocument.form1.action_name.value = '97';
\t\tdocument.form1.serverid.value = \$(obj).parents(".panel").find("input[name='serverindex']").val();
\t\tdocument.form1.role_name.value = role_name;
\t\tdocument.form1.submit();
\t}
</script>
_js_src;
        echo $js_src . "\n";
        form($var, $gm);
        echo "<input type='hidden' name='role_name' />";
        echo "<input type='hidden' name='urs' />";
        checkbox(true, true);
        ReturnAndBack();
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        echo "</form>\n";
        return $ret;
    }
    $serverid = $var["serverindex"];
    $channel_id = $var["channel_id"];
    $tbl_content = $fun($var, $gm);
    return true;
}
示例#6
0
function AllMsg($var, $gm)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        $js_str = <<<_js_str
<script type='text/javascript' src='/js/page.js'></script>
<script>
\tfunction show_by_role(obj,role_name){
\t\tdocument.form1.role_name.value = role_name;
\t\tdocument.form1.action_name.value = '158';
\t\tdocument.form1.server.value = \$(obj).parents(".panel").attr("id").substring(4);
\t\tdocument.form1.submit();
\t}
\tsetInterval("window.location.reload()",30000);
</script>
_js_str;
        global $tbl_talk;
        echo "<h1>" . $tbl_talk["AllMsg"] . "</h1>";
        ReturnAndBack();
        echo $js_str . "\n";
        form($var, $gm);
        echo "<input type='hidden' name='role_name' />\n";
        echo "<input type='hidden' name='server' />\n";
        $ret = eachServerFrame($var, $gm);
        echo "</form>\n";
        ReturnAndBack();
        return $ret;
    }
    $serverid = $var["serverindex"];
    $query = "select c_sName, gm_dtCreateTime, gm_sContent, gm_uSenderId from tbl_gm_msg gm, tbl_char c where gm_uRecieverId = 0 and gm.gm_uSenderId = c.cs_uId order by gm_dtCreateTime desc";
    page($var, $query, 159, "Game", $serverid, $result, $page, $desc);
    $tbl_content = array();
    while ($row = mysql_fetch_row($result)) {
        $count = count($tbl_content);
        $tbl_content[$count] = $row;
    }
    echo $desc;
    ResMsg($tbl_content, $page, true, 0, true);
    return true;
}
示例#7
0
function GetMoneyCorrencyLimit($var, $gm)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        $js_src = <<<_js_src
<script type="text/javascript">
<!--//
function DelMoneyCorrencyLimit(money_func,obj)
{
\tdocument.form1.target = "block";
\tdocument.form1.action_name.value = '93';
\tdocument.form1.money_func.value = money_func;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
</script>
_js_src;
        echo $js_src;
        form($var, $gm);
        echo "<input type='hidden' name='money_func'/>\n";
        echo "</form>\n";
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        return $ret;
    } else {
        $serverid = intval($var["serverindex"]);
    }
    $query_string = "select mcl_sFunName,mcl_sModule from tbl_money_corrency_limit";
    $result = MySQLQuery($query_string, "Game", $serverid);
    $tbl_content = array();
    while ($row = mysql_fetch_row($result)) {
        $tbl_size = count($tbl_content);
        $tbl_content[$tbl_size] = $row;
    }
    RetMoneyCorrencyLimit($tbl_content, $var);
    return true;
}
示例#8
0
function GetAllCompensate($var, $gm)
{
    global $page_action_name, $page_main, $tbl_sys_msg, $tbl_game_server;
    if ($var["serverindex"] == null || $var["serverindex"] == "" and $var["flag"] == "" and $var["role_name"] == "") {
        $strjs = <<<_strjs
<script type="text/javascript" src="/js/page.js"></script>
<script type="text/javascript">
function pass(obj,id){
\tdocument.form1.action_name.value='54';
\tdocument.form1.id.value=id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.target='_block';
\tdocument.form1.submit();
}
function cancel(obj,id)
{
\tdocument.form1.action_name.value='55';
\tdocument.form1.id.value=id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.target='_block';
\tdocument.form1.submit();
}
function pass_all(){
\tdocument.form1.action_name.value='54';
\tdocument.form1.target='_block';
\tdocument.form1.submit();
}
function cancel_all(){
\tdocument.form1.action_name.value='55';
\tdocument.form1.target='_block';
\tdocument.form1.submit();
}
</script>
_strjs;
        echo $strjs . "\n";
        echo "<script type='text/javascript' src='/js/page.js'></script>\n";
        echo "<script type='text/javascript' src='/js/log_info.js'></script>\n";
        echo "<script type='text/javascript' src='/js/checkbox.js'></script>\n";
        form($var, $gm);
        checkbox(true, true);
        echo "<input type='hidden' name='flag' />\n";
        echo "<input type='hidden' name='role_name' />\n";
        echo "<input type='hidden' name='str' />\n";
        echo "<input type='hidden' name='urs' />\n";
        echo "<input type='hidden' name='id'/>\n";
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        echo "</form>\n";
        return $ret;
    } else {
        $serv_id = intval($var["serverindex"]);
    }
    $filter = "";
    if ($var["flag"] != "" || $var["role_name"] != "") {
        $filter = " and";
        if ($var["flag"] != "") {
            $filter .= " reason like '%#[" . $var["flag"] . "[%'";
        }
        if ($var["flag"] != "" && $var["role_name"] != "") {
            $filter .= " and";
        }
        if ($var["role_name"] != "") {
            $k = $var["role_name"];
            $filter .= " (reason like '%[" . $k . ",%' or reason like '%," . $k . "]%' or reason like '%," . $k . ",%' or reason like '%[" . $k . "]%')";
        }
    }
    $query_string = "select gca_uId, gm, action_id, reason from tbl_gm_compensate_action where action_state = 1 and server_id = '{$serv_id}'" . $filter . " order by gca_uId desc";
    page($var, $query_string, 53, "GMS", 0, $result, $page, $desc);
    echo "<table class='list_table'>\n";
    echo "<tr><th style='width:60px;'>" . $page_main["user_name"] . "</th><th style='width:120px;'>" . $page_main["event_type"] . "</th><th>" . $tbl_sys_msg["desc"] . "</th><th style='width:120px;'>" . $tbl_sys_msg["act"] . "</th><th>" . $tbl_sys_msg["server"] . "</th></tr>\n";
    while ($row = mysql_fetch_row($result)) {
        printf("<tr><td align='center'>%s</td><td><input type='checkbox' name='ids[]' value='%d_%d'/>%s</td><td>%s</td><td align='center'>%s%s</td><td>%s</td></tr>\n", $row[1], $row[0], $serv_id, GetGMCommandLogAction($row[2]), LogInfo($row[3]), hasAuth(54, $gm) ? "<input type=button value='" . $tbl_sys_msg["pass"] . "' onclick='pass(this," . $row[0] . ")'/>" : "", hasAuth(55, $gm) ? "<input type=button value='" . $tbl_sys_msg["cancel"] . "' onclick='cancel(this," . $row[0] . ")'/>" : "", $tbl_game_server[$serv_id][2]);
    }
    echo "</table>\n";
    echo "<table class='list_table'>\n";
    echo "<tr><td>";
    if (HasAuth(54, $gm)) {
        echo "<input type='button' onclick='pass_all()' value='" . $page_action_name[54] . "' />";
    }
    if (HasAuth(55, $gm)) {
        echo "<input type='button' onclick='cancel_all()' value='" . $page_action_name[55] . "' />";
    }
    echo "</td></tr>\n";
    echo "</table>\n";
    echo $page;
    return true;
}
示例#9
0
function GetTongInfo($var, $gm)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        global $tbl_list_tong, $tbl_sys_msg, $tbl_tong_page, $tbl_sys_msg;
        $js_src = <<<_js_src
<script type='text/javascript' src='/js/checkbox.js'></script>
<script type='text/javascript' src='/js/page.js'></script>
<script type="text/javascript">
function OnDetail(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '65';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnMember(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '64';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnDepot(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '178';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnRename(obj,id){
\tvar new_name = prompt("%s","");
\tif(new_name==null) return;
\tdocument.form1.new_name.value = new_name;
\tvar reason = prompt("%s","");
\tif(reason==null) return;
\tdocument.form1.reason.value = reason;
\tdocument.form1.target = "block";
\tdocument.form1.action_name.value = "169";
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnLevel(obj,id){
\tdocument.form1.target="block";
\tvar level = \$(obj).parents("tr").find("select").val();
\tdocument.form1.new_name.value = level;
\tvar reason = prompt("%s","");
\tif(reason==null) return;
\tdocument.form1.reason.value = reason;
\tdocument.form1.action_name.value = '172';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnMemberLog(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '73';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnItemLog(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '74';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
</script>
_js_src;
        printf($js_src . "\n", $tbl_list_tong[4][0], $tbl_sys_msg["reason"], $tbl_sys_msg["reason"], $tbl_sys_msg["reason"]);
        echo "<h1>" . $tbl_list_tong[0] . "</h1>\n";
        form($var, $gm);
        echo "<input type='hidden' name='id' />";
        echo "<input type='hidden' name='new_name' />";
        echo "<input type='hidden' name='reason' />";
        echo "<input type='hidden' name='role_name' />";
        checkbox(false, true);
        $level_str = "<select name='uPage'>";
        for ($l = 1; $l < count($tbl_tong_page); $l++) {
            $level_str .= sprintf("<option value='%d'>%s</option>", $l, $tbl_tong_page[$l]);
        }
        $level_str .= "</select>";
        ReturnAndBack();
        $var["str"] = UTF82Base64($var["str"]);
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        echo "</form>\n";
        return $ret;
    } else {
        $serverid = intval($var["serverindex"]);
    }
    $qs = "";
    if ($var["str"] != null && $var["str"] != "") {
        $qs = " and t.t_sName like '%" . Base642UTF8($var["str"]) . "%'";
    }
    global $tbl_list_tong;
    $query = "select t.t_sName, count(m.cs_uId), c.c_sName, t.t_uCamp,t.t_uHonor, t.t_uLevel, t.t_uId, t.t_uDepotID from tbl_tong t, tbl_member_tong m, tbl_char c, tbl_member_tong o where t.t_uId = o.t_uId and o.mt_sPosition=5 and o.cs_uId=c.cs_uId and t.t_uId=m.t_uId" . $qs . " group by t.t_uId order by t.t_uHonor desc";
    page($var, $query, 63, "Game", $serverid, $result, $str, $desc, "_TongInfo", $tbl_list_tong[0], array($tbl_list_tong[1][0], $tbl_list_tong[1][1], $tbl_list_tong[1][2], $tbl_list_tong[1][3], $tbl_list_tong[1][4], $tbl_list_tong[1][5]));
    $tbl_content = array();
    while ($row = mysql_fetch_row($result)) {
        $tbl_size = count($tbl_content);
        $tbl_content[$tbl_size] = $row;
    }
    echo $desc;
    RetTongInfo($tbl_content, $var, $str, $serverid);
    return true;
}
示例#10
0
function RoleSearch($var, $gm)
{
    global $tbl_role_search, $tbl_class, $tbl_camp, $tbl_sys_msg, $page_main;
    if ($var["serverindex"] == "") {
        echo "<script type=\"text/javascript\" src=\"/js/checkbox.js\" ></script>\n";
        echo "<script type=\"text/javascript\" src=\"/js/page.js\" ></script>\n";
        $js_str = <<<_js_str
<script type="text/javascript">
function OnClick(role_name,obj){
\tdocument.form1.target = "_self";
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.action_name.value = '97';
\tdocument.form1.role_name.value = role_name;
\tdocument.form1.submit();
}
</script>
_js_str;
        echo $js_str;
        form($var, $gm);
        echo "<input type='hidden' name='role_name' />\n";
        echo "<h1>" . $tbl_role_search[0] . "</h1>\n";
        checkbox(false, true);
        ReturnAndBack();
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        echo "</form>\n";
        return $ret;
    }
    $role_name = ArgRoleName();
    $serv_id = $var["serverindex"];
    $query = "select c.c_sName, us.us_sName, cb.cb_uLevel, ifnull(co_uOnServerId,0), cs.cs_uClass, cs.cs_uCamp, cs.cs_dtCreateDate, co.co_dtLastLoginTime from tbl_char c, tbl_char_static cs, tbl_user_static us, tbl_char_basic cb, tbl_char_onlinetime co left join tbl_char_online con on con.cs_uId = co.cs_uId where c.cs_uId = cs.cs_uId and cs.us_uId = us.us_uId and cs.cs_uId = cb.cs_uId and cs.cs_uId = co.cs_uId and c.c_sName like '%{$role_name}%'";
    page($var, $query, 193, "Game", $serv_id, $result, $page, $desc);
    echo $desc;
    echo "<table class='list_table'>\n";
    echo "<tr><th style=\"text-align:left;\"><input type=\"checkbox\" onclick=\"checkboxAll(this,'role')\" />" . $page_main["role_name"] . "</th>\n<th style=\"text-align:left;\"><input type=\"checkbox\" onclick=\"checkboxAll(this,'user')\" />" . $page_main["user_name"] . "</th>\n<th>" . $page_main["level"] . "</th>\n<th>" . $tbl_sys_msg["online"] . "/" . $tbl_sys_msg["offline"] . "</th>\n<th>" . $tbl_sys_msg["class"] . "</th>\n<th>" . $page_main["camp"] . "</th><th>" . $tbl_sys_msg["CreateTime"] . "</th><th>" . $tbl_sys_msg["LastLoginTime"] . "</th></tr>\n";
    while ($row = mysql_fetch_row($result)) {
        printf("<tr><td><input type=\"checkbox\" onclick=\"Checkbox(this)\" flag=\"role\" value='%s' /><a href='#' onclick='OnClick(\"%s\",this)'>%s</a></td><td><input type=\"checkbox\" onclick=\"Checkbox(this)\" flag=\"user\" value='%s' />%s</td><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[0], $row[0], $row[0], $row[1], $row[1], $row[2], $row[3] != 0 ? $tbl_sys_msg["online"] : $tbl_sys_msg["offline"], $tbl_class[$row[4]], $tbl_camp[$row[5]], $row[6], $row[7]);
    }
    echo $page;
    echo "</table>\n";
    return true;
}
示例#11
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;
}
示例#12
0
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;
}
示例#13
0
function RushRoleState($var, $gm)
{
    global $tbl_sys_msg, $page_main, $tbl_camp;
    if ($var["server_id"] == null) {
        global $tbl_gm_db, $tbl_game_server;
        $jsstr = <<<_jsstr
<script>
\$(function(){
\tvar obj = \$("#server_all");
\tvar checkbox_all_id = \$(obj).attr("id");
\tvar action_id = checkbox_all_id.substring(0,checkbox_all_id.indexOf("_"));
\t\$(obj).change(function(){
\t\tvar state = \$(obj).attr("checked");
\t\t\$("."+action_id+"_checkbox").attr("checked",state);
\t});
\t\$("."+action_id+"_checkbox").change(function(){
\t\tvar state = \$(obj).attr("checked");
\t\tif(state){
\t\t\tif(\$("."+action_id+"_checkbox:checked").length == \$("."+action_id+"_checkbox").length){
\t\t\t\t\$("#"+action_id+"_all").attr("checked",true);
\t\t\t}
\t\t}else{
\t\t\t\$("#"+action_id+"_all").attr("checked",false);
\t\t}
\t});
\tdocument.form1.action_name.value = "254";
});
</script>
_jsstr;
        echo $jsstr . "\n";
        form($var, $gm);
        echo "<table class='form_table'>";
        echo "<tr><th>" . $page_main["select_server"] . "</th><td>";
        $qs = "select rrs_uServerId from tbl_rush_role_servers group by rrs_uServerId";
        $rs = MySQLQuery($qs, "GMS");
        echo "<input type='checkbox' id='server_all' onclick='checkall(this)'/><label for='all_server'>" . $tbl_sys_msg["all_server"] . "</label><br/>";
        while ($row = mysql_fetch_row($rs)) {
            $i = $row[0];
            echo "<input type='checkbox' class='server_checkbox' id='server_" . $i . "' name='server_id[]' value='" . $i . "' onclick='chooseServer(this)' /><label for='server_" . $i . "'>" . $tbl_game_server[$i][2] . "</label><br/>";
        }
        echo "</td></tr>\n";
        echo "</table>\n";
        echo "<table class='form_table'>\n";
        echo "<tr><td style=\"text-align:center\"><input type=\"submit\" value=\"" . $tbl_sys_msg["submit"] . "\" /></td></tr>\n";
        echo "</table>\n";
        echo "</form>\n";
        return true;
    } else {
        if ($var["serverindex"] == null || $var["serverindex"] == "") {
            $ret = eachServerFrame($var, $gm);
            return $ret;
        }
        $serverid = $var["serverindex"];
        echo "<table class='info_table'>\n";
        $qs = "select sc_sVarValue from tbl_conf_server where sc_sVarName = 'RushRegisterAccountFlag'";
        $rs = MySQLQuery($qs, "Game", $serverid);
        if ($row = mysql_fetch_row($rs)) {
            echo "<tr><th>" . $tbl_sys_msg["on"] . "/" . $tbl_sys_msg["off"] . "</th><td>" . ($row[0] == 0 ? $tbl_sys_msg["off"] : $tbl_sys_msg["on"]) . "</td></tr>\n";
        }
        $qs = "select sc_sVarValue from tbl_conf_server where sc_sVarName = 'MaxRushRoleNumPerServer'";
        $rs = MySQLQuery($qs, "Game", $serverid);
        if ($row = mysql_fetch_row($rs)) {
            echo "<tr><th>" . $page_main["RoleNumPerServer"] . "</th><td>" . $row[0] . "</td></tr>\n";
        }
        $qs = "select sc_sVarValue from tbl_conf_server where sc_sVarName = 'MaxRushRoleNumPerCamp'";
        $rs = MySQLQuery($qs, "Game", $serverid);
        if ($row = mysql_fetch_row($rs)) {
            echo "<tr><th>" . $page_main["RoleNumPerCamp"] . "</th><td>" . $row[0] . "</td></tr>\n";
        }
        $qs = "select sc_sVarValue from tbl_conf_server where sc_sVarName = 'MaxRushRoleNumPerAccount'";
        $rs = MySQLQuery($qs, "Game", $serverid);
        if ($row = mysql_fetch_row($rs)) {
            echo "<tr><th>" . $page_main["RoleNumPerAccount"] . "</th><td>" . $row[0] . "</td></tr>\n";
        }
        $total = 0;
        $qs = "select cs.cs_uCamp, count(*) from tbl_char c,tbl_char_static cs where c.cs_uId = cs.cs_uId group by cs.cs_uCamp";
        $rs = MySQLQuery($qs, "Game", $serverid);
        while ($row = mysql_fetch_row($rs)) {
            echo "<tr><th>" . $tbl_camp[$row[0]] . "</th><td>" . $row[1] . "</td></tr>\n";
            $total += $row[1];
        }
        echo "<tr><th>" . $tbl_sys_msg["total"] . "</th><td>{$total}</td></tr>\n";
        echo "</table>\n";
        return true;
    }
}