mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Adding confirm boxes.
git-svn-id: file:///svn/phpbb/trunk@7422 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -35,6 +35,7 @@ class mcp_ban
|
||||
// Ban submitted?
|
||||
if ($bansubmit)
|
||||
{
|
||||
|
||||
// Grab the list of entries
|
||||
$ban = request_var('ban', '');
|
||||
$ban_len = request_var('banlength', 0);
|
||||
@@ -42,12 +43,28 @@ class mcp_ban
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = request_var('banreason', '', true);
|
||||
$ban_give_reason = request_var('bangivereason', '', true);
|
||||
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
if (confirm_box(true))
|
||||
{
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'mode' => $mode,
|
||||
'ban' => $ban,
|
||||
'bansubmit' => true,
|
||||
'banlength' => $ban_len,
|
||||
'banlengthother' => $ban_len_other,
|
||||
'banexclude' => $ban_exclude,
|
||||
'banreason' => $ban_reason,
|
||||
'bangivereason' => $ban_give_reason)));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($unbansubmit)
|
||||
@@ -56,9 +73,19 @@ class mcp_ban
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
user_unban($mode, $ban);
|
||||
if (confirm_box(true))
|
||||
{
|
||||
user_unban($mode, $ban);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'mode' => $mode,
|
||||
'unbansubmit' => true,
|
||||
'unban' => $ban)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user