X-Git-Url: https://jasonwoof.com/gitweb/?p=contractor-progress.git;a=blobdiff_plain;f=su.php;h=8f0c6f0abf1eb0771dc083e04f1034c35a5430ae;hp=2c3a3d276eb7a424311d82d46838941dca516d15;hb=HEAD;hpb=3689b5636b2eb76dc1f920a1b0129e71be1a62b7 diff --git a/su.php b/su.php index 2c3a3d2..8f0c6f0 100644 --- a/su.php +++ b/su.php @@ -1,9 +1,24 @@ . + require_once('code/wfpl/format.php'); function su_main() { - if(!logged_in_as_contractor()) { + if(!ever_was_contractor()) { $GLOBALS['url'] = this_url(); message('You must be logged in as an administrator to access that function'); return 'login'; @@ -13,7 +28,6 @@ function su_main() { if($ret) { return $ret; } - tem_show('main_body'); } function _su_main() { @@ -24,12 +38,13 @@ function _su_main() { return './'; } - $rows = db_get_rows('people', 'id,name'); + $rows = db_get_rows('people', 'id,name,username', 'order by name'); if($rows) foreach($rows as $row) { - list($id, $name) = $row; + list($id, $name, $username) = $row; tem_set('client_id', $id); tem_set('client_name', $name); + tem_set('client_username', $username); tem_show('su_row'); } }