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

86 lines
3.7KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>模板管理器</title>
  6. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  7. <link rel="stylesheet" href="../static/font-awesome/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="css/base.css">
  9. <style>
  10. .linerow{border-bottom:1px solid #CBD8AC}
  11. td{padding-left:6px}
  12. a.btn{color:white!important}
  13. </style>
  14. <script>
  15. function DelTpl(filename) {
  16. if (window.confirm('你确定要删除这篇文档吗')) location = 'tpl.php?action=del&acdir=<?php echo $acdir; ?>&filename=' + filename;
  17. else return false;
  18. }
  19. </script>
  20. </head>
  21. <body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  22. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6"
  23. class="table maintable table-bordered mt-3">
  24. <tr>
  25. <td height="30" background="images/tbg.gif" colspan="7">
  26. <b>模板管理</b>
  27. </td>
  28. </tr>
  29. </table>
  30. <table width='98%' border='0' cellspacing='1' cellpadding='0' align="center" bgcolor="#cfcfcf" class="table maintable table-bordered">
  31. <tr height="30" align="center">
  32. <td width="25%" background="images/wbg.gif"><strong>文件名</strong></td>
  33. <td width="30%" background="images/wbg.gif"><strong>文件描述</strong></td>
  34. <td width="25%" background="images/wbg.gif"><strong>修改时间</strong></td>
  35. <td width="20%" background="images/wbg.gif"><strong>操作</strong></td>
  36. </tr>
  37. <tr>
  38. <td colspan="4" height="30" bgcolor="#F9FCEF">
  39. <div style="float:left;line-height:30px">
  40. 当前位置:
  41. <?php
  42. if($acdir=='plus') echo '插件模板';
  43. else if($acdir=='system') echo '底层模板';
  44. else echo '核心模板 &gt; '.$acdir;
  45. ?>
  46. </div>
  47. <div style="float:right;padding-right:10px">
  48. <a class="btn btn-success btn-sm" href="templets_main.php">默认模板目录</a>
  49. <a class="btn btn-success btn-sm" href="templets_main.php?acdir=plus">插件模板目录</a>
  50. </div>
  51. </td>
  52. </tr>
  53. <?php
  54. $files = scandir($templetdird);
  55. foreach ($files as $filename){
  56. if(!preg_match("#\.htm#", $filename))
  57. continue;
  58. $filetime = filemtime($templetdird.'/'.$filename);
  59. $filetime = MyDate("Y-m-d H:i",$filetime);
  60. $fileinfo = (isset($fileinfos[$filename]) ? $fileinfos[$filename] : '未知模板');
  61. ?>
  62. <tr height="26" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
  63. <td><a href="<?php echo $templeturld.'/'.$filename; ?>" target='_blank'><img src="images/htm.gif"><?php echo $filename; ?></a></td>
  64. <td><?php echo $fileinfo; ?></td>
  65. <td align="center"><?php echo $filetime; ?></td>
  66. <td align="center">
  67. <a href="tpl.php?action=edit&acdir=<?php echo $acdir; ?>&filename=<?php echo $filename; ?>" title="编辑" class="btn btn-success btn-sm"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>&nbsp;
  68. <?php
  69. if(!isset($fileinfos[$filename]))
  70. {
  71. ?>
  72. <a href="javascript:;" class="btn btn-success btn-sm" onClick="javascript:DelTpl('<?php echo $filename; ?>');" title="删除"><i class="fa fa-trash" aria-hidden="true"></i></a>
  73. <?php
  74. }
  75. ?>
  76. </td>
  77. </tr>
  78. <?php
  79. }
  80. ?>
  81. <tr>
  82. <td colspan="4" height="36" bgcolor="#F9FCEF"><a class="btn btn-success" href="tpl.php?action=newfile&acdir=<?php echo $acdir; ?>">新建模板</a>&nbsp;<a class="btn btn-success" href="tpl.php?action=upload&acdir=<?php echo $acdir; ?>">上传模板</a></td>
  83. </tr>
  84. </table>
  85. </body>
  86. </html>