2 /****************************************************************************/
4 /****************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************************/
15 define('AT_INCLUDE_PATH', '../../../../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 admin_authenticate(AT_ADMIN_PRIV_ADMIN);
19 if (isset($_GET['delete'], $_GET['login'])) {
20 header('Location: delete.php?login='.$_GET['login']);
22 } else if (isset($_GET['view_log'], $_GET['login'])) {
23 header('Location: log.php?login='.$_GET['login']);
25 } else if (isset($_GET['password'], $_GET['login'])) {
26 header('Location: password.php?login='.$_GET['login']);
28 } else if (isset($_GET['edit'], $_GET['login'])) {
29 header('Location: edit.php?login='.$_GET['login']);
31 } else if ((isset($_GET['edit']) || isset($_GET['delete']) || isset($_GET['view_log']))) {
32 $msg->addError('NO_ITEM_SELECTED');
37 require(AT_INCLUDE_PATH.'header.inc.php');
40 $orders = array('asc' => 'desc', 'desc' => 'asc');
41 $cols = array('login' => 1, 'real_name' => 1, 'email' => 1, 'last_login' => 1);
43 if (isset($_GET['asc'])) {
45 $col = isset($cols[$_GET['asc']]) ? $_GET['asc'] : 'login';
46 } else if (isset($_GET['desc'])) {
48 $col = isset($cols[$_GET['desc']]) ? $_GET['desc'] : 'login';
56 $offset = ($page-1)*$results_per_page;
58 $sql = "SELECT * FROM ".TABLE_PREFIX."admins ORDER BY $col $order";
59 $result = mysql_query($sql, $db);
61 $savant->assign('result', $result);
62 $savant->display('admin/users/index.tmpl.php');
63 require(AT_INCLUDE_PATH.'footer.inc.php'); ?>