mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Adding confirm boxes.
git-svn-id: file:///svn/phpbb/trunk@7422 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
69d77d685b
commit
38f9f25c9c
1 changed files with 31 additions and 4 deletions
|
@ -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);
|
||||
|
@ -43,23 +44,49 @@ class mcp_ban
|
|||
$ban_reason = request_var('banreason', '', true);
|
||||
$ban_give_reason = request_var('bangivereason', '', true);
|
||||
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
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>');
|
||||
}
|
||||
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)
|
||||
{
|
||||
$ban = request_var('unban', array(''));
|
||||
|
||||
if ($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>');
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'mode' => $mode,
|
||||
'unbansubmit' => true,
|
||||
'unban' => $ban)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ban length options
|
||||
|
|
Loading…
Add table
Reference in a new issue