phome.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. require "../".LoadLang("pub/fun.php");
  7. require("class/functions.php");
  8. $link=db_connect();
  9. $empire=new mysqlquery();
  10. $phome=$_GET['phome'];
  11. if(empty($phome))
  12. {
  13. $phome=$_POST['phome'];
  14. }
  15. //验证用户
  16. $lur=is_login();
  17. $logininid=$lur['userid'];
  18. $loginin=$lur['username'];
  19. $loginrnd=$lur['rnd'];
  20. $loginlevel=$lur['groupid'];
  21. $loginadminstyleid=$lur['adminstyleid'];
  22. hCheckEcmsRHash();
  23. @set_time_limit(0);
  24. if($phome=="SetDb")//参数设置
  25. {
  26. }
  27. elseif($phome=="DoRep")//修复表
  28. {
  29. $tablename=$_POST['tablename'];
  30. $mydbname=$_POST['mydbname'];
  31. Ebak_Rep($tablename,$mydbname,$logininid,$loginin);
  32. }
  33. //忧化表
  34. elseif($phome=="DoOpi")
  35. {
  36. $tablename=$_POST['tablename'];
  37. $mydbname=$_POST['mydbname'];
  38. Ebak_Opi($tablename,$mydbname,$logininid,$loginin);
  39. }
  40. //删除表
  41. elseif($phome=="DoDrop")
  42. {
  43. $tablename=$_POST['tablename'];
  44. $mydbname=$_POST['mydbname'];
  45. Ebak_Drop($tablename,$mydbname,$logininid,$loginin);
  46. }
  47. //删除数据库
  48. elseif($phome=="DropDb")
  49. {
  50. $mydbname=$_GET['mydbname'];
  51. Ebak_DropDb($mydbname,$logininid,$loginin);
  52. }
  53. //建立数据库
  54. elseif($phome=="CreateDb")
  55. {
  56. $mydbname=$_POST['mydbname'];
  57. $mydbchar=$_POST['mydbchar'];
  58. Ebak_CreatDb($mydbname,$mydbchar,$logininid,$loginin);
  59. }
  60. //清空表
  61. elseif($phome=="EmptyTable")
  62. {
  63. $tablename=$_POST['tablename'];
  64. $mydbname=$_POST['mydbname'];
  65. Ebak_EmptyTable($tablename,$mydbname,$logininid,$loginin);
  66. }
  67. //初使化备份表
  68. elseif($phome=="DoEbak")
  69. {
  70. Ebak_DoEbak($_POST,$logininid,$loginin);
  71. }
  72. //备份表(按文件)
  73. elseif($phome=="BakExe")
  74. {
  75. $t=$_GET['t'];
  76. $s=$_GET['s'];
  77. $p=$_GET['p'];
  78. $mypath=$_GET['mypath'];
  79. $alltotal=$_GET['alltotal'];
  80. $thenof=$_GET['thenof'];
  81. $fnum=$_GET['fnum'];
  82. $stime=$_GET['stime'];
  83. Ebak_BakExe($t,$s,$p,$mypath,$alltotal,$thenof,$fnum,$stime,$logininid,$loginin);
  84. }
  85. //备份表(按记录)
  86. elseif($phome=="BakExeT")
  87. {
  88. $t=$_GET['t'];
  89. $s=$_GET['s'];
  90. $p=$_GET['p'];
  91. $mypath=$_GET['mypath'];
  92. $alltotal=$_GET['alltotal'];
  93. $thenof=$_GET['thenof'];
  94. $fnum=$_GET['fnum'];
  95. $auf=$_GET['auf'];
  96. $aufval=$_GET['aufval'];
  97. $stime=$_GET['stime'];
  98. Ebak_BakExeT($t,$s,$p,$mypath,$alltotal,$thenof,$fnum,$auf,$aufval,$stime,$logininid,$loginin);
  99. }
  100. //恢复数据
  101. elseif($phome=="ReData")
  102. {
  103. $add=$_POST['add'];
  104. $mypath=$_POST['mypath'];
  105. Ebak_ReData($add,$mypath,$logininid,$loginin);
  106. }
  107. //删除备份目录
  108. elseif($phome=="DelBakpath")
  109. {
  110. $path=$_GET['path'];
  111. Ebak_DelBakpath($path,$logininid,$loginin);
  112. }
  113. //删除压缩包
  114. elseif($phome=="DelZip")
  115. {
  116. $f=$_GET['f'];
  117. Ebak_DelZip($f,$logininid,$loginin);
  118. }
  119. //压缩目录
  120. elseif($phome=="DoZip")
  121. {
  122. $p=$_GET['p'];
  123. Ebak_Dozip($p,$logininid,$loginin);
  124. }
  125. //目录转向
  126. elseif($phome=="PathGotoRedata")
  127. {
  128. $mypath=$_GET['mypath'];
  129. Ebak_PathGotoRedata($mypath,$logininid,$loginin);
  130. }
  131. else
  132. {
  133. printerror("ErrorUrl","history.go(-1)");
  134. }
  135. ?>