diff -r 1d0152181585 -r b25d34fbc7ab plugins/SpecialAdmin.php
--- a/plugins/SpecialAdmin.php Sun Jan 20 20:27:26 2008 -0500
+++ b/plugins/SpecialAdmin.php Sun Jan 20 22:34:02 2008 -0500
@@ -1969,7 +1969,8 @@
if(isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id']) && $_GET['id'] != '')
{
$e = $db->sql_query('DELETE FROM '.table_prefix.'banlist WHERE ban_id=' . intval($_GET['id']) . '');
- if(!$e) $db->_die('The ban list entry was not deleted.');
+ if ( !$e )
+ $db->_die('The ban list entry was not deleted.');
}
if(isset($_POST['create']) && !defined('ENANO_DEMO_MODE'))
{
@@ -1981,7 +1982,7 @@
}
else if ( empty($value) )
{
- echo '
Please enter something to ban.
';
+ echo '' . $lang->get('acpbc_err_empty') . '
';
}
else
{
@@ -1993,7 +1994,7 @@
$entry = trim($entry);
if ( empty($entry) )
{
- echo 'Malformed entry.
';
+ echo '' . $lang->get('acpbc_err_invalid_ip_range') . '
';
$error = true;
break;
}
@@ -2033,35 +2034,66 @@
}
else if ( isset($_POST['create']) && defined('ENANO_DEMO_MODE') )
{
- echo 'This function is disabled in the demo. Just because you don\'t like ' . htmlspecialchars($_POST['value']) . ' doesn\'t mean we don\'t like ' . htmlspecialchars($_POST['value']) . '.
';
+ echo '' . $lang->get('acpbc_err_demo', array('ban_target' => htmlspecialchars($_POST['value']))) . '
';
}
$q = $db->sql_query('SELECT ban_id,ban_type,ban_value,is_regex FROM '.table_prefix.'banlist ORDER BY ban_type;');
- if(!$q) $db->_die('The banlist data could not be selected.');
+ if ( !$q )
+ $db->_die('The banlist data could not be selected.');
echo '
';
- echo 'Type | Value | Regular Expression | |
';
- if($db->numrows() < 1) echo 'No ban rules yet. | ';
+ echo '
+ ' . $lang->get('acpbc_col_type') . ' |
+ ' . $lang->get('acpbc_col_value') . ' |
+ ' . $lang->get('acpbc_col_regex') . ' |
+ |
+
';
+ if ( $db->numrows() < 1 )
+ {
+ echo '' . $lang->get('acpbc_msg_no_rules') . ' | ';
+ }
$cls = 'row2';
- while($r = $db->fetchrow())
+ while ( $r = $db->fetchrow() )
{
$cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
- if($r['ban_type']==BAN_IP) $t = 'IP address';
- elseif($r['ban_type']==BAN_USER) $t = 'Username';
- elseif($r['ban_type']==BAN_EMAIL) $t = 'E-mail address';
- if($r['is_regex']) $g = 'Yes'; else $g = 'No';
- echo ''.$t.' | '.$r['ban_value'].' | '.$g.' | Delete |
';
+ if ( $r['ban_type'] == BAN_IP )
+ $t = $lang->get('acpbc_ban_type_ip');
+ else if ( $r['ban_type'] == BAN_USER )
+ $t = $lang->get('acpbc_ban_type_username');
+ else if ( $r['ban_type'] == BAN_EMAIL )
+ $t = $lang->get('acpbc_ban_type_email');
+ $g = ( $r['is_regex'] ) ? '' . $lang->get('acpbc_ban_regex_yes') . '' : $lang->get('acpbc_ban_regex_no');
+ echo '
+ '.$t.' |
+ '.htmlspecialchars($r['ban_value']).' |
+ '.$g.' |
+ ' . $lang->get('acpbc_btn_delete') . ' |
+
';
}
$db->free_result();
echo '
';
- echo 'Create new ban rule
';
+ echo '' . $lang->get('acpbc_heading_create_new') . '
';
echo '