From f720c5c62ecc910a6144e92096bb4f790213ecfe Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 25 Nov 2006 07:38:11 +0000 Subject: [PATCH] r1326: Okay so the code is in place to do the admin show all users page, but we need to figure out a way to do it without templates --- admin/user.php | 36 +++++++++++++++++++++++++++++ includes/class_admin_navigation.php | 1 + 2 files changed, 37 insertions(+) diff --git a/admin/user.php b/admin/user.php index e92a00e..146af46 100644 --- a/admin/user.php +++ b/admin/user.php @@ -359,6 +359,42 @@ if ($_REQUEST['do'] == 'search') // ################################################################### +if ($_REQUEST['do'] == 'showall') +{ + NavLinks::usersAdd(); + $navigator->set_focus('link', 'users-showall', 'users-pages'); + + LoadPaginationFramework(); + + $admin->page_start(_('Show All Users')); + $admin->table_start(); + $admin->table_head(_('Show All Users'), 4); + $admin->table_column_head(array(_('Display Name'), _('Email'), _('User ID'), _('Actions'))); + + $count = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user"); + $pagination->setTotal($count['count']); + $pagination->splitPages(); + + $users = $db->query("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY userid ASC LIMIT " . $pagination->fetchLimit($pagination->getPage() - 1) . ", " . $pagination->getPerPage()); + while ($user = $db->fetch_array($users)) + { + $admin->row_multi_item(array( + $user['displayname'] => 'l', + $user['email'] => 'c', + $user['userid'] => 'c', + '[' . _('Edit') . ']' => 'c' + )); + } + + $admin->table_end(); + + $admin->page_code($pagination->constructPageNav('user.php?do=showall')); + + $admin->page_end(); +} + +// ################################################################### + if ($_REQUEST['do'] == 'modify') { NavLinks::usersAdd(); diff --git a/includes/class_admin_navigation.php b/includes/class_admin_navigation.php index 9d2589b..0343c78 100644 --- a/includes/class_admin_navigation.php +++ b/includes/class_admin_navigation.php @@ -355,6 +355,7 @@ class NavLinks global $navigator; $navigator->add_component('section', 'users', 'users', _('Users'), null); + // $navigator->add_component('link', 'users-showall', 'users', _('Show All Users'), 'user.php?do=showall'); $navigator->add_component('link', 'users-add', 'users', _('Add New User'), 'user.php?do=add'); } -- 2.43.5