It doesnt do anything if youre wondering

git-svn-id: file:///svn/phpbb/trunk@778 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-08-01 01:07:05 +00:00
parent e1a361d75c
commit 37f287b546
3 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,102 @@
<?php
/***************************************************************************
*
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
if($setmodules == 1)
{
$filename = basename(__FILE__);
$module['Users']['Ban'] = $filename . "?mode=ban";
$module['Users']['Un-ban'] = $filename . "?mode=unban";
return;
}
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : "unban";
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
{
header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
if( isset($HTTP_POST_VARS['submit']) )
{
}
else
{
$template_header = "admin/page_header.tpl";
include('page_header_admin.'.$phpEx);
if( $mode == "ban" )
{
$template->set_filenames(array(
"body" => "admin/user_ban_body.tpl")
);
$template->assign_vars(array(
"L_BAN_TITLE" => $lang['Ban_control'],
"L_BAN_EXPLAIN" => $lang['Ban_explain'],
"L_BAN_USER" => $lang['Ban_username'],
"L_BAN_IP" => $lang['Ban_IP'],
"L_IP_OR_HOSTNAME" => $lang['Ban_IP'],
"L_BAN_IP_EXPLAIN" => $lang['Ban_IP_explain'],
"L_BAN_EMAIL" => $lang['Ban_email'],
"L_EMAIL_ADDRESS" => $lang['Email_address'],
"L_BAN_EMAIL_EXPLAIN" => $lang['Ban_email_explain'],
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
"S_BAN_ACTION" => append_sid("admin_user_ban.$phpEx"))
);
}
else if( $mode == "unban" )
{
}
}
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
?>

View file

@ -544,6 +544,7 @@ $lang['this_forum'] = " this forum";
// Viewonline
//
$lang['Who_is_online'] = "Who is online";
$lang['Online_explain'] = "This data is based on users active over the past five minutes";
$lang['Location'] = "Location";
$lang['Last_updated'] = "Last Updated";
@ -730,6 +731,16 @@ $lang['and_belongs_groups'] = "and belongs to the following groups"; // followed
$lang['Group_has_members'] = "This group has the following members";
// Banning
$lang['Ban_control'] = "Ban Control";
$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's or hostnames. These methods prevent a user from even reaching the index page of your board. To prevent a user from registering under a different username you can also specify a banned email address. Please note that banning an email address alone will not prevent that user from being able to logon or post to your board, you should use one of the first two methods to achieve this.";
$lang['Ban_username'] = "Ban a specific user";
$lang['Ban_IP'] = "Ban one or more IP's or hostnames";
$lang['Ban_IP_explain'] = "To specify several different IP's or hostnames separate them with commas, to specify a range of IP's (not hostnames) separate the start and end with a hyphen (-), to specify a wildcard use *";
$lang['Ban_email'] = "Ban one or more email addresses";
$lang['Ban_email_explain'] = "To specify more than one email address separate them with commas";
//
// End
// -------------------------------------------------

View file

@ -0,0 +1,35 @@
<br clear="all" />
<h1>{L_BAN_TITLE}</h1>
<p>{L_BAN_EXPLAIN}</p>
<form method="post" action="{S_BAN_ACTION}"><table width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
<td class="cat" colspan="2" align="center">{L_BAN_USER}</td>
</tr>
<tr>
<td class="row1">{L_USERNAME}:&nbsp;</td>
<td class="row2">{S_USERLIST_SELECT}</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center">{L_BAN_IP}</td>
</tr>
<tr>
<td class="row1">{L_IP_OR_HOSTNAME}:&nbsp;<br /><span class="gensmall">{L_BAN_IP_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="iphost" size="35" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center">{L_BAN_EMAIL}</td>
</tr>
<tr>
<td class="row1">{L_EMAIL_ADDRESS}:&nbsp;<br /><span class="gensmall">{L_BAN_EMAIL_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="iphost" size="35" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" /></td>
</tr>
</table></form>
<br clear="all" />