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

73 lines
3.0KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="<?php echo $cfg_soft_lang;?>">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>模板管理器</title>
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../static/web/css/admin.css">
  10. <script>
  11. function DelTpl(filename) {
  12. if (window.confirm('您确定要删除这篇文档吗')) location = 'tpl.php?action=del&acdir=<?php echo $acdir;?>&filename=' +
  13. filename;
  14. else return false;
  15. }
  16. </script>
  17. </head>
  18. <body>
  19. <table width="98%" cellspacing="1" cellpadding="0" align="center" class="table maintable my-3">
  20. <tr>
  21. <td colspan="4" bgcolor="#f8f8f8">
  22. <table width="98%" cellpadding="0" cellspacing="0" class="table table-borderless">
  23. <tr>
  24. <td width="30%">
  25. <?php
  26. if ($acdir=='plus') echo '插件模板';
  27. else if ($acdir=='system') echo '底层模板';
  28. else echo '核心模板 &gt; '.$acdir;
  29. ?>
  30. </td>
  31. <td width="70%" align="right">
  32. <a class="btn btn-success btn-sm" href="templets_main.php">默认模板目录</a>
  33. <a class="btn btn-success btn-sm" href="templets_main.php?acdir=plus">插件模板目录</a>
  34. </td>
  35. </tr>
  36. </table>
  37. </td>
  38. </tr>
  39. <tr bgColor="#fbfce2" align="center">
  40. <td width="25%">文件名</td>
  41. <td width="30%">文件描述</td>
  42. <td width="25%">修改时间</td>
  43. <td width="20%">操作</td>
  44. </tr>
  45. <?php
  46. $files = scandir($templetdird);
  47. foreach ($files as $filename){
  48. if (!preg_match("#\.htm#", $filename)) continue;
  49. $filetime = filemtime($templetdird.'/'.$filename);
  50. $filetime = MyDate("Y-m-d H:i",$filetime);
  51. $fileinfo = (isset($fileinfos[$filename]) ? $fileinfos[$filename]:'未知模板');
  52. ?>
  53. <tr onMouseMove="javascript:this.bgColor='#fbfce2';" onmouseout="javascript:this.bgColor='#ffffff';">
  54. <td><a href="<?php echo $templeturld.'/'.$filename;?>" target="_blank"><img src="../static/web/img/htm.gif"><?php echo $filename;?></a></td>
  55. <td><?php echo $fileinfo;?></td>
  56. <td align="center"><?php echo $filetime;?></td>
  57. <td align="center">
  58. <a href="tpl.php?action=edit&acdir=<?php echo $acdir;?>&filename=<?php echo $filename;?>" class="btn btn-success btn-sm"><i class="fa fa-pencil-square-o"></i> 编辑</a>
  59. <?php if (!isset($fileinfos[$filename])){?>
  60. <a href="javascript:;" onClick="javascript:DelTpl('<?php echo $filename;?>');" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> 删除</a>
  61. <?php }?>
  62. </td>
  63. </tr>
  64. <?php }?>
  65. <tr>
  66. <td bgcolor="#f8f8f8" align="center" colspan="4" class="py-2">
  67. <a class="btn btn-success btn-sm" href="tpl.php?action=newfile&acdir=<?php echo $acdir;?>">新建模板</a>
  68. <a class="btn btn-success btn-sm" href="tpl.php?action=upload&acdir=<?php echo $acdir;?>">上传模板</a>
  69. </td>
  70. </tr>
  71. </table>
  72. </body>
  73. </html>