国内流行的内容管理系统(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.

47 lines
1.3KB

  1. <?php
  2. /**
  3. * 模板文件管理
  4. *
  5. * @version $Id: templets_main.php 1 23:07 2010年7月20日Z tianya $
  6. * @package DedeCMS.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license/v6
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__).'/config.php');
  12. CheckPurview('plus_文件管理器');
  13. if(empty($acdir)) $acdir = $cfg_df_style;
  14. $templetdir = $cfg_basedir.$cfg_templets_dir;
  15. $templetdird = $templetdir.'/'.$acdir;
  16. $templeturld = $cfg_templeturl.'/'.$acdir;
  17. if(preg_match("#\.#", $acdir))
  18. {
  19. ShowMsg('Not Allow dir '.$acdir.'!', '-1');
  20. exit();
  21. }
  22. //获取默认文件说明信息
  23. function GetInfoArray($filename)
  24. {
  25. $arrs = array();
  26. $dlist = file($filename);
  27. foreach($dlist as $d)
  28. {
  29. $d = trim($d);
  30. if($d!='')
  31. {
  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');