aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_disallow.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-12-24 14:08:15 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-12-24 14:08:15 +0000
commit68aa6bd29a0ea8c3e5b981677ace1ac188469bb8 (patch)
treebad33f1f9cd6d3efde039b2d11d250ad2dc9a960 /phpBB/includes/acp/acp_disallow.php
parent799ee3caae5de9f044ffad3e4d34010365a0005d (diff)
downloadforums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar
forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar.gz
forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar.bz2
forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.tar.xz
forums-68aa6bd29a0ea8c3e5b981677ace1ac188469bb8.zip
put acp, mcp and ucp into modules/ directory
git-svn-id: file:///svn/phpbb/trunk@9223 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_disallow.php')
-rw-r--r--phpBB/includes/acp/acp_disallow.php107
1 files changed, 0 insertions, 107 deletions
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
deleted file mode 100644
index ec124b043f..0000000000
--- a/phpBB/includes/acp/acp_disallow.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/**
-*
-* @package acp
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* @package acp
-*/
-class acp_disallow
-{
- var $u_action;
-
- function main($id, $mode)
- {
- global $db, $user, $auth, $template, $cache, $config;
-
- include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
-
- $user->add_lang('acp/posting');
-
- // Set up general vars
- $this->tpl_name = 'acp_disallow';
- $this->page_title = 'ACP_DISALLOW_USERNAMES';
-
- $form_key = 'acp_disallow';
- add_form_key($form_key);
-
- $disallow = request::is_set_post('disallow');
- $allow = request::is_set_post('allow');
-
- if (($allow || $disallow) && !check_form_key($form_key))
- {
- trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if ($disallow)
- {
- $disallowed_user = str_replace('*', '%', utf8_normalize_nfc(request_var('disallowed_user', '', true)));
-
- if (!$disallowed_user)
- {
- trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
- $db->sql_query($sql);
-
- $cache->destroy('_disallowed_usernames');
-
- $message = $user->lang['DISALLOW_SUCCESSFUL'];
- add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
-
- trigger_error($message . adm_back_link($this->u_action));
- }
- else if ($allow)
- {
- $disallowed_id = request_var('disallowed_id', 0);
-
- if (!$disallowed_id)
- {
- trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $sql = 'DELETE FROM ' . DISALLOW_TABLE . '
- WHERE disallow_id = ' . $disallowed_id;
- $db->sql_query($sql);
-
- $cache->destroy('_disallowed_usernames');
-
- add_log('admin', 'LOG_DISALLOW_DELETE');
-
- trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->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' => $this->u_action,
- 'S_DISALLOWED_NAMES' => $disallow_select)
- );
- }
-}
-
-?> \ No newline at end of file