国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.4KB

  1. <?php
  2. /**
  3. * 模板文件管理
  4. *
  5. * @version $id:templets_main.php 23:07 2010年7月20日 tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022 DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__).'/config.php');
  12. if (DEDEBIZ_SAFE_MODE) {
  13. die(DedeAlert("系统已启用安全模式,无法使用当前功能",ALERT_DANGER));
  14. }
  15. CheckPurview('plus_文件管理器');
  16. if (empty($acdir)) $acdir = $cfg_df_style;
  17. $templetdir = $cfg_basedir.$cfg_templets_dir;
  18. $templetdird = $templetdir.'/'.$acdir;
  19. $templeturld = $cfg_templeturl.'/'.$acdir;
  20. if (preg_match("#\.#", $acdir)) {
  21. ShowMsg('Not Allow dir '.$acdir.'!', '-1');
  22. exit();
  23. }
  24. //获取默认文件说明信息
  25. function GetInfoArray($filename)
  26. {
  27. $arrs = array();
  28. $dlist = file($filename);
  29. foreach ($dlist as $d) {
  30. $d = trim($d);
  31. if ($d != '') {
  32. list($dname, $info) = explode(',', $d);
  33. $arrs[$dname] = $info;
  34. }
  35. }
  36. return $arrs;
  37. }
  38. $dirlists = GetInfoArray($templetdir.'/templet-dirlist.inc');
  39. $filelists = GetInfoArray($templetdir.'/templet-filelist.inc');
  40. $pluslists = GetInfoArray($templetdir.'/templet-pluslist.inc');
  41. $fileinfos = ($acdir == 'plus' ? $pluslists : $filelists);
  42. include DedeInclude('templets/templets_default.htm');
  43. ?>