国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
7.6KB

  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/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../static/web/css/admin.css">
  10. <script src="../static/web/js/jquery.min.js"></script>
  11. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  12. <script src="js/main.js"></script>
  13. <script src="../static/web/js/webajax.js"></script>
  14. <script>
  15. var posLeft = 200;
  16. var posTop = 150;
  17. function LoadUrl(surl) {
  18. fetch("sys_data.php?" + surl).then(resp => {
  19. if (resp.ok) {
  20. return resp.text()
  21. }
  22. throw new Error('x');
  23. }).then((d) => {
  24. ShowMsg(d, {
  25. size: "modal-lg"
  26. });
  27. }).catch((error) => {
  28. ShowMsg("操作失败");
  29. });
  30. }
  31. //获得选中文件的数据表
  32. function getCheckboxItem() {
  33. var myform = document.form1;
  34. var allSel = "";
  35. if (myform.tables.value) return myform.tables.value;
  36. for (i = 0; i < myform.tables.length; i++) {
  37. if (myform.tables[i].checked) {
  38. if (allSel == "")
  39. allSel = myform.tables[i].value;
  40. else
  41. allSel = allSel + "," + myform.tables[i].value;
  42. }
  43. }
  44. return allSel;
  45. }
  46. //反选
  47. function ReSel() {
  48. var myform = document.form1;
  49. for (i = 0; i < myform.tables.length; i++) {
  50. if (myform.tables[i].checked) myform.tables[i].checked = false;
  51. else myform.tables[i].checked = true;
  52. }
  53. }
  54. //全选
  55. function SelAll() {
  56. var myform = document.form1;
  57. for (i = 0; i < myform.tables.length; i++) {
  58. myform.tables[i].checked = true;
  59. }
  60. }
  61. //取消
  62. function NoneSel() {
  63. var myform = document.form1;
  64. for (i = 0; i < myform.tables.length; i++) {
  65. myform.tables[i].checked = false;
  66. }
  67. }
  68. function checkSubmit() {
  69. var myform = document.form1;
  70. myform.tablearr.value = getCheckboxItem();
  71. return true;
  72. }
  73. </script>
  74. </head>
  75. <body>
  76. <table width="98%" align="center" cellpadding="3" cellspacing="1" class="table maintable mt-3 mb-3">
  77. <tr>
  78. <td bgcolor="#f8f8f8" colspan="8">
  79. <table width="98%" cellspacing="1" cellpadding="1" class="table table-borderless">
  80. <tr>
  81. <td width="30%">数据库管理</td>
  82. <td width="70%" align="right">
  83. <a href="sys_data_revert.php" class="btn btn-success btn-sm">数据还原</a>
  84. <a href="sys_sql_query.php" class="btn btn-success btn-sm">SQL命令行工具</a>
  85. </td>
  86. </tr>
  87. </table>
  88. </td>
  89. </tr>
  90. <form name="form1" onSubmit="checkSubmit()" action="sys_data_done.php?dopost=bak" method="post" target="stafrm">
  91. <input type="hidden" name="tablearr" value="">
  92. <tr>
  93. <td colspan="8">系统默认表:</td>
  94. </tr>
  95. <tr bgcolor="#fbfce2" align="center">
  96. <td width="5%">选择</td>
  97. <td width="20%">表名</td>
  98. <td width="6%">记录数</td>
  99. <td width="17%">操作</td>
  100. <td width="5%">选择</td>
  101. <td width="20%">表名</td>
  102. <td width="6%">记录数</td>
  103. <td width="17%">操作</td>
  104. </tr>
  105. <?php
  106. for($i=0; isset($dedeSysTables[$i]); $i++)
  107. {
  108. $t = $dedeSysTables[$i];
  109. echo "<tr align='center'>";
  110. ?>
  111. <td><input type="checkbox" name="tables" value="<?php echo $t;?>" checked></td>
  112. <td><?php echo $t;?></td>
  113. <td><?php echo TjCount($t,$dsql);?></td>
  114. <td>
  115. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">优化</a>
  116. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">修复</a>
  117. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">结构</a>
  118. </td>
  119. <?php
  120. $i++;
  121. if (isset($dedeSysTables[$i])) {
  122. $t = $dedeSysTables[$i];
  123. ?>
  124. <td><input type="checkbox" name="tables" value="<?php echo $t;?>" checked></td>
  125. <td><?php echo $t;?></td>
  126. <td><?php echo TjCount($t,$dsql);?></td>
  127. <td>
  128. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">优化</a>
  129. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">修复</a>
  130. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">结构</a>
  131. </td>
  132. <?php
  133. } else {
  134. echo "<td></td><td></td><td></td><td></td>";
  135. }
  136. echo "</tr>";
  137. }
  138. ?>
  139. <tr>
  140. <td colspan="8">其它数据表:</td>
  141. </tr>
  142. <tr bgcolor="#fbfce2" align="center">
  143. <td width="6%">选择</td>
  144. <td width="20%">表名</td>
  145. <td width="6%">记录数</td>
  146. <td width="18%">操作</td>
  147. <td width="6%">选择</td>
  148. <td width="20%">表名</td>
  149. <td width="6%">记录数</td>
  150. <td>操作</td>
  151. </tr>
  152. <?php
  153. for($i=0; isset($otherTables[$i]); $i++)
  154. {
  155. $t = $otherTables[$i];
  156. echo "<tr align='center'>";
  157. ?>
  158. <td><input type="checkbox" name="tables" value="<?php echo $t;?>"></td>
  159. <td><?php echo $t;?></td>
  160. <td><?php echo TjCount($t,$dsql);?></td>
  161. <td>
  162. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">优化</a>
  163. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">修复</a>
  164. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">结构</a>
  165. </td>
  166. <?php
  167. $i++;
  168. if (isset($otherTables[$i])) {
  169. $t = $otherTables[$i];
  170. ?>
  171. <td><input type="checkbox" name="tables" value="<?php echo $t;?>"></td>
  172. <td><?php echo $t;?></td>
  173. <td><?php echo TjCount($t,$dsql);?></td>
  174. <td>
  175. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">优化</a>
  176. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">修复</a>
  177. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t;?>');" class="btn btn-success btn-sm">结构</a>
  178. </td>
  179. <?php
  180. } else {
  181. echo "<td></td><td></td><td></td><td></td>";
  182. }
  183. echo "</tr>";
  184. }
  185. ?>
  186. <tr>
  187. <td bgcolor="#fbfce2" colspan="8">
  188. 分卷大小:<input name="fsize" type="text" id="fsize" value="2048" class="biz-input-sm"> K
  189. <label><input type="checkbox" name="isstruct" id="isstruct" value="1" checked="1"> 备份结构</label>
  190. <?php if (@function_exists('gzcompress') && false) {?>
  191. <label><input type="checkbox" name="iszip" id="iszip" value="1" checked="1"> 完成后压缩成ZIP</label>
  192. <?php }?>
  193. <button name="b1" type="button" id="b1" class="btn btn-success btn-sm" onClick="SelAll()">全选</button>
  194. <button name="b2" type="button" id="b2" class="btn btn-success btn-sm" onClick="ReSel()">反选</button>
  195. <button name="b3" type="button" id="b3" class="btn btn-success btn-sm" onClick="NoneSel()">取消</button>
  196. <button type="submit" name="Submit" class="btn btn-success btn-sm">提交</button>
  197. </td>
  198. </tr>
  199. </form>
  200. <tr>
  201. <td colspan="8">结果:</td>
  202. </tr>
  203. <tr>
  204. <td colspan="8">
  205. <div class="biz-win-iframe"><iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe></div>
  206. </td>
  207. </tr>
  208. </table>
  209. </body>
  210. </html>