2 require_once "../common.php";
4 require_once "../header.php";
7 $ban_exceptions = $rpc->serverbanexception()->getAll();
10 <h4
>Ban Exceptions Overview
</h4
>
11 Here is where you can make an exception to bans
, that is
, to make it so that the target mask is exempt from the ban types you specify
.<br
>
13 <p
><button type
="button" class="btn btn-primary" data
-toggle
="modal" data
-target
="#myModal">
16 <div
class="modal fade" id
="myModal" tabindex
="-1" role
="dialog" aria
-labelledby
="confirmModalCenterTitle" aria
-hidden
="true">
17 <div
class="modal-dialog modal-dialog-centered modal-lg" role
="document">
18 <div
class="modal-content">
19 <div
class="modal-header">
20 <h5
class="modal-title" id
="myModalLabel">Add
new Ban Exception
</h5
>
21 <button type
="button" class="close" data
-dismiss
="modal" aria
-label
="Close">
22 <span aria
-hidden
="true">×
;</span
>
25 <div
class="modal-body">
28 <div
class="align_label">IP
/ Mask
</div
> <input
class="curvy" type
="text" id
="tkl_add" name
="tkl_add"><br
>
29 <div
class="align_label">Exception Type
: </div
> <select multiple name
="bantype" id
="bantype" data
-live
-search
="true">
30 <option value
=""></option
>
32 <option value
="k">Kill
Line (KLine
)</option
>
33 <option value
="G">Global Kill
Line (GLine
)</option
>
34 <option value
="z">Zap
Line (ZLine
)</option
>
35 <option value
="Z">Global Zap
Line (GZLine
)</option
>
36 <option value
="Q">Reserve Nick
Globally (QLine
)</option
>
37 <option value
="s">Shun
</option
>
38 <option value
="F">Spamfilter
</option
>
39 <option value
="b">Blacklist
</option
>
40 <option value
="c">Connect Flood
</option
>
41 <option value
="d">Handshake Flood
</option
>
42 <option value
="m">Max Per IP
</option
>
43 <option value
="r">Anti
-Random
</option
>
44 <option value
="8">Anti
-Mixed-UTF8
</option
>
45 <option value
="v">Versions
</option
>
47 <div
class="align_label"><label
for="banlen_w">Duration
: </label
></div
>
48 <select
class="curvy" name
="banlen_w" id
="banlen_w">
50 for ($i = 0; $i <= 56; $i++
)
53 echo "<option value=\"0w\"></option>";
56 $w = ($i == 1) ? "week" : "weeks";
57 echo "<option value=\"$i" . "w\"
>$i $w" . "</option>";
62 <select
class="curvy" name
="banlen_d" id
="banlen_d">
64 for ($i = 0; $i <= 31; $i++
)
67 echo "<option value=\"0d\"></option>";
70 $d = ($i == 1) ? "day" : "days";
71 echo "<option value=\"$i" . "d\"
>$i $d" . "</option>";
76 <select
class="curvy" name
="banlen_h" id
="banlen_h">
78 for ($i = 0; $i <= 24; $i++
)
81 echo "<option value=\"0d\"></option>";
84 $h = ($i == 1) ? "hour" : "hours";
85 echo "<option value=\"$i" . "h\"
>$i $h" . "</option>";
90 <br
><div
class="align_label"><label
for="ban_reason">Reason
: </label
></div
>
91 <input
class="curvy input_text" type
="text" id
="ban_reason" name
="ban_reason"><br
>
92 <input
class="curvy input_text" type
="checkbox" id
="soft" name
="soft">Don
't affect logged-in users (soft)
96 <div class="modal-footer">
97 <button id="CloseButton" type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
98 <button type="submit" action="post" class="btn btn-danger">Add Ban</button>
105 <table class="container-xxl table table-sm table-responsive caption-top table-striped">
106 <thead class="table-primary">
108 <th scope="col"><input type="checkbox" label='selectall
' onClick="toggle_tkl(this)" /></th>
109 <th scope="col">Mask</th>
110 <th scope="col">Duration</th>
111 <th scope="col">Reason</th>
112 <th scope="col">Set By</th>
113 <th scope="col">Set On</th>
114 <th scope="col">Expires</th>
118 foreach($ban_exceptions as $ban_exceptions)
120 $set_in_config = ((isset($ban_exceptions->set_in_config) && $ban_exceptions->set_in_config) || ($ban_exceptions->set_by == "-config-")) ? true : false;
121 echo "<tr scope='col
'>";
123 echo "<td scope=\"col\"></td>";
125 echo "<td scope=\"col\"><input type=\"checkbox\" value='" . base64_encode($ban_exceptions->name).",".base64_encode($ban_exceptions->type) . "' name=\"tklch[]\"></td>";
126 echo "<td scope=\"col\">".$ban_exceptions->name."</td>";
127 echo "<td scope=\"col\">".$ban_exceptions->duration_string."</td>";
128 echo "<td scope=\"col\">".$ban_exceptions->reason."</td>";
129 $set_by = $set_in_config ? "<span class=\"badge rounded-pill badge-secondary\">Config</span>" : show_nick_only($ban_exceptions->set_by);
130 echo "<td scope=\"col\">".$set_by."</td>";
131 echo "<td scope=\"col\">".$ban_exceptions->set_at_string."</td>";
132 echo "<td scope=\"col\">".$ban_exceptions->expire_at_string."</td>";
135 ?></tbody></table><p><button type="button" class="btn btn-danger" data-toggle="modal" data-target="#myModal2">
138 <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="confirmModalCenterTitle" aria-hidden="true">
139 <div class="modal-dialog modal-dialog-centered" role="document">
140 <div class="modal-content">
141 <div class="modal-header">
142 <h5 class="modal-title" id="myModalLabel">Confirm deletion</h5>
143 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
144 <span aria-hidden="true">×</span>
147 <div class="modal-body">
148 Are you sure you want to do this?<br>
149 This cannot be undone.
151 <div class="modal-footer">
152 <button id="CloseButton" type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
153 <button type="submit" action="post" class="btn btn-danger">Delete</button>
158 </div></form></div></div>
160 <?php require_once 'footer
.php
'; ?>