$v) { switch($k) { case 'roles': if(!is_array($_GET['roles'])) exit(); foreach($_GET['roles'] as $r) { if(!array_key_exists($r, $sfiab_roles)) exit(); $roles[] = $r; } $_SESSION['edit_return'] = $roles; break; case 'years': if(!is_array($_GET['years'])) exit(); foreach($_GET['years'] as $y) { $year = (int)$y; if($year > 0 && $year < 9999) { $years[] = $year; } else if($year == -1) { $years = array(-1); break; } } break; case 'status': if(!is_array($_GET['status'])) exit(); foreach($_GET['status'] as $s) { if(in_array($s, array('complete', 'active','new','accepted'))) { $status[] = $s; } } break; case 'attending': if(!is_array($_GET['attending'])) exit(); foreach($_GET['attending'] as $s) { if(in_array($s, array('attending', 'not_attending'))) { $attending[] = $s; } } break; case 'show_filter': $filter_collapsed = "false"; break; case 'edit': $uid = (int)$v; $new_u = user_load($mysqli, $uid); /* Create a project */ if($new_u['s_pid'] === NULL && in_array('student', $new_u['roles'])) { $new_u['s_pid'] = project_create($mysqli); user_save($mysqli, $new_u); } $_SESSION['edit_uid'] = $uid; $_SESSION['edit_roles'] = $new_u['roles']; $_SESSION['edit_name'] = $new_u['name']; header("Location: ".user_homepage($new_u)); exit(); case 'return': unset($_SESSION['edit_uid']); unset($_SESSION['edit_roles']); unset($_SESSION['edit_name']); $roles = $_SESSION['edit_return']; break; } } if(count($roles) == 0) { $roles = array('committee'); $_SESSION['edit_return'] = $roles; } if(count($years) == 0) { $years[] = $config['year']; } if(count($status) == 0) { $status[] = 'complete'; $status[] = 'active'; } if(count($attending) == 0) { $attending = array('attending', 'not_attending'); } $page_id = 'c_user_list'; sfiab_page_begin($u, "User List", $page_id); ?>
Name / Email | Username | School | Reg ID | Proj Num | Role / Status | Year | |
---|---|---|---|---|---|---|---|
=$org.$user['name']?> =$user['email']?> |
=$user['username']?> | =$school_str?> | =$user['s_pid']?> | =$project_number?> | =$role?> =$status?> |
=$user['year']?> |