Example #1
0
 public function ajax_load()
 {
     if (isset($_REQUEST['sub'])) {
         $this->view = $_REQUEST['sub'];
     }
     parent::ajax_load();
 }
Example #2
0
 public function __controller(array $path)
 {
     if (isset($path[1])) {
         $this->import_string = filter_var(urldecode($path[1]), FILTER_SANITIZE_STRING);
         compiler::disable();
     }
     parent::__controller($path);
 }
Example #3
0
 public function __controller(array $path)
 {
     \core::$page_config->title_tag = 'Converter';
     $this->view = '_default';
     if (isset($path[1]) && !empty($path[1])) {
         $this->view = $path[1];
     }
     parent::__controller($path);
 }
Example #4
0
 public function __controller(array $path)
 {
     if (count($path) > 1) {
         $this->set_current($path[1]);
         if ($this->current->aid) {
             $this->view = 'post';
         }
     }
     parent::__controller($path);
 }
Example #5
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);
 }
Example #6
0
 /**
  *
  */
 public function load_page()
 {
     $compiler = new compiler();
     $options = ['ajax' => ajax, 'admin' => core::is_admin(), "dev" => dev, "debug" => debug];
     try {
         $compiler_page = $compiler->load(uri, $options);
     } catch (\Exception $e) {
         if ($this->path) {
             if (!is_numeric($this->path[0])) {
                 $this->module_name = $this->path[0];
             } else {
                 $this->module_name = 'pages';
             }
         } else {
             $this->module_name = ini::get('site', 'default_module', 'pages');
         }
         $compiler_page = new compiler_page();
         if (class_exists('module\\' . $this->module_name . '\\controller')) {
             $class_name = 'module\\' . $this->module_name . '\\controller';
             $this->module = new $class_name();
             $this->module->__controller($this->path);
             $this->module->page = $this->pagination_page;
             if (!ajax) {
                 $compiler_page->content = $this->module->view_object->get_page();
             } else {
                 $compiler_page->content = $this->module->view_object->get();
                 $compiler_page->ajax = ajax::current();
             }
             $push_state = $this->module->get_push_state();
             if ($push_state) {
                 $push_state->data->actions = array_merge($push_state->data->actions, self::$push_state_ajax_calls);
             }
             $compiler_page->push_state = $push_state;
         }
         $compiler->save(uri, $compiler_page, $options);
     }
     if (!ajax) {
         if ($compiler_page->push_state) {
             $compiler_page->push_state->type = push_state::REPLACE;
             $compiler_page->push_state->get();
         }
         echo $compiler_page->content;
     } else {
         ajax::set_current($compiler_page->ajax);
         if ($compiler_page->push_state) {
             ajax::push_state($compiler_page->push_state);
         }
         $class = new \ReflectionClass('\\classes\\ajax');
         $function = $class->getMethod('inject');
         $function->invokeArgs(null, $compiler_page->content);
     }
 }
Example #7
0
 public function ajax_load()
 {
     if (isset($_REQUEST['cid'])) {
         $this->current = new comp();
         if (isset($_REQUEST['cid'])) {
             $this->current->do_retrieve_from_id([], $_REQUEST['cid']);
         }
         if ($this->current->cid) {
             $this->view = 'comp';
         }
     }
     parent::ajax_load();
 }
Example #8
0
 public function __controller(array $path)
 {
     $end_count = 1;
     if (isset($path[1]) && file_exists(root . '/inc/module/tables/view/' . $path[1] . '.php')) {
         $this->view = $path[1];
         $end_count++;
     }
     $this->current = new league_table();
     $this->current->base_url = '/mass_overlay';
     if (isset($path[$end_count])) {
         $this->current->set_default(league_table::decode_url(end($path)));
     }
     parent::__controller($path);
 }
Example #9
0
 public function __controller(array $path)
 {
     $layout = '';
     $end_count = 1;
     if (isset($path[1]) && file_exists(root . '/inc/module/tables/view/' . $path[1] . '.php')) {
         $this->view = $path[1];
         $end_count++;
     }
     $this->current = new object\league_table();
     if (isset($path[$end_count]) && !strstr($path[$end_count], '-')) {
         $layout = $path[$end_count];
     }
     if (isset($path[$end_count])) {
         $this->current->set_default(object\league_table::decode_url(end($path)));
     }
     if ($layout) {
         $this->current->set_layout_from_url($layout);
     }
     parent::__controller($path);
 }
Example #10
0
 public function ajax_load()
 {
     $this->current->do_retrieve_from_id([], $_REQUEST['page']);
     parent::ajax_load();
 }
Example #11
0
 /**
  *
  */
 public function set_view()
 {
     parent::set_view();
 }