JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
clients are now sorted by name
[contractor-progress.git] / people.php
index 00bd513..31b4fa0 100644 (file)
@@ -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');
        }