file_manage.tpl.php 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php include mymps_tpl('inc_head');?>
  2. <?php if($part == 'template'){?>
  3. <div id="<?=MPS_SOFTNAME?>" style="padding-bottom:0">
  4. <div class="mpstopic-category">
  5. <div class="panel-tab">
  6. <ul class="clearfix tab-list">
  7. <li><a href="template.php">默认模板设置</a></li>
  8. <li><a href="file_manage.php" class="current">风格在线编辑</a></li>
  9. </ul>
  10. </div>
  11. </div>
  12. </div>
  13. <?php }?>
  14. <div class="ccc2">
  15. <ul>
  16. <img src="../images/warn.gif" align="absmiddle"> 安全提示:当前在线编辑模板功能</span>:<?=$cfg_if_tpledit?>。建议您只有在十分必要的时候才开启它。您可以修改 /data/config.inc.php 关闭此功能
  17. </ul>
  18. </div>
  19. <div id="<?=MPS_SOFTNAME?>">
  20. <table border="0" cellspacing="0" cellpadding="0" class="vbm">
  21. <tr class="firstr" align="left">
  22. <td><?=$mulu?><b style="color:red">【当前所在目录:<?=$path?>】</b></td>
  23. </tr>
  24. <tr align="center" bgcolor="#ffffff">
  25. <td>
  26. <?php
  27. $fso=@opendir($path);
  28. while ($file=@readdir($fso))
  29. {
  30. $fullpath = "$path/$file";
  31. $is_dir = @is_dir($fullpath);
  32. if($is_dir=="1")
  33. {
  34. if($file!=".."&&$file!=".")
  35. {?>
  36. <li style="float:left; margin:10px"><a href="?part=<?=$part?>&path=<?=$fullpath?>"><img src="template/images/dir.gif" border="0" align="absmiddle"> <?=$file?></a></li>
  37. <?}
  38. else
  39. {
  40. if($file!=".."&&$path!=$showdir)
  41. {
  42. ?>
  43. <div align="left" style="border-bottom:#e1f2fc 1px solid; padding:0 0 5px 0">
  44. <a href="?part=<?=$part?>&path=<?=$LastPath?>">
  45. <img src="template/images/file_topdir.gif" border="0" align="absmiddle">上级目录</a>
  46. </div>
  47. <?
  48. }
  49. }
  50. }
  51. }
  52. @closedir($fso);
  53. ?>
  54. </td>
  55. </tr>
  56. </table>
  57. </div>
  58. <div id="<?=MPS_SOFTNAME?>">
  59. <table border="0" cellspacing="0" cellpadding="0" class="vbm">
  60. <tr class="firstr">
  61. <td><b>文件名</b></td>
  62. <td><b>修改日期</b></td>
  63. <td><b>文件大小</b></td>
  64. <td><b>操作</b></td>
  65. </tr>
  66. <?php
  67. $fso=@opendir($path);
  68. while ($file=@readdir($fso)) {
  69. $fullpath = "$path/$file";
  70. $is_dir = @is_dir($fullpath);
  71. if($is_dir=="0"){
  72. $size=@filesize("$path/$file");
  73. $size=@getSize($size);
  74. $lastsave=@date("Y-n-d H:i:s",filemtime("$path/$file"));
  75. $image_uri = $part == 'template' ? $mymps_global[SiteUrl].'/'.$part.'/default'.str_replace($showdir,'',$fullpath) : $mymps_global[SiteUrl].'/attachment'.str_replace($showdir,'',$fullpath);
  76. ?>
  77. <tr bgcolor="white">
  78. <?php if(is_pic($file)=='yes'){?>
  79. <td><a href="<?=$image_uri?>" target="_blank" onMouseOut="closediv('<?=$file?>')"><img src="<?=FileImage($fullpath)?>" border="0" align="absmiddle"> <?=$file?></a></td>
  80. <?}else{?>
  81. <td bgcolor="white"><img src="<?=FileImage($fullpath)?>" border="0" align="absmiddle"> <?=$file?></td>
  82. <?}?>
  83. <td><?=$lastsave?></td>
  84. <td bgcolor="white"><?=$size?></td>
  85. <td align="center">
  86. <a href="?downfile=<?=$fullpath?>">下载</a> /
  87. <a href="?editfile=<?=$fullpath?>">编辑</a> /
  88. <a href="?part=<?=$part?>&delfile=<?=$fullpath?>&url=<?=urlencode(getUrl())?>" onClick="return confirm('如非必要,请不要在此删除该文件,您确定要删除吗?')">删除</a> </td>
  89. </tr>
  90. <?php
  91. }
  92. }
  93. @closedir($fso);
  94. ?>
  95. </table>
  96. </div>
  97. <?php mymps_admin_tpl_global_foot();?>