<!--~populated_listing start~-->
<p><a href="people.html?people_new=1">[Add a new account]</a></p>
- <table cellspacing="0" cellpadding="4" border="1" summary=""><!--~listing_row start~-->
- <tr><td class="listing"><a href="people.html?people_edit_id=~id~">~username.html~</a></td><td><a href="people.html?people_delete_id=~id~" onclick="return confirm('Permanently delete?')">[delete this account]</a></td></tr><!--~end~-->
+ <table cellspacing="0" cellpadding="4" border="1" summary="">
+ <tr><th>Name</th><th>Login</th><th> </th></tr><!--~listing_row start~-->
+ <tr><td class="listing"><a href="people.html?people_edit_id=~id~">~name.html~</a></td><td class="listing"><a href="people.html?people_edit_id=~id~">~username.html~</a></td><td><a href="people.html?people_delete_id=~id~" onclick="return confirm('Permanently delete?')">[delete]</a></td></tr><!--~end~-->
</table>
<!--~end~-->
}
# 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');
}
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');
}
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;
} 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');
}