mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Well, Doug asked for it so ... now I really am going to bed.
git-svn-id: file:///svn/phpbb/trunk@2784 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
eff7c5e37d
commit
03f9b1f98b
2 changed files with 23 additions and 7 deletions
|
@ -70,11 +70,27 @@ $current_time = time();
|
||||||
//
|
//
|
||||||
if ( isset($HTTP_POST_VARS['bansubmit']) )
|
if ( isset($HTTP_POST_VARS['bansubmit']) )
|
||||||
{
|
{
|
||||||
$ban_end = ( !empty($HTTP_POST_VARS['banlength']) ) ? $current_time + ( intval($HTTP_POST_VARS['banlength']) * 60 ) : 0;
|
|
||||||
$ban_reason = ( isset($HTTP_POST_VARS['banreason']) ) ? $HTTP_POST_VARS['banreason'] : '';
|
$ban_reason = ( isset($HTTP_POST_VARS['banreason']) ) ? $HTTP_POST_VARS['banreason'] : '';
|
||||||
$ban_list = array_unique(explode("\n", $HTTP_POST_VARS['ban']));
|
$ban_list = array_unique(explode("\n", $HTTP_POST_VARS['ban']));
|
||||||
$ban_list_log = implode(', ', $ban_list);
|
$ban_list_log = implode(', ', $ban_list);
|
||||||
|
|
||||||
|
if ( !empty($HTTP_POST_VARS['banlength']) )
|
||||||
|
{
|
||||||
|
if ( $HTTP_POST_VARS['banlength'] != -1 || empty($HTTP_POST_VARS['banlengthother']) )
|
||||||
|
{
|
||||||
|
$ban_end = max($current_time, $current_time + ( intval($HTTP_POST_VARS['banlength']) * 60 ));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ban_other = explode('-', $HTTP_POST_VARS['banlengthother']);
|
||||||
|
$ban_end = max($current_time, gmmktime(0, 0, 0, $ban_other[1], $ban_other[2], $ban_other[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ban_end = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$banlist = array();
|
$banlist = array();
|
||||||
|
|
||||||
switch ( $mode )
|
switch ( $mode )
|
||||||
|
@ -313,8 +329,7 @@ else if ( isset($HTTP_POST_VARS['unbansubmit']) )
|
||||||
add_admin_log('log_unban_' . $mode, sizeof($HTTP_POST_VARS['unban']));
|
add_admin_log('log_unban_' . $mode, sizeof($HTTP_POST_VARS['unban']));
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = $lang['Ban_update_sucessful'] . '<br /><br />' . sprintf($lang['Click_return_banadmin'], '<a href="' . "admin_ban.$phpEx$SID&mode=$mode" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>');
|
message_die(MESSAGE, $lang['Ban_update_sucessful']);
|
||||||
message_die(MESSAGE, $message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -332,7 +347,7 @@ $db->sql_query($sql);
|
||||||
//
|
//
|
||||||
// Ban length options
|
// Ban length options
|
||||||
//
|
//
|
||||||
$ban_end_text = array(0 => $lang['Permanent'], 30 => $lang['30_Mins'], 60 => $lang['1_Hour'], 360 => $lang['6_Hours'], 1440 => $lang['1_Day'], 10080 => $lang['7_Days'], 20160 => $lang['2_Weeks'], 40320 => $lang['1_Month']);
|
$ban_end_text = array(0 => $lang['Permanent'], 30 => $lang['30_Mins'], 60 => $lang['1_Hour'], 360 => $lang['6_Hours'], 1440 => $lang['1_Day'], 10080 => $lang['7_Days'], 20160 => $lang['2_Weeks'], 40320 => $lang['1_Month'], -1 => $lang['Other']);
|
||||||
|
|
||||||
$ban_end_options = '';
|
$ban_end_options = '';
|
||||||
foreach ( $ban_end_text as $length => $text )
|
foreach ( $ban_end_text as $length => $text )
|
||||||
|
@ -497,7 +512,7 @@ switch ( $mode )
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row2" width="45%"><?php echo $lang['Ban_length']; ?>:</td>
|
<td class="row2" width="45%"><?php echo $lang['Ban_length']; ?>:</td>
|
||||||
<td class="row2"><select name="banlength"><?php echo $ban_end_options; ?></select></td>
|
<td class="row2"><select name="banlength"><?php echo $ban_end_options; ?></select> <input type="text" name="banlengthother" maxlength="10" size="10" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row2" width="45%"><?php echo $lang['Ban_reason']; ?>:</td>
|
<td class="row2" width="45%"><?php echo $lang['Ban_reason']; ?>:</td>
|
||||||
|
|
|
@ -297,16 +297,17 @@ $lang['Click_return_forumauth'] = 'Click %sHere%s to return to Forum Permissions
|
||||||
//
|
//
|
||||||
// Banning
|
// Banning
|
||||||
//
|
//
|
||||||
$lang['Ban_explain'] = 'Here you can control the banning of users. You can achieve this by banning either or both of a specific user or an individual or range of IP addresses or hostnames. These methods prevent a user reaching any part of the board. You can give a short (255 character) reason for the ban if you wish. This will be displayed in the admin log.';
|
$lang['Ban_explain'] = 'Here you can control the banning of users by name, IP or email address. These methods prevent a user reaching any part of the board. You can give a short (255 character) reason for the ban if you wish. This will be displayed in the admin log. The length of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select <u>Other</u> for the ban length and enter a date in yyyy-mm-dd format.';
|
||||||
|
|
||||||
$lang['Ban_length'] = 'Length of ban';
|
$lang['Ban_length'] = 'Length of ban';
|
||||||
$lang['Permanent'] = 'Permanent';
|
$lang['Permanent'] = 'Permanent';
|
||||||
$lang['30_Mins'] = '30 Minutes';
|
$lang['30_Mins'] = '30 Minutes';
|
||||||
$lang['1_Hour'] = '1 Hour';
|
$lang['1_Hour'] = '1 Hour';
|
||||||
$lang['6_Hours'] = '6 Hours';
|
$lang['6_Hours'] = '6 Hours';
|
||||||
|
$lang['Other'] = 'Other';
|
||||||
$lang['Ban_reason'] = 'Reason for ban';
|
$lang['Ban_reason'] = 'Reason for ban';
|
||||||
|
|
||||||
$lang['Ban_username_explain'] = 'You can ban multiple users in one go just enter each name on a new line';
|
$lang['Ban_username_explain'] = 'You can ban multiple users in one go by entering each name on a new line. Use the <u>Find a Username</u> facility to look up and add one or more users automatically.';
|
||||||
$lang['Unban_username'] = 'Un-ban usernames';
|
$lang['Unban_username'] = 'Un-ban usernames';
|
||||||
$lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser';
|
$lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue