3 require_once('code/wfpl/format.php');
6 if(!logged_in_as_contractor()) {
7 $GLOBALS['url'] = this_url();
8 message('You must be logged in as an administrator to access that function');
16 tem_show('main_body');
20 $client_id = format_int($_REQUEST['as']);
22 session_set('auth_username', $client_id);
23 message('Switched Login');
27 $rows = db_get_rows('people', 'id,name');
29 if($rows) foreach($rows as $row) {
30 list($id, $name) = $row;
31 tem_set('client_id', $id);
32 tem_set('client_name', $name);