X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=su.php;h=92b1b85e01d5849468cd381f0f904436a761d970;hb=a7d43d9737bdcdf8c906469845742414a047f166;hp=2c3a3d276eb7a424311d82d46838941dca516d15;hpb=3689b5636b2eb76dc1f920a1b0129e71be1a62b7;p=contractor-progress.git diff --git a/su.php b/su.php index 2c3a3d2..92b1b85 100644 --- a/su.php +++ b/su.php @@ -1,9 +1,26 @@ . + require_once('code/wfpl/format.php'); function su_main() { - if(!logged_in_as_contractor()) { + if(logged_in_as_contractor()) { + set_was_contractor(); + } elseif(!ever_was_contractor()) { $GLOBALS['url'] = this_url(); message('You must be logged in as an administrator to access that function'); return 'login'; @@ -24,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;