Example #1
0
 public function act()
 {
     // 注销页面
     Util_Client_Cookie::unset_cookie('userid');
     Util_Server_Response::set_header_location('/login');
     exit;
 }
Example #2
0
 public function check_page_auth()
 {
     // 页面授权检查
     if (!$this->check_auth()) {
         Util_Server_Response::set_header_location('/auth');
         exit;
     }
 }
Example #3
0
 public function interrupt()
 {
     // 用户合法检查
     if (!$this->check_cookie()) {
         $this->unset_cookie();
         Util_Server_Response::set_header_location('/login');
         exit;
     }
 }
Example #4
0
 public function interrupt()
 {
     // 登录检查
     if ($this->check_cookie()) {
         Util_Server_Response::set_header_location('/');
         exit;
     } else {
         $this->unset_cookie();
     }
 }
Example #5
0
 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');
 }
Example #6
0
 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');
 }
Example #7
0
 /**
  * 构造函数
  *
  * @access public
  */
 public function __construct($version = '1.0', $charset = 'utf-8')
 {
     parent::__construct();
     Util_Server_Response::set_header("Content-type", "text/xml");
     $this->dom = new DomDocument($version, $charset);
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     Util_Server_Response::set_header("Content-type", "text/xml");
     $this->dom = $this->get_dom();
 }