From 9ee645583e17b2f068dc19ed8fd6d83d2d7eaf45 Mon Sep 17 00:00:00 2001 From: e107steved Date: Sun, 13 Jan 2008 10:51:42 +0000 Subject: [PATCH] More mods to banlist area - feature complete (for now) --- e107_admin/banlist.php | 115 ++++++- e107_admin/prefs.php | 12 +- e107_handlers/e107_class.php | 74 +++-- e107_handlers/online_class.php | 314 +++++++++---------- e107_languages/English/admin/lan_banlist.php | 24 +- e107_languages/English/admin/lan_prefs.php | 8 +- 6 files changed, 338 insertions(+), 209 deletions(-) diff --git a/e107_admin/banlist.php b/e107_admin/banlist.php index 9e7f4ab11..94fa02a5a 100644 --- a/e107_admin/banlist.php +++ b/e107_admin/banlist.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/banlist.php,v $ -| $Revision: 1.7 $ -| $Date: 2007-12-26 13:21:34 $ +| $Revision: 1.8 $ +| $Date: 2008-01-13 10:51:34 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -235,11 +235,114 @@ function select_box($name, $data, $curval = FALSE) $text = ""; +// Drop-down box for access counts +function drop_box($box_name,$curval) +{ + $opts = array(50,100,150,200,250,300,400,500); + $ret = "\n"; + return $ret; +} + switch ($action) { - case 'options' : + if(!getperms("0")) exit; + if (isset($_POST['update_ban_options'])) + { + $pref['enable_rdns'] = intval($_POST['ban_rdns_on_access']); + $pref['enable_rdns_on_ban'] = intval($_POST['ban_rdns_on_ban']); + $pref['ban_max_online_access'] = intval($_POST['ban_access_guest']).','.intval($_POST['ban_access_member']); + $pref['ban_retrigger'] = intval($_POST['ban_retrigger']); + save_prefs(); + } + + if (isset($_POST['remove_expired_bans'])) + { + $sql->db_Delete('banlist',"`banlist_bantype` < ".BAN_TYPE_WHITELIST." AND `banlist_banexpires` > 0 AND `banlist_banexpires` < ".time()); + } + + list($ban_access_guest,$ban_access_member) = explode(',',varset($pref['ban_max_online_access'],'100,200')); + $ban_access_member = max($ban_access_guest,$ban_access_member); + $text = "
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "; + + $text .= " + +
".BANLAN_63." + + ".BANLAN_65."
".BANLAN_64." + + ".BANLAN_66."
".BANLAN_67."".drop_box('ban_access_guest',$ban_access_guest).BANLAN_70.'
'. + drop_box('ban_access_member',$ban_access_member).BANLAN_69." +
".BANLAN_68."
".BANLAN_71." + + ".BANLAN_73."
+
\n +
+

"; + $ns->tablerender(BANLAN_72, $text); + + + $text = "
+
+ + + + + + + + + + +
".BANLAN_75." +
\n +
+

"; + $ns->tablerender(BANLAN_74, $text); + break; + + case 'times' : + if(!getperms("0")) exit; if ((!isset($pref['ban_messages'])) || !is_array($pref['ban_messages'])) { $pref['ban_messages'] = array_fill(0,BAN_REASON_COUNT-1,''); @@ -541,7 +644,11 @@ function banlist_adminmenu() if(getperms("0")) { - $var['options']['text'] = BANLAN_15; + $var['times']['text'] = BANLAN_15; + $var['times']['link'] = e_SELF."?times"; + $var['times']['perm'] = "0"; + + $var['options']['text'] = BANLAN_62; $var['options']['link'] = e_SELF."?options"; $var['options']['perm'] = "0"; } diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index 4a8a4d084..e1d0d570a 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $ -| $Revision: 1.9 $ -| $Date: 2008-01-06 21:16:16 $ +| $Revision: 1.10 $ +| $Date: 2008-01-13 10:51:34 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -878,14 +878,6 @@ $text .= "