index.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"ad");
  20. $url="<a href=index.php".$ecms_hashur['whehref'].">缓存管理</a>&nbsp;->&nbsp;设置";
  21. require('set.php');
  22. $cachesize='0B';
  23. $cachecount=0;
  24. $cachedircount=0;
  25. $title = '动态页缓存管理';
  26. if(is_dir(CACHE_ROOT)){
  27. $ar = getDirectorySize(CACHE_ROOT);
  28. $cachesize = sizeFormat($ar['size']);
  29. $cachecount = $ar['count'];
  30. $cachedircount = $ar['dircount'];
  31. }else{
  32. $title = '<font color="red">缓存存放目录不存在!请确保已设置0777,若不存在请手动建立!</font>';
  33. }
  34. ?>
  35. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  36. <link href="css.css" rel="stylesheet" type="text/css">
  37. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  38. <tr>
  39. <td>位置:<?=$url?></td>
  40. </tr>
  41. </table>
  42. <br>
  43. <form action="do.php<?=$ecms_hashur['whehref']?>" method="post">
  44. <table width="100%" border="0" cellpadding="8" cellspacing="1" class="tableborder">
  45. <tr class="header" align="center">
  46. <td colspan="3"><?=$title?></td>
  47. </tr>
  48. <tr bgcolor="#FFFFFF">
  49. <td width="20%">缓存路径:</td>
  50. <td colspan="2"><?=CACHE_ROOT?></td>
  51. </tr>
  52. <tr bgcolor="#FFFFFF">
  53. <td width="20%">缓存大小:</td>
  54. <td colspan="2"><?=$cachesize?></td>
  55. </tr>
  56. <tr bgcolor="#FFFFFF">
  57. <td width="20%">缓存目录数:</td>
  58. <td colspan="2"><?=$cachedircount?></td>
  59. </tr>
  60. <tr bgcolor="#FFFFFF">
  61. <td width="20%">缓存文件数:</td>
  62. <td colspan="2"><?=$cachecount?></td>
  63. </tr>
  64. <tr bgcolor="#FFFFFF">
  65. <td width="20%">清空缓存</td>
  66. <input type="hidden" name="del" value="1">
  67. <td colspan="2"><input type="submit" name="submit" value="提交" border="1"></td>
  68. </tr>
  69. </table>
  70. </form>
  71. <?php
  72. db_close();
  73. $empire=null;
  74. ?>