国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

file_manage_main.htm 19KB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  9. <link rel="stylesheet" href="../static/web/css/admin.css">
  10. <style>
  11. .linerow {
  12. border-bottom:1px solid #CBD8AC;
  13. height:26px
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <table width="98%" cellspacing="1" cellpadding="2" align="center" class="table maintable mt-3 mb-3">
  19. <tr align="center">
  20. <td width="36%" bgcolor="#f8f8f8">文件名称</td>
  21. <td width="12%" bgcolor="#f8f8f8">文件大小</td>
  22. <td width="20%" bgcolor="#f8f8f8">修改时间</td>
  23. <td width="30%" bgcolor="#f8f8f8">操作</td>
  24. </tr>
  25. <?php
  26. $dh = scandir($inpath);
  27. $ty1 = "";
  28. $ty2 = "";
  29. $files = $dirs = array();
  30. foreach ($dh as $file)
  31. {
  32. if($file!="." && $file!=".." && !is_dir("$inpath/$file"))
  33. {
  34. @$filesize = filesize("$inpath/$file");
  35. @$filesize=$filesize/1024;
  36. @$filetime = filemtime("$inpath/$file");
  37. @$filetime = MyDate("Y-m-d H:i:s",$filetime);
  38. if($filesize<0.1)
  39. {
  40. @list($ty1,$ty2)=explode(".",$filesize);
  41. $filesize=$ty1.".".substr($ty2,0,2);
  42. } else {
  43. @list($ty1,$ty2)=explode(".",$filesize);
  44. $filesize=$ty1.".".substr($ty2,0,1);
  45. }
  46. }
  47. if($file == ".")
  48. {
  49. continue;
  50. }
  51. else if($file == "..")
  52. {
  53. if($activepath == "")
  54. {
  55. continue;
  56. }
  57. $tmp = preg_replace("#[\/][^\/]*$#i","",$activepath);
  58. $line = "\n<tr>
  59. <td>
  60. <a href='file_manage_main.php?activepath=".urlencode($tmp)."'><img src='../static/web/img/dir2.gif'>上级目录</a>
  61. </td>
  62. <td colspan='3'>当前目录:$activepath</td>
  63. </tr>";
  64. $dirs[] = $line;
  65. }
  66. else if(is_dir("$inpath/$file"))
  67. {
  68. if(preg_match("#^_(.*)$#i",$file)) continue;
  69. if(preg_match("#^\.(.*)$#i",$file)) continue;
  70. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  71. <td>
  72. <a href='file_manage_main.php?activepath=".urlencode("$activepath/$file")."'><img src='../static/web/img/dir.gif'>$file</a></td>
  73. <td></td>
  74. <td></td>
  75. <td>
  76. <a href='file_manage_view.php?filename=".urlencode($file)."&activepath=".urlencode($activepath)."&fmdo=rename' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  77. <a href='file_manage_view.php?filename=".urlencode($file)."&activepath=".urlencode($activepath)."&type=dir&fmdo=del' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  78. </td>
  79. </td>
  80. </tr>";
  81. $dirs[] = $line;
  82. }
  83. else if(preg_match("#\.(gif|png)#i",$file))
  84. {
  85. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  86. <td>
  87. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/gif.gif'>$file</a></td>
  88. <td>$filesize KB</td>
  89. <td align='center'>$filetime</td>
  90. <td>
  91. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  92. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  93. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  94. </td>
  95. </tr>";
  96. $files[] = $line;
  97. }
  98. else if(preg_match("#\.(jpg)#i",$file))
  99. {
  100. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  101. <td>
  102. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/jpg.gif'>$file</a></td>
  103. <td>$filesize KB</td>
  104. <td align='center' class='linerow'>$filetime</td>
  105. <td>
  106. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  107. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  108. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  109. </td>
  110. </tr>";
  111. $files[] = $line;
  112. }
  113. else if(preg_match("#\.(swf|fla|fly)#i",$file))
  114. {
  115. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  116. <td>
  117. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/flash.gif'>$file</a></td>
  118. <td>$filesize KB</td>
  119. <td align='center'>$filetime</td>
  120. <td>
  121. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  122. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  123. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  124. </td>
  125. </tr>";
  126. $files[] = $line;
  127. }
  128. else if(preg_match("#\.(zip|rar|tar.gz)#i",$file))
  129. {
  130. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  131. <td>
  132. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/zip.gif'>$file</a></td>
  133. <td>$filesize KB</td>
  134. <td align='center'>$filetime</td>
  135. <td>
  136. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  137. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  138. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  139. </td>
  140. </tr>";
  141. $files[] = $line;
  142. }
  143. else if(preg_match("#\.(exe)#i",$file))
  144. {
  145. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  146. <td>
  147. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/exe.gif'>$file</a></td>
  148. <td>$filesize KB</td>
  149. <td align='center'>$filetime</td>
  150. <td>
  151. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  152. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  153. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  154. </td>
  155. </tr>";
  156. $files[] = $line;
  157. }
  158. else if(preg_match("#\.(mp3|wma)#i",$file))
  159. {
  160. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  161. <td>
  162. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/mp3.gif'>$file</a></td>
  163. <td>$filesize KB</td>
  164. <td align='center'>$filetime</td>
  165. <td>
  166. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  167. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  168. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  169. </td>
  170. </tr>";
  171. $files[] = $line;
  172. }
  173. else if(preg_match("#\.(wmv|api)#i",$file))
  174. {
  175. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  176. <td>
  177. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/wmv.gif'>$file</a></td>
  178. <td>$filesize KB</td>
  179. <td align='center'>$filetime</td>
  180. <td>
  181. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  182. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  183. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  184. </td>
  185. </tr>";
  186. $files[] = $line;
  187. }
  188. else if(preg_match("#\.(rm|rmvb)#i",$file))
  189. {
  190. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  191. <td>
  192. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/rm.gif'>$file</a></td>
  193. <td>$filesize KB</td>
  194. <td align='center' class='linerow'>$filetime</td>
  195. <td>
  196. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  197. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'> <i class='fa fa-trash'></i> 删除</a>
  198. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  199. </td>
  200. </tr>";
  201. $files[] = $line;
  202. }
  203. else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file))
  204. {
  205. $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
  206. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  207. <td>
  208. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/txt.gif'>$file</a></td>
  209. <td>$filesize KB</td>
  210. <td align='center'>$filetime</td>
  211. <td>
  212. <a href='$edurl' class='btn btn-success btn-sm'><i class='fa fa-pencil-square-o'></i> 编辑</a>
  213. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  214. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'> <i class='fa fa-trash'></i> 删除</a>
  215. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  216. </td>
  217. </tr>";
  218. $files[] = $line;
  219. }
  220. else if(preg_match("#\.(htm|html)#i",$file))
  221. {
  222. $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
  223. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#F9FBF0';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  224. <td>
  225. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/htm.gif'>$file</a></td>
  226. <td>$filesize KB</td>
  227. <td align='center'>$filetime</td>
  228. <td>
  229. <a href='$edurl' class='btn btn-success btn-sm'><i class='fa fa-pencil-square-o'></i> 编辑</a>
  230. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  231. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  232. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  233. </td>
  234. </tr>";
  235. $files[] = $line;
  236. }
  237. else if(preg_match("#\.(php)#i",$file))
  238. {
  239. $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
  240. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  241. <td>
  242. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/php.gif'>$file</a></td>
  243. <td>$filesize KB</td>
  244. <td align='center'>$filetime</td>
  245. <td>
  246. <a href='$edurl' class='btn btn-success btn-sm'><i class='fa fa-pencil-square-o'></i> 编辑</a>
  247. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  248. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-trash'></i> 删除</a>
  249. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  250. </td>
  251. </tr>";
  252. $files[] = $line;
  253. }
  254. else if(preg_match("#\.(js)#i",$file))
  255. {
  256. $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
  257. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  258. <td>
  259. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/js.gif'>$file</a></td>
  260. <td>$filesize KB</td>
  261. <td align='center'>$filetime</td>
  262. <td>
  263. <a href='$edurl' class='btn btn-success btn-sm'><i class='fa fa-pencil-square-o'></i> 编辑</a>
  264. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  265. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'> <i class='fa fa-trash'></i> 删除</a>
  266. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  267. </td>
  268. </tr>";
  269. $files[] = $line;
  270. }
  271. else if(preg_match("#\.(css)#i",$file))
  272. {
  273. $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
  274. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  275. <td>
  276. <a href='$activeurl/$file' target='_blank'><img src='../static/web/img/css.gif'>$file</a></td>
  277. <td>$filesize KB</td>
  278. <td align='center'>$filetime</td>
  279. <td>
  280. <a href='$edurl' class='btn btn-success btn-sm'><i class='fa fa-pencil-square-o'></i> 编辑</a>
  281. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  282. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'> <i class='fa fa-trash'></i> 删除</a>
  283. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  284. </td>
  285. </tr>";
  286. $files[] = $line;
  287. } else {
  288. $line = "\n<tr onMouseMove=\"javascript:this.bgColor='#fbfce2';\" onMouseOut=\"javascript:this.bgColor='#ffffff';\">
  289. <td><a href='$activeurl/$file' target='_blank'>$file</td>
  290. <td>$filesize KB</td>
  291. <td align='center'>$filetime</td>
  292. <td>
  293. <a href='file_manage_view.php?fmdo=rename&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-address-card-o'></i> 改名</a>
  294. <a href='file_manage_view.php?fmdo=del&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'> <i class='fa fa-trash'></i> 删除</a>
  295. <a href='file_manage_view.php?fmdo=move&filename=".urlencode($file)."&activepath=".urlencode($activepath)."' class='btn btn-success btn-sm'><i class='fa fa-share-square'></i> 移动</a>
  296. </td>
  297. </tr>";
  298. $files[] = $line;
  299. }
  300. }
  301. foreach ($dirs as $dir)
  302. {
  303. echo $dir;
  304. }
  305. foreach ($files as $file)
  306. {
  307. echo $file;
  308. }
  309. ?>
  310. <tr>
  311. <td colspan="4" bgcolor="#f8f8f8">
  312. <?php if(!DEDEBIZ_SAFE_MODE) { ?><a href="file_manage_main.php" class="btn btn-success btn-sm">根目录</a><?php } ?>
  313. <a href="file_manage_view.php?fmdo=newfile&activepath=<?php echo urlencode($activepath)?>" class="btn btn-success btn-sm">新建文件</a>
  314. <a href="file_manage_view.php?fmdo=newdir&activepath=<?php echo urlencode($activepath)?>" class="btn btn-success btn-sm">新建目录</a>
  315. <a href="file_manage_view.php?fmdo=upload&activepath=<?php echo urlencode($activepath)?>" class="btn btn-success btn-sm">文件上传</a>
  316. <a href="file_manage_control.php?fmdo=space&activepath=<?php echo urlencode($activepath)?>" class="btn btn-success btn-sm">空间检查</a>
  317. </td>
  318. </tr>
  319. </table>
  320. </body>
  321. </html>