hxp
2025-06-04 f4a514d5ac952110da846636ecbb9de951eaf3d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
header("Content-type: text/html; charset=utf-8");
include_once "/Common/CommFunc.php";
include_once "/Account/User.php";
include_once "/language/lang.php";
 
$Permission = \User\Permission::P_KickPlayer;
$spid = $_SESSION['spid'];
$user = new \User\User($_SESSION['UserAccount']);
if (!$user->HavePermission($Permission)) {
    exit;
}
 
?>
 
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="utf-8">
    <title><?php echo \Lang\gettext("踢下线"); ?></title>
    <link rel="gettext" type="application/x-po" href="../language/<?php echo \Lang\getLang(); ?>/LC_MESSAGES/<?php echo \Lang\getjspodomain(); ?>.po" />
</head>
 
<body>
    <form id="forbitLogin" name="forbitLogin" action="/Common/GMCmdProcess.php" method="post">
        <dl>
            <dt><?php echo \Lang\gettext("踢下线"); ?></dt>
            <dd class="def_dd">
                <label><?php echo \Lang\gettext("按账号"); ?>:</label>
                <input class="long_input" type="text" name="accID" id="accID" />
                <p class="clear"></p>
            </dd>
            <dd class="def_dd">
                <label><?php echo \Lang\gettext("角色名"); ?>:</label>
                <input class="long_input" type="text" name="playerName" id="playerName" />
                <p class="clear"></p>
            </dd>
            <?php
            if ($user->NeedCheckKey()) {
                echo "<dd class=\"def_dd\">";
                echo \Lang\gettext("授权码(key)") . ":";
                echo "<input type=\"text\" name=\"key\" id=\"key\" />";
                echo "<p class=\"clear\"></p>";
                echo "</dd>";
            } else {
                echo "<input type=\"hidden\" name=\"key\" id=\"key\" />";
            }
            ?>
            <input type="hidden" name="Permission" value="<?php echo $Permission; ?>" />
            <input type="hidden" name="pack_type" id="pack_type" value="GMT_KickPlayer" />
            <dd class="submit_dd">
                <input type="submit" name="submit" value="<?php echo \Lang\gettext("提交"); ?>" onclick="return CheckKickPlayer();" />
            </dd>
        </dl>
    </form>
 
    <script type='text/javascript' src='/language/gettext.js'></script>
    <script type='text/javascript' src="/js/common.js"></script>
    <script type="text/javascript">
        function CheckKickPlayer() {
            if (!CheckKey("key")) {
                return false;
            }
 
            var tag = document.getElementById("accID").value || document.getElementById("playerName").value;
            if (!tag) {
                alert("<?php echo \Lang\gettext("请输入对象"); ?>");
                document.getElementById("playerName").focus();
                return false;
            }
 
            var br = getbr();
            var confirmStr = "";
            confirmStr += "<?php echo \Lang\gettext("确定将目标踢下线?"); ?>" + br + br;
            confirmStr += tag;
            if (!window.confirm(confirmStr)) {
                return false;
            }
 
            return true;
        }
    </script>
</body>
 
</html>