国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

320 líneas
18KB

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