aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user_list.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/user_list.php')
-rw-r--r--admin/user_list.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/admin/user_list.php b/admin/user_list.php
index 9bfbacd33..615ecdf58 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -155,6 +155,29 @@ while ($row = mysql_fetch_array($result))
));
}
+$blockname = 'status_option';
+
+$template->assign_block_vars(
+ $blockname,
+ array(
+ 'VALUE'=> -1,
+ 'CONTENT' => '------------',
+ 'SELECTED' => ''
+ ));
+
+foreach (get_enums(USERS_TABLE, 'status') as $status)
+{
+ $selected = (isset($_GET['status']) and $_GET['status'] == $status) ?
+ 'selected="selected"' : '';
+ $template->assign_block_vars(
+ $blockname,
+ array(
+ 'VALUE' => $status,
+ 'CONTENT' => $lang['user_status_'.$status],
+ 'SELECTED' => $selected
+ ));
+}
+
// +-----------------------------------------------------------------------+
// | filter |
// +-----------------------------------------------------------------------+
@@ -186,6 +209,11 @@ if (isset($_GET['group'])
$filter['group'] = $_GET['group'];
}
+if (isset($_GET['status'])
+ and in_array($_GET['status'], get_enums(USERS_TABLE, 'status')))
+{
+ $filter['status'] = $_GET['status'];
+}
// +-----------------------------------------------------------------------+
// | navigation bar |
@@ -205,6 +233,11 @@ if (isset($filter['group']))
$query.= '
AND group_id = '.$filter['group'];
}
+if (isset($filter['status']))
+{
+ $query.= '
+ AND status = \''.$filter['status']."'";
+}
$query.= '
;';
list($counter) = mysql_fetch_row(pwg_query($query));
@@ -258,6 +291,11 @@ if (isset($filter['group']))
$query.= '
AND group_id = '.$filter['group'];
}
+if (isset($filter['status']))
+{
+ $query.= '
+ AND status = \''.$filter['status']."'";
+}
$query.= '
ORDER BY '.$order_by.' '.$direction.'
LIMIT '.$start.', '.$conf['users_page'].'