Example #1
0
 /**
  * 模板相关路径计算
  */
 public function _transpath()
 {
     if (Page::$my_view == null) {
         //如果用户没有自定义的view
         Page::$my_view = $this->controller_path;
     }
     //视图模板路径
     if (Page::$my_view != '@EMPTY') {
         $this->view_path = YYUC_FRAME_PATH . 'view/' . Conf::$view_folder . '/' . Page::$my_view . Conf::$view_suffix;
         if (!@file_exists($this->view_path)) {
             if (isset($_SESSION['MGC_ADMIN']) && $_SESSION['MGC_ADMIN'] == 'ok') {
                 $this->view_path = YYUC_LIB . 'sys/sysview/' . Page::$my_view . '.html';
                 if (!@file_exists($this->view_path)) {
                     die('系统文件丢失');
                 }
             } else {
                 die('视图文件丢失,请检查路径:/view/' . Conf::$view_folder . '/' . Page::$my_view . Conf::$view_suffix);
             }
         }
     } else {
         $this->view_path = YYUC_LIB . 'sys/base.html.php';
     }
     //编译后的路径
     $this->com_path = YYUC_FRAME_PATH . 'sys/compilations/' . Page::$my_view . '.php';
 }
Example #2
0
 /**
  * 此次请求的视图为空
  */
 public static function empty_view()
 {
     self::$my_view = '@EMPTY';
 }