From 0cbcd2467c4e260d1ff156b8fa01d8b931cdf2bd Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 5 Feb 2003 17:40:46 +0000 Subject: Listing of users git-svn-id: file:///svn/phpbb/trunk@3456 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_groups.php | 276 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 238 insertions(+), 38 deletions(-) (limited to 'phpBB/admin/admin_groups.php') diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php index 01c42955f4..0411c32959 100644 --- a/phpBB/admin/admin_groups.php +++ b/phpBB/admin/admin_groups.php @@ -45,8 +45,9 @@ if (!$auth->acl_get('a_group') ) // Check and set some common vars -$action = (isset($_REQUEST['action']))? $_REQUEST['action'] : ((isset($_POST['addgroup'])) ? 'addgroup' : ''); -$group_id = (isset($_REQUEST['g']))? intval($_REQUEST['g']) : ''; +$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : ((isset($_POST['addgroup'])) ? 'addgroup' : ''); +$group_id = (isset($_REQUEST['g'])) ? intval($_REQUEST['g']) : ''; +$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0; // Which page? page_header($user->lang['MANAGE']); @@ -70,6 +71,7 @@ switch ($action) { trigger_error($user->lang['NO_GROUP']); } + $db->sql_freeresult($result); } // Did we submit? @@ -214,6 +216,7 @@ switch ($action) } while ($row = $db->sql_fetchrow($result)); } + $db->sql_freeresult($result); $type_open = ($group_type == GROUP_OPEN) ? ' checked="checked"' : ''; $type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : ''; @@ -240,8 +243,8 @@ function swatch() @@ -249,25 +252,25 @@ function swatch() lang['GROUP_NAME']; ?>: lang['G_' . $group_name])) ? $user->lang['G_' . $group_name] : $group_name; ?> @@ -277,8 +280,8 @@ function swatch() @@ -287,7 +290,7 @@ function swatch() @@ -310,6 +313,12 @@ function swatch() +

lang['GROUP_SETTINGS']; ?>

lang['GROUP_SETTINGS_EXPLAIN']; ?>

@@ -333,12 +342,12 @@ function swatch()   @@ -346,30 +355,220 @@ function swatch() sql_query($sql); + + if (!extract($db->sql_fetchrow($result))) + { + trigger_error($user->lang['NO_GROUP']); + } + $db->sql_freeresult($result); + ?>

lang['GROUP_MEMBERS']; ?>

+

lang['GROUP_MEMBERS_EXPLAIN']; ?>

+ + +

lang['GROUP_MODS']; ?>

+ +

lang['GROUP_MODS_EXPLAIN']; ?>

+ +
"> + + + + + + +sql_query($sql); + + $db->sql_freeresult($result); + + if ($row = $db->sql_fetchrow($result) ) + { + do + { + + + } + while ($row = $db->sql_fetchrow($result) ); + +?> + + + + + + + + + +
lang['USERNAME']; ?>lang['JOINED']; ?>lang['POSTS']; ?>lang['MARK']; ?>
lang['GROUPS_NO_MODS']; ?>
+ +sql_query($sql); + + if ($row = $db->sql_fetchrow($result) ) + { + +?> +

lang['GROUP_PENDING']; ?>

+ +

lang['GROUP_PENDING_EXPLAIN']; ?>

+ +
"> + + + + + + + + + + + + + +sql_fetchrow($result) ); + +?> +
lang['USERNAME']; ?>lang['JOINED']; ?>lang['POSTS']; ?>lang['MARK']; ?>
" target="_profile">format_date($row['user_regdate'], $user->lang['DATE_FORMAT']); ?>
+ +sql_freeresult($result); + } + + $sql = "SELECT COUNT(user_id) AS total_members + FROM " . USER_GROUP_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + $total_members = $row['total_members']; + + // Existing members + $sql = "SELECT u.user_id, u.username, u.user_regdate, u.user_posts + FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug + WHERE ug.group_id = $group_id + AND ug.user_pending = 0 + AND u.user_id = ug.user_id + ORDER BY u.username + LIMIT $start, " . $config['topics_per_page']; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result) ) + { + +?> +

lang['GROUP_LIST']; ?>

+

lang['GROUP_LIST_EXPLAIN']; ?>

-
"> + +">
- + + + + + + + + + + + + +sql_fetchrow($result)); + +?> + + + +
lang['']; ?>lang['USERNAME']; ?>lang['JOINED']; ?>lang['POSTS']; ?>lang['MARK']; ?>
" target="_profile">format_date($row['user_regdate'], $user->lang['DATE_FORMAT']); ?>
+ + + + +
lang['MARK_ALL']; ?> :: lang['UNMARK_ALL']; ?> 
sql_freeresult($result); + break; default: @@ -393,25 +592,6 @@ function swatch() sql_query($sql); - - $pending = array(); - if ($row = $db->sql_fetchrow($result) ) - { - do - { - $pending[$row['group_id']][] = $row; - } - while ($row = $db->sql_fetchrow($result) ); - } - $db->sql_freeresult($result); - $sql = "SELECT group_id, group_name, group_type FROM " . GROUPS_TABLE . " ORDER BY group_type ASC, group_name"; @@ -488,6 +668,9 @@ function swatch() $db->sql_freeresult($result); ?> + +   + + + + + \ No newline at end of file -- cgit v1.2.1