Example #1
0
 public function check_page_auth()
 {
     if (!$this->check_auth()) {
         Response::set_header_location('/index.php/auth');
         exit;
     }
 }
Example #2
0
 public function interrupt()
 {
     if (!$this->check_cookie()) {
         $this->unset_cookie();
         Response::set_header_location('/index.php/login');
         exit;
     }
 }
Example #3
0
 public function act()
 {
     try {
         $user = LF\M('User');
     } catch (Exception $e) {
         Response::set_header_location('/index.php/database');
         exit;
     }
     if (!function_exists('curl_init')) {
         Response::set_header_location('/index.php/module?name=php-curl');
         exit;
     }
     $view = LF\V('Html.Public.Login');
     $view->init('Public.Login');
 }
Example #4
0
 public function act()
 {
     $id = (int) Request::get_param('id');
     if (!$id) {
         Response::set_header_location('/index.php/run');
         exit;
     }
     $history = LF\M('History')->get_by_id($id);
     if (!$history) {
         Response::set_header_location('/index.php/run');
         exit;
     }
     $task = LF\M('Task')->get_by_id((int) $history['task_id']);
     if (!$task) {
         Response::set_header_location('/index.php/run');
         exit;
     }
     $view = LF\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 #5
0
 public function act()
 {
     $id = (int) Request::get_param('id');
     if (!$id) {
         Response::set_header_location('/index.php/list');
         exit;
     }
     $case = LF\M('Case')->get_by_id($id);
     if (!$case) {
         Response::set_header_location('/index.php/list');
         exit;
     }
     $item = LF\M('Item')->get_by_id((int) $case['item_id']);
     if (!$item) {
         Response::set_header_location('/index.php/list');
         exit;
     }
     $view = LF\V('Html.Sort.Index');
     $view->add_data('case_id', $case['id']);
     $view->add_data('space_id', $case['space_id']);
     $view->add_data('item_name', $item['name']);
     $view->add_data('case_name', $case['name']);
     $view->init('Sort.Index');
 }
Example #6
0
 public function __construct()
 {
     parent::__construct();
     Response::set_header("Content-type", "text/xml");
     $this->dom = $this->get_dom();
 }
Example #7
0
 public function act()
 {
     Cookie::unset_cookie('userid');
     Response::set_header_location('/index.php/login');
     exit;
 }