mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- banning, disallow usernames and ranks
git-svn-id: file:///svn/phpbb/trunk@5323 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
28661d6106
commit
877d71528d
14 changed files with 738 additions and 831 deletions
|
@ -1,308 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
if (!empty($setmodules))
|
||||
{
|
||||
if (!$auth->acl_get('a_ban'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$filename = basename(__FILE__);
|
||||
$module['USER']['BAN_USERS'] = $filename . "$SID&mode=user";
|
||||
$module['USER']['BAN_EMAILS'] = $filename . "$SID&mode=email";
|
||||
$module['USER']['BAN_IPS'] = $filename . "$SID&mode=ip";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
// Load default header
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require('pagestart.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
|
||||
|
||||
// Do we have ban permissions?
|
||||
if (!$auth->acl_get('a_ban'))
|
||||
{
|
||||
trigger_error($user->lang['NO_ADMIN']);
|
||||
}
|
||||
|
||||
// Mode setting
|
||||
$mode = request_var('mode', '');
|
||||
$bansubmit = (isset($_POST['bansubmit'])) ? true : false;
|
||||
$unbansubmit= (isset($_POST['unbansubmit'])) ? true : false;
|
||||
|
||||
// Set some vars
|
||||
$current_time = time();
|
||||
|
||||
// Start program
|
||||
if ($bansubmit)
|
||||
{
|
||||
// Grab the list of entries
|
||||
$ban = request_var('ban', '');
|
||||
$ban_len = request_var('banlength', 0);
|
||||
$ban_len_other = request_var('banlengthother', '');
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = request_var('banreason', '');
|
||||
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']);
|
||||
}
|
||||
else if ($unbansubmit)
|
||||
{
|
||||
$ban = request_var('unban', '');
|
||||
|
||||
user_unban($mode, $ban);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']);
|
||||
}
|
||||
|
||||
//
|
||||
// Output relevant entry page
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Ban length options
|
||||
//
|
||||
$ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['OTHER'] . ' -> ');
|
||||
|
||||
$ban_end_options = '';
|
||||
foreach ($ban_end_text as $length => $text)
|
||||
{
|
||||
$ban_end_options .= '<option value="' . $length . '">' . $text . '</option>';
|
||||
}
|
||||
|
||||
// Title
|
||||
switch ($mode)
|
||||
{
|
||||
case 'user':
|
||||
$l_title = $user->lang['BAN_USERS'];
|
||||
break;
|
||||
case 'email':
|
||||
$l_title = $user->lang['BAN_EMAILS'];
|
||||
break;
|
||||
case 'ip':
|
||||
$l_title = $user->lang['BAN_IPS'];
|
||||
break;
|
||||
}
|
||||
|
||||
// Output page
|
||||
adm_page_header($l_title);
|
||||
|
||||
?>
|
||||
|
||||
<p><?php echo $user->lang['BAN_EXPLAIN']; ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'user':
|
||||
|
||||
$field = 'username';
|
||||
$l_ban_title = $user->lang['BAN_USERS'];
|
||||
$l_ban_explain = $user->lang['BAN_USERNAME_EXPLAIN'];
|
||||
$l_ban_exclude_explain = $user->lang['BAN_USER_EXCLUDE_EXPLAIN'];
|
||||
$l_unban_title = $user->lang['UNBAN_USERNAME'];
|
||||
$l_unban_explain = $user->lang['UNBAN_USERNAME_EXPLAIN'];
|
||||
$l_ban_cell = $user->lang['USERNAME'] . ': <br /><span class="gensmall">[ <a href="' . "../memberlist.$phpEx$SID&mode=searchuser&form=banning&field=ban\" onclick=\"window.open('../memberlist.$phpEx$SID&mode=searchuser&form=banning&field=ban', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;\">" . $user->lang['FIND_USERNAME'] .'</a> ]</span>';
|
||||
$l_no_ban_cell = $user->lang['NO_BANNED_USERS'];
|
||||
|
||||
$sql = 'SELECT b.*, u.user_id, u.username
|
||||
FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u
|
||||
WHERE (b.ban_end >= ' . time() . '
|
||||
OR b.ban_end = 0)
|
||||
AND u.user_id = b.ban_userid
|
||||
AND b.ban_userid <> 0
|
||||
AND u.user_id <> ' . ANONYMOUS . '
|
||||
ORDER BY u.user_id ASC';
|
||||
break;
|
||||
|
||||
case 'ip':
|
||||
|
||||
$field = 'ban_ip';
|
||||
$l_ban_title = $user->lang['BAN_IPS'];
|
||||
$l_ban_explain = $user->lang['BAN_IP_EXPLAIN'];
|
||||
$l_ban_exclude_explain = $user->lang['BAN_IP_EXCLUDE_EXPLAIN'];
|
||||
$l_unban_title = $user->lang['UNBAN_IP'];
|
||||
$l_unban_explain = $user->lang['UNBAN_IP_EXPLAIN'];
|
||||
$l_ban_cell = $user->lang['IP_HOSTNAME'] . ':';
|
||||
$l_no_ban_cell = $user->lang['NO_BANNED_IP'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_ip <> ''";
|
||||
break;
|
||||
|
||||
case 'email':
|
||||
|
||||
$field = 'ban_email';
|
||||
$l_ban_title = $user->lang['BAN_EMAILS'];
|
||||
$l_ban_explain = $user->lang['BAN_EMAIL_EXPLAIN'];
|
||||
$l_ban_exclude_explain = $user->lang['BAN_EMAIL_EXCLUDE_EXPLAIN'];
|
||||
$l_unban_title = $user->lang['UNBAN_EMAIL'];
|
||||
$l_unban_explain = $user->lang['UNBAN_EMAIL_EXPLAIN'];
|
||||
$l_ban_cell = $user->lang['EMAIL_ADDRESS'] . ':';
|
||||
$l_no_ban_cell = $user->lang['NO_BANNED_EMAIL'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_email <> ''";
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$banned_options = '';
|
||||
$ban_length = $ban_reasons = array();
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
|
||||
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
|
||||
|
||||
$time_length = (!empty($row['ban_end'])) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
|
||||
$ban_length[$row['ban_id']] = (!empty($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['OTHER'] . ' -> ' . gmdate('Y-m-d', $row['ban_end']);
|
||||
|
||||
$ban_reasons[$row['ban_id']] = addslashes($row['ban_reason']);
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $l_ban_title; ?></h1>
|
||||
|
||||
<p><?php echo $l_ban_explain; ?></p>
|
||||
|
||||
<script language="Javascript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
var ban_length = new Array();
|
||||
<?php
|
||||
|
||||
if (sizeof($ban_length))
|
||||
{
|
||||
foreach ($ban_length as $ban_id => $length)
|
||||
{
|
||||
echo "ban_length['$ban_id'] = \"$length\";\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
var ban_reason = new Array();
|
||||
<?php
|
||||
|
||||
if (sizeof($ban_reasons))
|
||||
{
|
||||
foreach ($ban_reasons as $ban_id => $reason)
|
||||
{
|
||||
echo "ban_reason['$ban_id'] = \"$reason\";\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
function display_details(option)
|
||||
{
|
||||
document.forms[0].unbanreason.value = ban_reason[option];
|
||||
document.forms[0].unbanlength.value = ban_length[option];
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<form name="banning" method="post" action="<?php echo "admin_ban.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $l_ban_title; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $l_ban_cell; ?></td>
|
||||
<td class="row2"><textarea cols="40" rows="3" name="ban"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $user->lang['BAN_LENGTH']; ?>:</td>
|
||||
<td class="row2"><select name="banlength"><?php echo $ban_end_options; ?></select> <input class="post" type="text" name="banlengthother" maxlength="10" size="10" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $user->lang['BAN_EXCLUDE']; ?>: <br /><span class="gensmall"><?php echo $l_ban_exclude_explain;;?></span></td>
|
||||
<td class="row2"><input type="radio" name="banexclude" value="1" /> <?php echo $user->lang['YES']; ?> <input type="radio" name="banexclude" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $user->lang['BAN_REASON']; ?>:</td>
|
||||
<td class="row2"><input class="post" type="text" name="banreason" maxlength="255" size="40" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"> <input type="submit" name="bansubmit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" /> <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1><?php echo $l_unban_title; ?></h1>
|
||||
|
||||
<p><?php echo $l_unban_explain; ?></p>
|
||||
|
||||
<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $l_unban_title; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ($banned_options)
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $l_ban_cell; ?>: <br /></td>
|
||||
<td class="row2"> <select name="unban[]" multiple="multiple" size="5" onchange="display_details(this.options[this.selectedIndex].value)"><?php echo $banned_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $user->lang['BAN_REASON']; ?>:</td>
|
||||
<td class="row2"><input class="row1" style="border:0px" type="text" name="unbanreason" size="40" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="45%"><?php echo $user->lang['BAN_LENGTH']; ?>:</td>
|
||||
<td class="row2"><input class="row1" style="border:0px" type="text" name="unbanlength" size="40" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><input type="submit" name="unbansubmit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" /> <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row2" colspan="2" align="center"><?php echo $l_no_ban_cell; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</table></form>
|
||||
|
||||
<?php
|
||||
|
||||
adm_page_footer();
|
||||
|
||||
?>
|
|
@ -1,157 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
if (!empty($setmodules))
|
||||
{
|
||||
if (!$auth->acl_get('a_names'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$module['USER']['DISALLOW'] = basename(__FILE__) . $SID;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
// Include files
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require('pagestart.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_user.'.$phpEx);
|
||||
|
||||
// Check permissions
|
||||
if (!$auth->acl_get('a_names'))
|
||||
{
|
||||
trigger_error($user->lang['NO_ADMIN']);
|
||||
}
|
||||
|
||||
if (isset($_POST['disallow']))
|
||||
{
|
||||
$disallowed_user = (isset($_REQUEST['disallowed_user'])) ? htmlspecialchars($_REQUEST['disallowed_user']) : '';
|
||||
$disallowed_user = str_replace('*', '%', $disallowed_user);
|
||||
|
||||
if (validate_username($disallowed_user))
|
||||
{
|
||||
$message = $user->lang['Disallowed_already'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'INSERT INTO ' . DISALLOW_TABLE . " (disallow_username)
|
||||
VALUES('" . $db->sql_escape(stripslashes($disallowed_user)) . "')";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$message = $user->lang['Disallow_successful'];
|
||||
}
|
||||
|
||||
add_log('admin', 'log_disallow_add', str_replace('%', '*', $disallowed_user));
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
else if (isset($_POST['allow']))
|
||||
{
|
||||
$disallowed_id = (isset($_REQUEST['disallowed_id'])) ? intval($_REQUEST['disallowed_id']) : '';
|
||||
|
||||
if (empty($disallowed_id))
|
||||
{
|
||||
trigger_error($user->lang['No_user_selected']);
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
|
||||
WHERE disallow_id = $disallowed_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'log_disallow_delete');
|
||||
|
||||
trigger_error($user->lang['Disallowed_deleted']);
|
||||
}
|
||||
|
||||
// Grab the current list of disallowed usernames...
|
||||
$sql = 'SELECT *
|
||||
FROM ' . DISALLOW_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$disallow_select = '';
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$disallow_select .= '<option value="' . $row['disallow_id'] . '">' . str_replace('%', '*', $row['disallow_username']) . '</option>';
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
|
||||
// Output page
|
||||
adm_page_header($user->lang['DISALLOW']);
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $user->lang['DISALLOW']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['Disallow_explain']; ?></p>
|
||||
|
||||
<form method="post" action="<?php echo "admin_disallow.$phpEx$SID"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $user->lang['Add_disallow_title']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['USERNAME']; ?><br /><span class="gensmall"><?php echo $user->lang['Add_disallow_explain']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" name="disallowed_user" size="30" /> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="disallow" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" />
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1><?php echo $user->lang['Delete_disallow_title']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['Delete_disallow_explain']; ?></p>
|
||||
|
||||
<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $user->lang['Delete_disallow_title']; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ($disallow_select != '')
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['USERNAME']; ?></td>
|
||||
<td class="row2"><select class="post" name="disallowed_id"><?php echo $disallow_select; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="allow" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" />
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row1" colspan="2" align="center"><?php echo $user->lang['No_disallowed']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</table></form>
|
||||
|
||||
<?php
|
||||
|
||||
adm_page_footer();
|
||||
|
||||
?>
|
|
@ -1,324 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
if (!empty($setmodules))
|
||||
{
|
||||
if (!$auth->acl_get('a_ranks'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$module['USER']['RANKS'] = basename(__FILE__) . $SID;
|
||||
return;
|
||||
}
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
// Let's set the root dir for phpBB
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require('pagestart.' . $phpEx);
|
||||
|
||||
// Do we have permission?
|
||||
if (!$auth->acl_get('a_ranks'))
|
||||
{
|
||||
trigger_error($user->lang['NO_ADMIN']);
|
||||
}
|
||||
|
||||
// Check mode
|
||||
if (isset($_REQUEST['mode']))
|
||||
{
|
||||
$mode = $_REQUEST['mode'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// These could be entered via a form button
|
||||
if (isset($_POST['add']))
|
||||
{
|
||||
$mode = 'add';
|
||||
}
|
||||
else if (isset($_POST['save']))
|
||||
{
|
||||
$mode = 'save';
|
||||
}
|
||||
else
|
||||
{
|
||||
$mode = '';
|
||||
}
|
||||
}
|
||||
|
||||
$rank_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
|
||||
|
||||
|
||||
//
|
||||
switch ($mode)
|
||||
{
|
||||
case 'edit':
|
||||
case 'add':
|
||||
|
||||
$data = $ranks = $existing_imgs = array();
|
||||
$result = $db->sql_query('SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
ORDER BY rank_special DESC, rank_min DESC');
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$existing_imgs[] = $row['rank_image'];
|
||||
if ($mode == 'edit' && $rank_id == $row['rank_id'])
|
||||
{
|
||||
$ranks = $row;
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
|
||||
|
||||
$edit_img = $filename_list = '';
|
||||
foreach ($imglist as $path => $img_ary)
|
||||
{
|
||||
foreach ($img_ary as $img)
|
||||
{
|
||||
$img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
|
||||
|
||||
if (!in_array($img, $existing_imgs) || $mode == 'edit')
|
||||
{
|
||||
if ($ranks && $img == $ranks['rank_image'])
|
||||
{
|
||||
$selected = ' selected="selected"';
|
||||
$edit_img = $img;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
|
||||
unset($existing_imgs);
|
||||
unset($imglist);
|
||||
|
||||
// They want to add a new rank, show the form.
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="save" />';
|
||||
|
||||
adm_page_header($user->lang['RANKS']);
|
||||
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript" defer="defer">
|
||||
<!--
|
||||
|
||||
function update_image(newimage)
|
||||
{
|
||||
document.image.src = (newimage) ? "<?php echo $phpbb_root_path . $config['ranks_path']; ?>/" + newimage : "../images/spacer.gif";
|
||||
}
|
||||
|
||||
function update_image_dimensions()
|
||||
{
|
||||
if (document.image.height && document.forms[0].height)
|
||||
{
|
||||
document.forms[0].height.value = document.image.height;
|
||||
document.forms[0].width.value = document.image.width;
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<h1><?php echo $user->lang['RANKS']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['RANKS_EXPLAIN']; ?></p>
|
||||
|
||||
<form method="post" action="<?php echo "admin_ranks.$phpEx$SID&id=$rank_id"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $user->lang['RANKS']; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="40%"><?php echo $user->lang['RANK_TITLE']; ?>: </td>
|
||||
<td class="row2"><input class="post" type="text" name="title" size="25" maxlength="40" value="<?php echo $ranks['rank_title']; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" width="40%"><?php echo $user->lang['RANK_IMAGE']; ?>:</td>
|
||||
<td class="row2"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="middle"><select name="rank_image" onchange="update_image(this.options[selectedIndex].value);"><?php echo $filename_list ?></select></td>
|
||||
<td> </td>
|
||||
<td valign="middle"><img src="<?php echo ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : '../images/spacer.gif' ?>" name="image" border="0" alt="" title="" onload="update_image_dimensions()" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['RANK_SPECIAL']; ?>: </td>
|
||||
<td class="row2"><input type="radio" name="special_rank" value="1"<?php echo ($ranks['rank_special']) ? ' checked="checked"' : ''; ?> /><?php echo $user->lang['YES']; ?> <input type="radio" name="special_rank" value="0"<?php echo (!$ranks['rank_special']) ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['NO']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['RANK_MINIMUM']; ?>: </td>
|
||||
<td class="row2"><input class="post" type="text" name="min_posts" size="5" maxlength="10" value="<?php echo ($ranks['rank_special']) ? '' : $ranks['rank_min']; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" class="btnmain" /> <input type="reset" value="<?php echo $user->lang['RESET']; ?>" class="btnlite" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
<?php
|
||||
|
||||
adm_page_footer();
|
||||
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
|
||||
//
|
||||
// Ok, they sent us our info, let's update it.
|
||||
//
|
||||
|
||||
$rank_id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;
|
||||
$rank_title = (isset($_POST['title'])) ? trim($_POST['title']) : '';
|
||||
$special_rank = (!empty($_POST['special_rank'])) ? 1 : 0;
|
||||
$min_posts = (isset($_POST['min_posts'])) ? intval($_POST['min_posts']) : -1;
|
||||
$rank_image = (isset($_POST['rank_image'])) ? trim(htmlspecialchars($_POST['rank_image'])) : '';
|
||||
|
||||
if ($special_rank == 1)
|
||||
{
|
||||
$min_posts = -1;
|
||||
}
|
||||
|
||||
// The rank image has to be a jpg, gif or png
|
||||
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
|
||||
{
|
||||
$rank_image = '';
|
||||
}
|
||||
|
||||
if ($rank_id)
|
||||
{
|
||||
$sql = "UPDATE " . RANKS_TABLE . "
|
||||
SET rank_title = '" . $db->sql_escape($rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . $db->sql_escape($rank_image) . "'
|
||||
WHERE rank_id = $rank_id";
|
||||
|
||||
$message = $user->lang['RANK_UPDATED'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)
|
||||
VALUES ('" . $db->sql_escape($rank_title) . "', $special_rank, $min_posts, '" . $db->sql_escape($rank_image) . "')";
|
||||
|
||||
$message = $user->lang['RANK_ADDED'];
|
||||
}
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('ranks');
|
||||
|
||||
trigger_error($message);
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
|
||||
// Ok, they want to delete their rank
|
||||
$rank_id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;
|
||||
|
||||
if ($rank_id)
|
||||
{
|
||||
$sql = "DELETE FROM " . RANKS_TABLE . "
|
||||
WHERE rank_id = $rank_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_rank = 0
|
||||
WHERE user_rank = $rank_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('ranks');
|
||||
|
||||
trigger_error($user->lang['RANK_REMOVED']);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['MUST_SELECT_RANK']);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
adm_page_header($user->lang['RANKS']);
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $user->lang['RANKS']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['RANKS_EXPLAIN']; ?></p>
|
||||
|
||||
<form method="post" action="<?php echo "admin_ranks.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th><?php echo $user->lang['RANK_IMAGE']; ?></th>
|
||||
<th><?php echo $user->lang['RANK_TITLE']; ?></th>
|
||||
<th><?php echo $user->lang['RANK_MINIMUM']; ?></th>
|
||||
<th><?php echo $user->lang['ACTION']; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
// Show the default page
|
||||
$sql = "SELECT * FROM " . RANKS_TABLE . "
|
||||
ORDER BY rank_min ASC, rank_special ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" align="center"><?php
|
||||
|
||||
if ($row['rank_image'])
|
||||
{
|
||||
|
||||
?><img src="<?php echo $phpbb_root_path . $config['ranks_path'] . '/' . $row['rank_image']; ?>"" border="0" alt="<?php echo $row['rank_title']; ?>" title="<?php echo $row['rank_title']; ?>" /><?php
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '-';
|
||||
}
|
||||
|
||||
?></td>
|
||||
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['rank_title']; ?></td>
|
||||
<td class="<?php echo $row_class; ?>" align="center"><?php echo ($row['rank_special']) ? '-' : $row['rank_min']; ?></td>
|
||||
<td class="<?php echo $row_class; ?>" align="center"> <a href="<?php echo "admin_ranks.$phpEx$SID&mode=edit&id=" . $row['rank_id']; ?>"><?php echo $user->lang['EDIT']; ?></a> | <a href="<?php echo "admin_ranks.$phpEx$SID&mode=delete&id=" . $row['rank_id']; ?>"><?php echo $user->lang['DELETE']; ?></a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="5" align="center"><input type="submit" class="btnmain" name="add" value="<?php echo $user->lang['ADD_RANK']; ?>" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
<?php
|
||||
|
||||
adm_page_footer();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
214
phpBB/includes/acp/acp_ban.php
Normal file
214
phpBB/includes/acp/acp_ban.php
Normal file
|
@ -0,0 +1,214 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package acp
|
||||
*/
|
||||
class acp_ban
|
||||
{
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
$bansubmit = (isset($_POST['bansubmit'])) ? true : false;
|
||||
$unbansubmit= (isset($_POST['unbansubmit'])) ? true : false;
|
||||
$current_time = time();
|
||||
|
||||
$user->add_lang('acp/ban');
|
||||
$this->tpl_name = 'acp_ban';
|
||||
|
||||
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||
|
||||
// Ban submitted?
|
||||
if ($bansubmit)
|
||||
{
|
||||
// Grab the list of entries
|
||||
$ban = request_var('ban', '');
|
||||
$ban_len = request_var('banlength', 0);
|
||||
$ban_len_other = request_var('banlengthother', '');
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = request_var('banreason', '');
|
||||
$ban_give_reason = request_var('bangivereason', '');
|
||||
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL'] . adm_back_link($u_action));
|
||||
}
|
||||
else if ($unbansubmit)
|
||||
{
|
||||
$ban = request_var('unban', array(''));
|
||||
|
||||
user_unban($mode, $ban);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL'] . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
// Ban length options
|
||||
$ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['UNTIL'] . ' -> ');
|
||||
|
||||
$ban_end_options = '';
|
||||
foreach ($ban_end_text as $length => $text)
|
||||
{
|
||||
$ban_end_options .= '<option value="' . $length . '">' . $text . '</option>';
|
||||
}
|
||||
|
||||
// Define language vars
|
||||
$this->page_title = $user->lang[strtoupper($mode) . '_BAN'];
|
||||
|
||||
$l_ban_explain = $user->lang[strtoupper($mode) . '_BAN_EXPLAIN'];
|
||||
$l_ban_exclude_explain = $user->lang[strtoupper($mode) . '_BAN_EXCLUDE_EXPLAIN'];
|
||||
$l_unban_title = $user->lang[strtoupper($mode) . '_UNBAN'];
|
||||
$l_unban_explain = $user->lang[strtoupper($mode) . '_UNBAN_EXPLAIN'];
|
||||
$l_no_ban_cell = $user->lang[strtoupper($mode) . '_NO_BANNED'];
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'user':
|
||||
|
||||
$field = 'username';
|
||||
$l_ban_cell = $user->lang['USERNAME'];
|
||||
|
||||
$sql = 'SELECT b.*, u.user_id, u.username
|
||||
FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u
|
||||
WHERE (b.ban_end >= ' . time() . '
|
||||
OR b.ban_end = 0)
|
||||
AND u.user_id = b.ban_userid
|
||||
AND b.ban_userid <> 0
|
||||
AND u.user_id <> ' . ANONYMOUS . '
|
||||
ORDER BY u.user_id ASC';
|
||||
break;
|
||||
|
||||
case 'ip':
|
||||
|
||||
$field = 'ban_ip';
|
||||
$l_ban_cell = $user->lang['IP_HOSTNAME'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_ip <> ''";
|
||||
break;
|
||||
|
||||
case 'email':
|
||||
|
||||
$field = 'ban_email';
|
||||
$l_ban_cell = $user->lang['EMAIL_ADDRESS'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_email <> ''";
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$banned_options = '';
|
||||
$ban_length = $ban_reasons = $ban_give_reasons = array();
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
|
||||
|
||||
$time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
|
||||
$ban_length[$row['ban_id']] = (isset($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['UNTIL'] . ' -> ' . $user->format_date($row['ban_end']);
|
||||
|
||||
$ban_reasons[$row['ban_id']] = $row['ban_reason'];
|
||||
$ban_give_reasons[$row['ban_id']] = $row['ban_give_reason'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($ban_length))
|
||||
{
|
||||
foreach ($ban_length as $ban_id => $length)
|
||||
{
|
||||
$template->assign_block_vars('ban_length', array(
|
||||
'BAN_ID' => $ban_id,
|
||||
'LENGTH' => $length)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($ban_reasons))
|
||||
{
|
||||
foreach ($ban_reasons as $ban_id => $reason)
|
||||
{
|
||||
$template->assign_block_vars('ban_reason', array(
|
||||
'BAN_ID' => $ban_id,
|
||||
'REASON' => addslashes(html_entity_decode($reason)))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($ban_give_reasons))
|
||||
{
|
||||
foreach ($ban_give_reasons as $ban_id => $reason)
|
||||
{
|
||||
$template->assign_block_vars('ban_give_reason', array(
|
||||
'BAN_ID' => $ban_id,
|
||||
'REASON' => addslashes(html_entity_decode($reason)))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $this->page_title,
|
||||
'L_EXPLAIN' => $l_ban_explain,
|
||||
'L_UNBAN_TITLE' => $l_unban_title,
|
||||
'L_UNBAN_EXPLAIN' => $l_unban_explain,
|
||||
'L_BAN_CELL' => $l_ban_cell,
|
||||
'L_BAN_EXCLUDE_EXPLAIN' => $l_ban_exclude_explain,
|
||||
'L_NO_BAN_CELL' => $l_no_ban_cell,
|
||||
|
||||
'S_USERNAME_BAN' => ($mode == 'user') ? true : false,
|
||||
'S_BAN_END_OPTIONS' => $ban_end_options,
|
||||
'S_BANNED_OPTIONS' => ($banned_options) ? true : false,
|
||||
'BANNED_OPTIONS' => $banned_options,
|
||||
|
||||
'U_ACTION' => $u_action,
|
||||
'U_FIND_USER' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=searchuser&form=acp_ban&field=ban",
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @package module_install
|
||||
*/
|
||||
class acp_ban_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_ban',
|
||||
'title' => 'ACP_BAN',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'email' => array('title' => 'ACP_BAN_EMAILS', 'auth' => 'acl_a_ban'),
|
||||
'ip' => array('title' => 'ACP_BAN_IPS', 'auth' => 'acl_a_ban'),
|
||||
'user' => array('title' => 'ACP_BAN_USERNAMES', 'auth' => 'acl_a_ban'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
114
phpBB/includes/acp/acp_disallow.php
Normal file
114
phpBB/includes/acp/acp_disallow.php
Normal file
|
@ -0,0 +1,114 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package acp
|
||||
*/
|
||||
class acp_disallow
|
||||
{
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
// Set up general vars
|
||||
$this->tpl_name = 'acp_disallow';
|
||||
$this->page_header = 'ACP_DISALLOW_USERNAMES';
|
||||
|
||||
$disallow = (isset($_POST['disallow'])) ? true : false;
|
||||
$allow = (isset($_POST['allow'])) ? true : false;
|
||||
|
||||
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||
|
||||
if ($disallow)
|
||||
{
|
||||
$disallowed_user = str_replace('*', '%', request_var('disallowed_user', ''));
|
||||
$message = validate_username($disallowed_user);
|
||||
|
||||
if (!$message)
|
||||
{
|
||||
$sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
|
||||
$db->sql_query($sql);
|
||||
|
||||
$message = $user->lang['DISALLOW_SUCCESSFUL'];
|
||||
add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
|
||||
}
|
||||
|
||||
trigger_error($message . adm_back_link($u_action));
|
||||
}
|
||||
else if ($allow)
|
||||
{
|
||||
$disallowed_id = request_var('disallowed_id', 0);
|
||||
|
||||
if (!$disallowed_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_USER'] . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
|
||||
WHERE disallow_id = $disallowed_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_DISALLOW_DELETE');
|
||||
|
||||
trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
// Grab the current list of disallowed usernames...
|
||||
$sql = 'SELECT *
|
||||
FROM ' . DISALLOW_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$disallow_select = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$disallow_select .= '<option value="' . $row['disallow_id'] . '">' . str_replace('%', '*', $row['disallow_username']) . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $u_action,
|
||||
'S_DISALLOWED_NAMES' => $disallow_select)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @package module_install
|
||||
*/
|
||||
class acp_disallow_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_disallow',
|
||||
'title' => 'ACP_DISALLOW',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'usernames' => array('title' => 'ACP_DISALLOW_USERNAMES', 'auth' => 'acl_a_names'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
228
phpBB/includes/acp/acp_ranks.php
Normal file
228
phpBB/includes/acp/acp_ranks.php
Normal file
|
@ -0,0 +1,228 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package acp
|
||||
*/
|
||||
class acp_ranks
|
||||
{
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
// Set up general vars
|
||||
$action = request_var('action', '');
|
||||
$action = (isset($_POST['add'])) ? 'add' : $action;
|
||||
$action = (isset($_POST['save'])) ? 'save' : $action;
|
||||
$rank_id = request_var('id', 0);
|
||||
|
||||
$this->tpl_name = 'acp_ranks';
|
||||
$this->page_title = 'ACP_MANAGE_RANKS';
|
||||
|
||||
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'save':
|
||||
|
||||
$rank_title = request_var('title', '');
|
||||
$special_rank = request_var('special_rank', 0);
|
||||
$min_posts = ($special_rank) ? -1 : request_var('min_posts', 0);
|
||||
$rank_image = request_var('rank_image', '');
|
||||
|
||||
// The rank image has to be a jpg, gif or png
|
||||
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
|
||||
{
|
||||
$rank_image = '';
|
||||
}
|
||||
|
||||
if (!$rank_title)
|
||||
{
|
||||
trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'rank_title' => $rank_title,
|
||||
'rank_special' => $special_rank,
|
||||
'rank_min' => $min_posts,
|
||||
'rank_image' => html_entity_decode($rank_image)
|
||||
);
|
||||
|
||||
if ($rank_id)
|
||||
{
|
||||
$sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
|
||||
$message = $user->lang['RANK_UPDATED'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'INSERT INTO ' . RANKS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$message = $user->lang['RANK_ADDED'];
|
||||
}
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('ranks');
|
||||
|
||||
trigger_error($message . adm_back_link($u_action));
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
|
||||
// Ok, they want to delete their rank
|
||||
if ($rank_id)
|
||||
{
|
||||
$sql = 'DELETE FROM ' . RANKS_TABLE . "
|
||||
WHERE rank_id = $rank_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_rank = 0
|
||||
WHERE user_rank = $rank_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('ranks');
|
||||
|
||||
trigger_error($user->lang['RANK_REMOVED'] . adm_back_link($u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
case 'add':
|
||||
|
||||
$data = $ranks = $existing_imgs = array();
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
ORDER BY rank_min ASC, rank_special ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$existing_imgs[] = $row['rank_image'];
|
||||
|
||||
if ($action == 'edit' && $rank_id == $row['rank_id'])
|
||||
{
|
||||
$ranks = $row;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$imglist = filelist($phpbb_root_path . $config['ranks_path'], '');
|
||||
|
||||
$edit_img = $filename_list = '';
|
||||
|
||||
foreach ($imglist as $path => $img_ary)
|
||||
{
|
||||
foreach ($img_ary as $img)
|
||||
{
|
||||
$img = substr($path, 1) . (($path != '') ? '/' : '') . $img;
|
||||
|
||||
if (!in_array($img, $existing_imgs) || $action == 'edit')
|
||||
{
|
||||
if ($ranks && $img == $ranks['rank_image'])
|
||||
{
|
||||
$selected = ' selected="selected"';
|
||||
$edit_img = $img;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
|
||||
unset($existing_imgs, $imglist);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
'U_BACK' => $u_action,
|
||||
'RANKS_PATH' => $phpbb_root_path . $config['ranks_path'],
|
||||
'U_ACTION' => $u_action . '&id=' . $rank_id,
|
||||
|
||||
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
|
||||
'S_FILENAME_LIST' => $filename_list,
|
||||
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
|
||||
'S_SPECIAL_RANK' => (!isset($ranks['rank_special']) || $ranks['rank_special']) ? true : false,
|
||||
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
|
||||
);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $u_action)
|
||||
);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
ORDER BY rank_min ASC, rank_special ASC, rank_title ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('ranks', array(
|
||||
'S_RANK_IMAGE' => ($row['rank_image']) ? true : false,
|
||||
'S_SPECIAL_RANK' => ($row['rank_special']) ? true : false,
|
||||
|
||||
'RANK_IMAGE' => $phpbb_root_path . $config['ranks_path'] . '/' . $row['rank_image'],
|
||||
'RANK_TITLE' => $row['rank_title'],
|
||||
'MIN_POSTS' => $row['rank_min'],
|
||||
|
||||
'U_EDIT' => $u_action . '&action=edit&id=' . $row['rank_id'],
|
||||
'U_DELETE' => $u_action . '&action=delete&id=' . $row['rank_id'])
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @package module_install
|
||||
*/
|
||||
class acp_ranks_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_ranks',
|
||||
'title' => 'ACP_RANKS',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'ranks' => array('title' => 'ACP_MANAGE_RANKS', 'auth' => 'acl_a_ranks'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -1202,7 +1202,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
|||
if (!$redirect)
|
||||
{
|
||||
$split_page = array();
|
||||
preg_match_all('#^.*?([a-z]+?)\.' . $phpEx . '\?(.*?)$#i', $user->page, $split_page, PREG_SET_ORDER);
|
||||
preg_match_all('#^.*?([a-z_-]+?)\.' . $phpEx . '?(.*?)$#i', $user->page, $split_page, PREG_SET_ORDER);
|
||||
|
||||
// No script name set? Assume index
|
||||
if (empty($split_page[0][1]))
|
||||
|
|
|
@ -303,12 +303,12 @@ function user_active_flip($user_id, $user_type, $user_actkey = false, $username
|
|||
* @param string $mode Type of ban. One of the following: user, ip, email
|
||||
* @param mixed $ban Banned entity. Either string or array with usernames, ips or email addresses
|
||||
* @param int $ban_len Ban length in minutes
|
||||
* @param string $ban_len_other Ban length as a date (Y-m-d)
|
||||
* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
|
||||
* @param boolean $ban_exclude Exclude these entities from banning?
|
||||
* @param string $ban_reason String describing the reason for this ban
|
||||
* @return boolean
|
||||
*/
|
||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason)
|
||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
|
||||
{
|
||||
global $db, $user, $auth;
|
||||
|
||||
|
@ -362,10 +362,11 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
|||
$username = trim($username);
|
||||
if ($username != '')
|
||||
{
|
||||
$sql_usernames[] = "'" . $db->sql_escape($username) . "'";
|
||||
$sql_usernames[] = "'" . $username . "'";
|
||||
}
|
||||
}
|
||||
$sql_usernames = implode(', ', $sql_usernames);
|
||||
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE username IN (' . $sql_usernames . ')';
|
||||
|
@ -383,6 +384,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
|||
{
|
||||
trigger_error($user->lang['NO_USERS']);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -492,8 +494,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
|||
|
||||
if (sizeof($ban_list) == 0)
|
||||
{
|
||||
// TODO: translate this
|
||||
trigger_error('No valid email addresses found');
|
||||
trigger_error('NO_EMAILS_DEFINED');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -539,17 +540,19 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
|||
foreach ($banlist_ary as $ban_entry)
|
||||
{
|
||||
$sql_ary[] = array(
|
||||
$type => $ban_entry,
|
||||
'ban_start' => $current_time,
|
||||
'ban_end' => $ban_end,
|
||||
'ban_exclude' => $ban_exclude,
|
||||
'ban_reason' => $ban_reason);
|
||||
$type => $ban_entry,
|
||||
'ban_start' => $current_time,
|
||||
'ban_end' => $ban_end,
|
||||
'ban_exclude' => $ban_exclude,
|
||||
'ban_reason' => $ban_reason,
|
||||
'ban_give_reason' => $ban_give_reason,
|
||||
);
|
||||
}
|
||||
$sql = $db->sql_build_array('MULTI_INSERT', $sql_ary);
|
||||
|
||||
if ($sql)
|
||||
{
|
||||
$sql = 'INSERT INTO ' . BANLIST_TABLE . $sql;
|
||||
$sql = 'INSERT INTO ' . BANLIST_TABLE . ' ' . $sql;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
@ -635,7 +638,12 @@ function user_unban($mode, $ban)
|
|||
AND ban_end <> 0';
|
||||
$db->sql_query($sql);
|
||||
|
||||
$unban_sql = implode(', ', $ban);
|
||||
if (!is_array($ban))
|
||||
{
|
||||
$ban = array($ban);
|
||||
}
|
||||
|
||||
$unban_sql = implode(', ', array_map('intval', $ban));
|
||||
|
||||
if ($unban_sql)
|
||||
{
|
||||
|
@ -663,15 +671,16 @@ function user_unban($mode, $ban)
|
|||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . "
|
||||
WHERE ban_id IN ($unban_sql)";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$l_unban_list = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$l_unban_list .= (($l_unban_list != '') ? ', ' : '') . $row['unban_info'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . "
|
||||
WHERE ban_id IN ($unban_sql)";
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (!function_exists('add_log'))
|
||||
{
|
||||
|
@ -871,7 +880,7 @@ function validate_username($username)
|
|||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (preg_match('#^' . str_replace('*', '.*?', preg_quote($row['disallow_username'], '$#')) . '#i', $username))
|
||||
if (preg_match('#^' . str_replace('%', '.*?', preg_quote($row['disallow_username'], '$#')) . '#i', $username))
|
||||
{
|
||||
return 'USERNAME_DISALLOWED';
|
||||
}
|
||||
|
|
|
@ -588,28 +588,24 @@ class session
|
|||
OR ban_end = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
if ((!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id) ||
|
||||
(!empty($row['ban_ip']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ip)) ||
|
||||
(!empty($row['ban_email']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $user_email)))
|
||||
{
|
||||
if ((!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id) ||
|
||||
(!empty($row['ban_ip']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ip)) ||
|
||||
(!empty($row['ban_email']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $user_email)))
|
||||
if (!empty($row['ban_exclude']))
|
||||
{
|
||||
if (!empty($row['ban_exclude']))
|
||||
{
|
||||
$banned = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$banned = true;
|
||||
$ban_row = $row;
|
||||
// Don't break. Check if there is an exclude rule for this user
|
||||
}
|
||||
$banned = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$banned = true;
|
||||
$ban_row = $row;
|
||||
// Don't break. Check if there is an exclude rule for this user
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -620,17 +616,15 @@ class session
|
|||
|
||||
// Logout the user, banned users are unable to use the normal 'logout' link
|
||||
if ($this->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
{
|
||||
$this->session_kill();
|
||||
}
|
||||
// Determine which message to output
|
||||
$till_date = (!empty($ban_row['ban_end'])) ? $this->format_date($ban_row['ban_end']) : '';
|
||||
$message = (!empty($ban_row['ban_end'])) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
|
||||
$till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : '';
|
||||
$message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
|
||||
|
||||
$message = sprintf($this->lang[$message], $till_date, '<a href="mailto:' . $config['board_contact'] . '">', '</a>');
|
||||
// More internal HTML ...
|
||||
// TODO: 'ban_show_reason' isn't used in the admin yet.
|
||||
$message .= (!empty($ban_row['ban_show_reason'])) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_show_reason']) : '';
|
||||
$message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : '';
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,6 @@ $lang += array(
|
|||
'NO_EXT_GROUP_NAME' => 'No Group Name entered',
|
||||
'NO_EXT_GROUP_SPECIFIED' => 'No Extension Group specified',
|
||||
'NO_IMAGE' => 'No Image',
|
||||
'NO_IPS_DEFINED' => 'No IPs or Hostnames defined',
|
||||
'NO_UPLOAD_DIR' => 'The upload directory you specified does not exist.',
|
||||
'NO_WRITE_UPLOAD' => 'The upload directory you specified cannot be written to. Please alter the permissions to allow the webserver to write to it.',
|
||||
|
||||
|
|
70
phpBB/language/en/acp/ban.php
Normal file
70
phpBB/language/en/acp/ban.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* acp_ban [English]
|
||||
*
|
||||
* @package language
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE
|
||||
*/
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
// Banning
|
||||
$lang += array(
|
||||
'1_HOUR' => '1 Hour',
|
||||
'30_MINS' => '30 Minutes',
|
||||
'6_HOURS' => '6 Hours',
|
||||
|
||||
'ACP_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>Until</u> for the ban length and enter a date in yyyy-mm-dd format.',
|
||||
|
||||
'BAN_EXCLUDE' => 'Exclude from banning',
|
||||
'BAN_LENGTH' => 'Length of ban',
|
||||
'BAN_REASON' => 'Reason for ban',
|
||||
'BAN_GIVE_REASON' => 'Reason shown to the banned',
|
||||
'BAN_UPDATE_SUCESSFUL' => 'The banlist has been updated successfully',
|
||||
|
||||
'EMAIL_BAN' => 'Ban one or more email addresses',
|
||||
'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered email address from all current bans.',
|
||||
'EMAIL_BAN_EXPLAIN' => 'To specify more than one email address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com, *@*.domain.tld, etc.',
|
||||
'EMAIL_NO_BANNED' => 'No banned email addresses',
|
||||
'EMAIL_UNBAN' => 'Un-ban or Un-exclude Emails',
|
||||
'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded email addresses have a grey background.',
|
||||
|
||||
'IP_BAN' => 'Ban one or more ips',
|
||||
'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.',
|
||||
'IP_BAN_EXPLAIN' => 'To specify several different IP\'s or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *',
|
||||
'IP_NO_BANNED' => 'No banned IP addresses',
|
||||
'IP_UNBAN' => 'Un-ban or Un-exclude IPs',
|
||||
'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IP\'s have a grey background.',
|
||||
|
||||
'PERMANENT' => 'Permanent',
|
||||
|
||||
'UNTIL' => 'Until',
|
||||
'USER_BAN' => 'Ban one or more usernames',
|
||||
'USER_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered users from all current bans.',
|
||||
'USER_BAN_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.',
|
||||
'USER_NO_BANNED' => 'No banned usernames',
|
||||
'USER_UNBAN' => 'Un-ban or Un-exclude usernames',
|
||||
'USER_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded users have a grey background.',
|
||||
);
|
||||
|
||||
?>
|
|
@ -36,20 +36,31 @@ $lang += array(
|
|||
'ACP_AUTH_SETTINGS' => 'Authentication',
|
||||
'ACP_AUTOMATION' => 'Automation',
|
||||
'ACP_AVATAR_SETTINGS' => 'Avatar Settings',
|
||||
'ACP_BAN' => 'Banning',
|
||||
'ACP_BAN_EMAILS' => 'Ban Emails',
|
||||
'ACP_BAN_IPS' => 'Ban IPs',
|
||||
'ACP_BAN_USERNAMES' => 'Ban Usernames',
|
||||
'ACP_BBCODES' => 'BBCodes',
|
||||
'ACP_BOARD_DEFAULTS' => 'Board Defaults',
|
||||
'ACP_BOARD_MANAGEMENT' => 'Board Management',
|
||||
'ACP_BOARD_SETTINGS' => 'Board Settings',
|
||||
'ACP_BOTS' => 'Spiders/Robots',
|
||||
'ACP_CAT_DATABASE' => 'Database',
|
||||
'ACP_CAT_DOT_MODS' => '.Mods',
|
||||
'ACP_CAT_FORUMS' => 'Forums',
|
||||
'ACP_CAT_GENERAL' => 'General',
|
||||
'ACP_CAT_MAINTANENCE' => 'Maintanence',
|
||||
'ACP_CAT_PERMISSIONS' => 'Permissions',
|
||||
'ACP_CAT_POSTING' => 'Posting',
|
||||
'ACP_CAT_STYLES' => 'Styles',
|
||||
'ACP_CAT_SYSTEM' => 'System',
|
||||
'ACP_CAT_USERGROUP' => 'Users and Groups',
|
||||
'ACP_CAT_USERS' => 'Users',
|
||||
'ACP_CLIENT_COMMUNICATION' => 'Client Communication',
|
||||
'ACP_COOKIE_SETTINGS' => 'Cookie Settings',
|
||||
'ACP_CRITICAL_LOGS' => 'Error Log',
|
||||
'ACP_DISALLOW' => 'Disallow',
|
||||
'ACP_DISALLOW_USERNAMES' => 'Disallow Usernames',
|
||||
'ACP_EMAIL_SETTINGS' => 'Email Settings',
|
||||
'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups',
|
||||
'ACP_FORUM_LOGS' => 'Forum Logs',
|
||||
|
@ -68,16 +79,21 @@ $lang += array(
|
|||
'ACP_LOGGING' => 'Logging',
|
||||
'ACP_MAIN' => 'Admin index',
|
||||
'ACP_MANAGE_EXTENSIONS' => 'Manage Extensions',
|
||||
'ACP_MANAGE_RANKS' => 'Manage Ranks',
|
||||
'ACP_MASS_EMAIL' => 'Mass Email',
|
||||
'ACP_MESSAGES' => 'Messages',
|
||||
'ACP_MESSAGE_SETTINGS' => 'Message Settings',
|
||||
'ACP_MODULE_MANAGEMENT' => 'Module Management',
|
||||
'ACP_MOD_LOGS' => 'Moderator Log',
|
||||
'ACP_ORPHAN_ATTACHMENTS' => 'Orphan Attachments',
|
||||
'ACP_PERMISSION_SETTINGS' => 'Permission Settings',
|
||||
'ACP_PHP_INFO' => 'PHP Information',
|
||||
'ACP_RANKS' => 'Ranks',
|
||||
'ACP_SERVER_CONFIGURATION' => 'Server Configuration',
|
||||
'ACP_SERVER_SETTINGS' => 'Server Settings',
|
||||
'ACP_SMILIES' => 'Smilies',
|
||||
'ACP_STYLE_MANAGEMENT' => 'Style Management',
|
||||
'ACP_USER_SECURITY' => 'User Security',
|
||||
'ACP_WORDS' => 'Word Censoring',
|
||||
|
||||
'ACTION' => 'Action',
|
||||
|
@ -123,6 +139,8 @@ $lang += array(
|
|||
|
||||
'NOTIFY' => 'Notification',
|
||||
'NO_ADMIN' => 'You are not authorised to administer this board.',
|
||||
'NO_EMAILS_DEFINED' => 'No valid email addresses found',
|
||||
'NO_IPS_DEFINED' => 'No IPs or Hostnames defined',
|
||||
|
||||
'OFF' => 'OFF',
|
||||
'ON' => 'ON',
|
||||
|
@ -215,6 +233,16 @@ $lang += array(
|
|||
'LOG_ATTACH_FILEUPLOAD' => '<b>Orphan File uploaded to Post Number %1$d - %2$s</b>',
|
||||
'LOG_ATTACH_ORPHAN_DEL' => '<b>Orphan Files deleted</b><br />» %s',
|
||||
|
||||
'LOG_BAN_EXCLUDE_USER' => '<b>Excluded user from ban</b> for reason "<i>%s</i>"<br />» %s ',
|
||||
'LOG_BAN_EXCLUDE_IP' => '<b>Excluded ip from ban</b> for reason "<i>%s</i>"<br />» %s ',
|
||||
'LOG_BAN_EXCLUDE_EMAIL' => '<b>Excluded email from ban</b> for reason "<i>%s</i>"<br />» %s ',
|
||||
'LOG_BAN_USER' => '<b>Banned User</b> for reason "<i>%s</i>"<br />» %s ',
|
||||
'LOG_BAN_IP' => '<b>Banned ip</b> for reason "<i>%s</i>"<br />» %s',
|
||||
'LOG_BAN_EMAIL' => '<b>Banned email</b> for reason "<i>%s</i>"<br />» %s',
|
||||
'LOG_UNBAN_USER' => '<b>Unbanned user</b><br />» %s',
|
||||
'LOG_UNBAN_IP' => '<b>Unbanned ip</b><br />» %s',
|
||||
'LOG_UNBAN_EMAIL' => '<b>Unbanned email</b><br />» %s',
|
||||
|
||||
'LOG_BBCODE_ADD' => '<b>Added new BBCode</b><br />» %s',
|
||||
'LOG_BBCODE_EDIT' => '<b>Edited BBCode</b><br />» %s',
|
||||
'LOG_BBCODE_DELETE' => '<b>Deleted BBCode</b><br />» %s',
|
||||
|
@ -238,6 +266,9 @@ $lang += array(
|
|||
'LOG_CONFIG_SERVER' => '<b>Altered server settings</b>',
|
||||
'LOG_CONFIG_SETTINGS' => '<b>Altered board settings</b>',
|
||||
|
||||
'LOG_DISALLOW_ADD' => '<b>Added disallowed username</b><br />» %s',
|
||||
'LOG_DISALLOW_DELETE' => '<b>Deleted disallowed username</b>',
|
||||
|
||||
'LOG_DOWNLOAD_EXCLUDE_IP' => '<b>Exluded ip/hostname from download list</b><br />» %s',
|
||||
'LOG_DOWNLOAD_IP' => '<b>Added ip/hostname to download list</b><br />» %s',
|
||||
'LOG_DOWNLOAD_REMOVE_IP' => '<b>Removed ip/hostname from download list</b><br />» %s',
|
||||
|
|
|
@ -164,4 +164,40 @@ $lang += array(
|
|||
'WORD_UPDATED' => 'The selected word censor has been successfully updated',
|
||||
);
|
||||
|
||||
// Ranks
|
||||
$lang += array(
|
||||
'ACP_RANKS_EXPLAIN' => 'Using this form you can add, edit, view and delete ranks. You can also create custom ranks which can be applied to a user via the user management facility.',
|
||||
'ADD_RANK' => 'Add new rank',
|
||||
|
||||
'MUST_SELECT_RANK' => 'You must select a rank.',
|
||||
|
||||
'NO_ASSIGNED_RANK' => 'No special rank assigned.',
|
||||
'NO_RANK_TITLE' => 'You haven\'t specified a title for the rank.',
|
||||
'NO_UPDATE_RANKS' => 'The rank was successfully deleted. However user accounts using this rank were not updated. You will need to manually reset the rank on these accounts.',
|
||||
|
||||
'RANK_ADDED' => 'The rank was successfully added.',
|
||||
'RANK_IMAGE' => 'Rank Image',
|
||||
'RANK_IMAGE_EXPLAIN' => 'Use this to define a small image associated with the rank. The path is relative to the root phpBB2 directory.',
|
||||
'RANK_MINIMUM' => 'Minimum Posts',
|
||||
'RANK_REMOVED' => 'The rank was successfully deleted.',
|
||||
'RANK_SPECIAL' => 'Set as Special Rank',
|
||||
'RANK_TITLE' => 'Rank Title',
|
||||
'RANK_UPDATED' => 'The rank was successfully updated.',
|
||||
);
|
||||
|
||||
// Disallow Usernames
|
||||
$lang += array(
|
||||
'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it',
|
||||
'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character',
|
||||
'ADD_DISALLOW_TITLE' => 'Add a disallowed username',
|
||||
|
||||
'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit',
|
||||
'DELETE_DISALLOW_TITLE' => 'Remove a Disallowed Username',
|
||||
'DISALLOWED_ALREADY' => 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.',
|
||||
'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed',
|
||||
'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added',
|
||||
|
||||
'NO_DISALLOWED' => 'No Disallowed Usernames',
|
||||
);
|
||||
|
||||
?>
|
|
@ -259,6 +259,7 @@ $lang += array(
|
|||
'NO_TOPICS' => 'There are no topics or posts in this forum.',
|
||||
'NO_UNREAD_PM' => '<b>0</b> unread messages',
|
||||
'NO_USER' => 'The requested user does not exist.',
|
||||
'NO_USERS' => 'The requested users do not exist',
|
||||
|
||||
'OCCUPATION' => 'Occupation',
|
||||
'OFFLINE' => 'Offline',
|
||||
|
|
Loading…
Add table
Reference in a new issue