<?php
+# Copyright (C) 2008 Jason Woofenden
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
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';
if($ret) {
return $ret;
}
- tem_show('main_body');
}
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');
}
}