Ejemplo n.º 1
0
 /**
  * @param array $path
  */
 public function __controller(array $path)
 {
     \classes\compiler::disable();
     error_reporting(-1);
     \core::$css = ['/.core/module/cms/css/styles.css'];
     \core::$js = ['/.core/js/jquery.js', '/.core/js/_ajax.js', '/.core/js/content_collapse.js', '/.core/module/cms/js/cms.js', '/.core/js/colorbox.js', '/.core/plugins/ckeditor/ckeditor.js'];
     if (\core::is_admin() && !isset($path[1])) {
         $path[1] = 'dashboard';
     }
     $this->view = 'login';
     if (isset($path[1]) && !empty($path[1]) && \core::is_admin()) {
         $this->view = $path[1];
         if (isset($path[2])) {
             $this->set_from_mid($path[2]);
             $this->npp = session::is_set('cms', $this->module->get_class_name(), 'npp') ? session::get('cms', $this->module->get_class_name(), 'npp') : 25;
             $this->page = isset($path[4]) ? $path[4] : 1;
             $this->current_class = $this->module->get_class();
         }
     }
     if (isset($path[3]) && !empty($path[3]) && core::is_admin()) {
         /** @var table $class */
         $class = $this->current_class;
         $class::$retrieve_unlive = true;
         $class::$retrieve_deleted = true;
         $this->current->do_retrieve_from_id([], $path[3]);
     }
     parent::__controller($path);
 }