From 391c4bff08bccfb8eb7304a64ff79d763657f1c4 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 13 Mar 2003 12:19:56 +0000 Subject: Moved directory git-svn-id: file:///svn/phpbb/trunk@3648 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_users.php | 361 -------------------------------------------- 1 file changed, 361 deletions(-) delete mode 100644 phpBB/admin/admin_users.php (limited to 'phpBB/admin/admin_users.php') diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php deleted file mode 100644 index 84e14d4c10..0000000000 --- a/phpBB/admin/admin_users.php +++ /dev/null @@ -1,361 +0,0 @@ -acl_gets('a_user', 'a_useradd', 'a_userdel')) - { - return; - } - - $module['USER']['MANAGE'] = basename(__FILE__) . $SID; - - return; -} - -define('IN_PHPBB', 1); -// Include files -$phpbb_root_path = '../'; -require($phpbb_root_path . 'extension.inc'); -require('pagestart.' . $phpEx); - -// Set mode -$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : 'main'; - -// Begin program -if (isset($_POST['username']) || isset($_GET['u']) || isset($_POST['u'])) -{ - // Grab relevant userdata - if(isset($_REQUEST['u'])) - { - $user_id = intval($_REQUEST['u']); - - if(!($userdata = get_userdata($user_id))) - { - trigger_error($user->lang['No_user_id_specified']); - } - } - else - { - if(!$userdata = get_userdata($_POST['username'])) - { - trigger_error($user->lang['No_user_id_specified']); - } - } - - // Update entry in DB - if ($_POST['deleteuser'] && !$userdata['user_founder']) - { - if (!$auth->acl_get('a_userdel')) - { - trigger_error($user->lang['NO_ADMIN']); - } - - $db->sql_transaction(); - - $sql = "UPDATE " . POSTS_TABLE . " - SET poster_id = " . ANONYMOUS . ", post_username = '$username' - WHERE poster_id = $user_id"; - $db->sql_query($sql); - - $sql = "UPDATE " . TOPICS_TABLE . " - SET topic_poster = " . ANONYMOUS . " - WHERE topic_poster = $user_id"; - $db->sql_query($sql); - - $sql = "DELETE FROM " . USERS_TABLE . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - $sql = "DELETE FROM " . USER_GROUP_TABLE . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - $sql = "DELETE FROM " . FORUMS_WATCH_TABLE . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - $sql = "DELETE FROM " . ACL_USERS_TABLE . " - WHERE user_id = $user_id"; - $db->sql_query($sql); - - $db->sql_transaction('commit'); - - trigger_error($user->lang['User_deleted']); - } - - - // Output relevant page - page_header($user->lang['Manage']); - -?> - -
- - - - - - - -
Main | Profile | Preferences | Avatar | Permissions
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Username:
Click profile to edit
[ Ban ]
Registered: format_date($userdata['user_regdate']); ?>
Registered from IP: [ Lookup | Ban ]
IP whois for
' . trim($ipwhois) . '
'; - } -?>
Total/Average posts by this user:
- -acl($userdata); - - foreach ($acl_options['global'] as $option_name => $option_id) - { - $type = substr($option_name, 0, strpos('_', $option_name) +1); - $global[$type][$option_name] = $userauth->acl_get($option_name); - } - - $sql = "SELECT forum_id, forum_name - FROM " . FORUMS_TABLE . " - ORDER BY left_id"; - $result = $db->sql_query($sql); - - $permissions = array(); - while($row = $db->sql_fetchrow($result)) - { - $forum_data[$row['forum_id']] = $row['forum_name']; - - foreach ($acl_options['local'] as $option_name => $option_id) - { - $local[$row['forum_id']][$option_name] = $userauth->acl_get($option_name, $row['forum_id']); - } - } - -?> - - - - - - - - - - - $auth_ary) - { - foreach ($auth_ary as $option => $allow) - { - if ($option != $type .'_') - { - $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; - - $l_can_cell = (!empty($user->lang['acl_' . $option])) ? $user->lang['acl_' . $option] : ucfirst(preg_replace('#.*?_#', '', $option)); - - $allow_type = ($allow == ACL_ALLOW) ? ' checked="checked"' : ''; - $deny_type = ($allow == ACL_DENY) ? ' checked="checked"' : ''; -?> - - - - - - -
Select permission set:  
 lang['Option']; ?>  lang['Allow']; ?>  lang['Deny']; ?> 
/> />
- - - $auth_ary) - { - -?> - - - $allow) - { - echo ''; - } - -?> -
' . $user->lang['acl_' . $option] . ' => ' . (($allow) ? 'Allowed' : 'Denied') . '
- -acl_get('a_user')) -{ - trigger_error($user->lang['No_admin']); -} - -page_header($user->lang['Manage']); - -?> - -

lang['User_admin']; ?>

- -

lang['User_admin_explain']; ?>

- -
- - - - - - -
lang['Select_a_User']; ?>
', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" />
- - 'whois.ripe.net', - '#whois\.apnic\.net#is' => 'whois.apnic.net', - '#nic\.ad\.jp#is' => 'whois.nic.ad.jp', - '#whois\.registro\.br#is' => 'whois.registro.br' - ); - - if (($fsk = fsockopen('whois.arin.net', 43))) - { - @fputs($fsk, "$ip\n"); - while (!feof($fsk)) - { - $ipwhois .= fgets($fsk, 1024); - } - fclose($fsk); - } - - foreach (array_keys($match) as $server) - { - if (preg_match($server, $ipwhois)) - { - $ipwhois = ''; - if (($fsk = fsockopen($match[$server], 43))) - { - @fputs($fsk, "$ip\n"); - while (!feof($fsk)) - { - $ipwhois .= fgets($fsk, 1024); - } - fclose($fsk); - } - break; - } - } - - return $ipwhois; -} -// FUNCTIONS -// --------- - -?> \ No newline at end of file -- cgit v1.2.1