public function act() { // 注销页面 Util_Client_Cookie::unset_cookie('userid'); Util_Server_Response::set_header_location('/login'); exit; }
public function check_page_auth() { // 页面授权检查 if (!$this->check_auth()) { Util_Server_Response::set_header_location('/auth'); exit; } }
public function interrupt() { // 用户合法检查 if (!$this->check_cookie()) { $this->unset_cookie(); Util_Server_Response::set_header_location('/login'); exit; } }
public function interrupt() { // 登录检查 if ($this->check_cookie()) { Util_Server_Response::set_header_location('/'); exit; } else { $this->unset_cookie(); } }
public function act() { // 报告首页 $id = (int) Util_Server_Request::get_param('id'); if (!$id) { Util_Server_Response::set_header_location('/run'); exit; } $history = M('History')->get_by_id($id); if (!$history) { Util_Server_Response::set_header_location('/run'); exit; } $task = M('Task')->get_by_id((int) $history['task_id']); if (!$task) { Util_Server_Response::set_header_location('/run'); exit; } $view = V('Html.Report.Index'); $view->add_data('history_id', $id); $view->add_data('task_name', $task['name']); $view->add_data('task_runtime', $history['runtime']); $view->init('Report.Index'); }
public function act() { // 序列首页 $id = (int) Util_Server_Request::get_param('id'); if (!$id) { Util_Server_Response::set_header_location('/list'); exit; } $case = M('Case')->get_by_id($id); if (!$case) { Util_Server_Response::set_header_location('/list'); exit; } $item = M('Item')->get_by_id((int) $case['item_id']); if (!$item) { Util_Server_Response::set_header_location('/list'); exit; } $view = V('Html.Sort.Index'); $view->add_data('case_id', $case['id']); $view->add_data('item_name', $item['name']); $view->add_data('case_name', $case['name']); $view->init('Sort.Index'); }