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

46 lines
1.3KB

  1. <?php
  2. /**
  3. * 模板文件管理
  4. *
  5. * @version $Id: templets_main.php 1 23:07 2010年7月20日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  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. ShowMsg('Not Allow dir ' . $acdir . '!', '-1');
  19. exit();
  20. }
  21. //获取默认文件说明信息
  22. function GetInfoArray($filename)
  23. {
  24. $arrs = array();
  25. $dlist = file($filename);
  26. foreach ($dlist as $d) {
  27. $d = trim($d);
  28. if ($d != '') {
  29. list($dname, $info) = explode(',', $d);
  30. $arrs[$dname] = $info;
  31. }
  32. }
  33. return $arrs;
  34. }
  35. $dirlists = GetInfoArray($templetdir . '/templet-dirlist.inc');
  36. $filelists = GetInfoArray($templetdir . '/templet-filelist.inc');
  37. $pluslists = GetInfoArray($templetdir . '/templet-pluslist.inc');
  38. $fileinfos = ($acdir == 'plus' ? $pluslists : $filelists);
  39. include DedeInclude('templets/templets_default.htm');