示例#1
0
 public function __controller(array $path)
 {
     if (isset($path[1])) {
         $this->view = 'flight';
         $this->current = new flight();
         $this->current->do_retrieve(flight::$default_fields, ['where_equals' => ['fid' => $path[1]], 'join' => flight::$default_joins]);
         if (!$this->current->fid) {
             get::header_redirect('/flight_info');
         }
     }
     parent::__controller($path);
 }
示例#2
0
 public function __controller(array $path)
 {
     if (!isset($path[0])) {
         $this->current->do_retrieve_from_id([], static::$homepage_id);
         $this->view = 'home';
     } else {
         $this->current->do_retrieve_from_id([], $path[0]);
     }
     if (!$this->current->pid) {
         $this->current->do_retrieve([], ['order' => 'position']);
     } else {
         if (uri != trim($this->current->get_url(), '/')) {
             get::header_redirect($this->current->get_url());
         }
     }
     parent::__controller($path);
 }
示例#3
0
 public function do_submit()
 {
     $table = new _object\league_table();
     $table->set_from_request();
     get::header_redirect($table->get_url() . '?module=core&act=load_page&form=' . $_REQUEST['ajax_origin']);
 }
示例#4
0
 public function do_submit()
 {
     $table = new _object\league_table();
     $table->use_preset($this->type, $this->year);
     if ($this->type == 10) {
         $table->options->pilot_id = $this->pilot;
     }
     $table->set_year($this->year);
     if ($this->no_min) {
         $table->options->minimum_score = 0;
     }
     if ($this->glider_mode) {
         $table->options->glider_mode = true;
     }
     if ($this->split_classes) {
         $table->options->split_classes = true;
     }
     get::header_redirect($table->get_url() . '?module=core&act=load_page&form=' . $_REQUEST['ajax_origin']);
 }