Exemple #1
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;
}
Exemple #2
0
function QuestNameMatch($var, $gm)
{
    global $page_main;
    $ret = Lan_Quest_SearchByDisplayName($var["str_match"]);
    echo "<select name=\"quest_name\">\n";
    echo "<option>" . $page_main["select_action"] . "</option>\n";
    foreach ($ret as $item) {
        printf("<option value=\"%s\">%s</option>\n", Base642UTF8($item["RealName"]), $item["DisplayName"] . "(" . Base642UTF8($item["RealName"]) . ")");
    }
    echo "</select>";
    return true;
}
Exemple #3
0
function GetNPCCfg($var, $gm)
{
    global $page_main, $tbl_sys_msg;
    $name = $var["name"];
    $js_str = <<<_js_str
<script>
function ondetail(name){
\tdocument.form1.action_name.value = '46';
\tdocument.form1.npc_name.value = name;
\tdocument.form1.submit();
}
</script>
_js_str;
    echo $js_str . "\n";
    form($var, $gm);
    echo "<input type='hidden' name='npc_name' />\n";
    echo "</form>\n";
    echo "<table class='list_table'>\n";
    printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", $page_main["real_name"], "Base 64", $page_main["display_name"], $tbl_sys_msg["detail"]);
    $param = array();
    if ($var["type"] == "display_name") {
        $ret = Lan_NPC_SearchByDisplayName($name);
    } else {
        if ($var["type"] == "base64") {
            $name = base642UTF8($name);
        }
        $ret = Lan_NPC_SearchByRealName($name);
    }
    foreach ($ret as $item) {
        printf("<tr><td>%s</td><td>%s</td><td>%s</td><td><button onclick='ondetail(\"%2\$s\")'>%s</button></td></tr>\n", Base642UTF8($item["RealName"]), $item["RealName"], $item["DisplayName"], $tbl_sys_msg["detail"]);
    }
    echo "</table>\n";
    return true;
}