From a7d43d9737bdcdf8c906469845742414a047f166 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Wed, 14 Oct 2009 04:27:58 -0400 Subject: [PATCH] clients are now sorted by name --- people.html | 5 +++-- people.php | 7 ++++--- su.php | 2 +- tasks.php | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/people.html b/people.html index b46a3ae..e775865 100644 --- a/people.html +++ b/people.html @@ -46,8 +46,9 @@

[Add a new account]

- - +
~username.html~[delete this account]
+ +
NameLogin 
~name.html~~username.html~[delete]
diff --git a/people.php b/people.php index 00bd513..31b4fa0 100644 --- a/people.php +++ b/people.php @@ -46,8 +46,8 @@ function people_tem_sets($username, $password, $name, $privs, $balance) { } # You may pass a "where clause" for the db query. -function people_display_listing($where = 'order by username limit 100') { - $rows = db_get_rows('people', 'id,username', $where); +function people_display_listing($where = 'order by name limit 100') { + $rows = db_get_rows('people', 'id,name,username', $where); if($rows == false || count($rows) == 0) { tem_show('empty_listing'); tem_show('listings'); @@ -55,11 +55,12 @@ function people_display_listing($where = 'order by username limit 100') { } foreach($rows as $row) { - list($id, $username) = $row; + list($id, $name, $username) = $row; tem_set('id', $id); if($username == '') { $username = '--'; } + tem_set('name', $name); tem_set('username', $username); tem_show('listing_row'); } diff --git a/su.php b/su.php index 2ff23ae..92b1b85 100644 --- a/su.php +++ b/su.php @@ -41,7 +41,7 @@ function _su_main() { return './'; } - $rows = db_get_rows('people', 'id,name'); + $rows = db_get_rows('people', 'id,name', 'order by name'); if($rows) foreach($rows as $row) { list($id, $name) = $row; diff --git a/tasks.php b/tasks.php index 423268a..58737a3 100644 --- a/tasks.php +++ b/tasks.php @@ -525,7 +525,7 @@ function tasks_edit_main() { } else { tem_show('new_msg'); if(logged_in_as_contractor()) { - pulldown('client_id', db_get_rows('people', 'id,name', 'where id > 1'), PULLDOWN_2D); + pulldown('client_id', db_get_rows('people', 'id,name', 'where id > 1 order by name'), PULLDOWN_2D); tem_set('client_id', format_int($_REQUEST['client_id'])); tem_show('client_row'); } -- 1.7.10.4