diff --git a/Admin/Templates/ban.tpl b/Admin/Templates/ban.tpl index 1660e591..b479d23e 100644 --- a/Admin/Templates/ban.tpl +++ b/Admin/Templates/ban.tpl @@ -53,7 +53,7 @@ if(isset($_POST['action']) && $_POST['action'] == 'addBan') { } } -// ========================= HANDLE ADD IP BAN (issue #185) ========================= +// ========================= HANDLE ADD IP BAN ========================= if(isset($_POST['action']) && $_POST['action'] == 'addIpBan') { $ip = trim($_POST['ip'] ?? ''); $reason = trim($_POST['reason'] ?? ''); @@ -75,168 +75,141 @@ if(isset($_POST['action']) && $_POST['action'] == 'addIpBan') { $bannedUsers = $admin->search_banned(); $bannedIps = $admin->search_banned_ip(); $banHistory = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."banlist WHERE active=0 ORDER BY id DESC LIMIT 50"); +$historyCount = $banHistory ? mysqli_num_rows($banHistory) : 0; ?>
- +

Ban Management

-
- +
+
Active User Bans
+
Active IP Bans
+
History (last 50)
+
+ +
+
-

- - Add New Ban -

+

Add New Ban

- +
-
- +
+
- +
-

- - Active Bans () -

+

Active Bans

- getUserField($b['uid'],'username',0) ?: $b['name']; - $end = $b['end'] ? date("d.m H:i",$b['end']) : '∞'; - ?> + getUserField($b['uid'],'username',0) ?: $b['name']; $end = $b['end'] ? date("d.m H:i",$b['end']) : '∞'; ?>
-
-
-
-
-
- - -
+
+
No active bans
'; }?>
-
- -
- +
-

- - Ban IP Address -

+

Ban IP Address

- +
-
- +
+
- +
-

- - Active IP Bans () -

+

Active IP Bans

- +
-
-
-
-
-
- - -
+
+
No active IP bans
'; }?>
-
- -
-

- - Ban History -

-
- 0){ while($h=mysqli_fetch_assoc($banHistory)){ - $end = $h['end'] ? date("d.m H:i",$h['end']) : '∞'; - ?> -
-
-
-
+ +
+

Ban History

+
+ 0){ while($h=mysqli_fetch_assoc($banHistory)){ $end = $h['end'] ? date("d.m H:i",$h['end']) : '∞'; ?> +
+
+
- -
- No history
'; }?> + No history
'; }?> +
\ No newline at end of file