forked from NB-Core/lotgd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bans.php
83 lines (69 loc) · 2.17 KB
/
bans.php
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
<?php
//addnews ready
// mail ready
require_once("common.php");
require_once("lib/showform.php");
require_once("lib/datetime.php");
require_once("lib/sanitize.php");
require_once("lib/names.php");
tlschema("bans");
check_su_access(SU_EDIT_BANS);
$op = httpget('op');
$userid=httpget("userid");
page_header("Ban Editor");
$sort = httpget('sort');
$gentime = 0;
$gentimecount = 0;
$order = "acctid";
if ($sort!="") $order = "$sort";
$display = 0;
$query = httppost('q');
if ($query === false) $query = httpget('q');
if (!$query && $sort) $query = "%";
if ($op=="search" || $op== ""){
require_once("lib/lookup_user.php");
list($searchresult, $err) = lookup_user($query, $order);
$op = "";
if ($err) {
output($err);
} else {
if ($searchresult) $display = 1;
}
}
output("`\$`cWelcome to the Ban Editor`c`0`n`n");
rawoutput("<form action='bans.php?op=search' method='POST'>");
output("Search users by any field: ");
rawoutput("<input name='q' id='q'>");
$se = translate_inline("Search");
rawoutput("<input type='submit' class='button' value='$se'>");
rawoutput("</form>");
rawoutput("<script language='JavaScript'>document.getElementById('q').focus();</script>");
addnav("","bans.php?op=search");
require_once("lib/superusernav.php");
superusernav();
addnav("Bans");
addnav("Add a ban","bans.php?op=setupban");
addnav("List/Remove bans","bans.php?op=removeban");
addnav("Search for banned user","bans.php?op=searchban");
switch($op) {
case "setupban":
require("lib/bans/case_setupban.php");
break;
case "saveban":
require("lib/bans/case_saveban.php");
break;
case "delban":
require("lib/bans/case_delban.php");
break;
case "removeban":
require("lib/bans/case_removeban.php");
break;
case "searchban":
require("lib/bans/case_searchban.php");
break;
default:
output("From here, you can issue bans for players from being able to play.`n`nBased on the ID = cookie on the machine AND/OR on the IP they accessed the char last the ban takes effect.`n`nNote: Locked chars stay locked, even after they delete their cookie / change their IP.`n`nHowever, they can make new chars and login in that case. You cannot control this.");
require("lib/bans/case_.php");
}
page_footer();
?>