コード例 #1
0
ファイル: CoreFunc.class.php プロジェクト: Myazure/PESCMS2
 /**
  * 获取主题目录的名称
  */
 public static function getThemeName($group)
 {
     if (empty(self::$ThemeName)) {
         $privateKey = md5($group . self::loadConfig('PRIVATE_KEY'));
         $checkTheme = THEME . "/" . $group . "/{$privateKey}";
         if (is_file($checkTheme)) {
             self::$ThemeName = trim(file($checkTheme)['0']);
         } else {
             self::$ThemeName = 'Default';
             $f = fopen($checkTheme, 'w');
             fwrite($f, self::$ThemeName);
             fclose($f);
         }
         //设置一个主题目录常量
         defined('THEME_PATH') or define('THEME_PATH', THEME . '/' . $group . '/' . self::$ThemeName);
     }
     return self::$ThemeName;
 }
コード例 #2
0
ファイル: CoreFunc.class.php プロジェクト: qlau/PESCMS-DOC
 /**
  * 获取主题目录的名称
  */
 public static function getThemeName()
 {
     if (empty(self::$ThemeName)) {
         $privateKey = md5(GROUP . self::loadConfig('PRIVATE_KEY'));
         $checkTheme = THEME . "/" . GROUP . "/{$privateKey}";
         if (is_file($checkTheme)) {
             self::$ThemeName = trim(file($checkTheme)['0']);
         } else {
             self::$ThemeName = 'Default';
             $f = fopen($checkTheme, 'w');
             fwrite($f, self::$ThemeName);
             fclose($f);
         }
     }
     return self::$ThemeName;
 }