国内流行的内容管理系统(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.

211 lines
7.8KB

  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. <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 language="javascript" src="../static/web/js/webajax.js"></script>
  14. <script language="javascript">
  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="99%" align="center" cellpadding="3" cellspacing="1" class="table maintable mt-3 mb-3">
  77. <tr>
  78. <td height="26" colspan="8" background="../static/web/img/tbg.gif">
  79. <table width="96%" cellspacing="1" cellpadding="1" class="table table-borderless">
  80. <tr>
  81. <td width="30%" style="padding-left:10px">数据库管理</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 height="26" colspan="8">系统默认表:</td>
  94. </tr>
  95. <tr bgcolor="#F8FCF1" align="center">
  96. <td width="5%" height="26">选择</td>
  97. <td width="20%">表名</td>
  98. <td width="8%">记录数</td>
  99. <td width="17%">操作</td>
  100. <td width="5%">选择</td>
  101. <td width="20%">表名</td>
  102. <td width="8%">记录数</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 height="26"><input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" checked />
  112. </td>
  113. <td><?php echo $t; ?></td>
  114. <td><?php echo TjCount($t,$dsql); ?></td>
  115. <td>
  116. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">优化</a>
  117. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">修复</a>
  118. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">结构</a>
  119. </td>
  120. <?php
  121. $i++;
  122. if(isset($dedeSysTables[$i])) {
  123. $t = $dedeSysTables[$i];
  124. ?>
  125. <td><input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" checked /></td>
  126. <td><?php echo $t; ?></td>
  127. <td><?php echo TjCount($t,$dsql); ?></td>
  128. <td>
  129. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">优化</a>
  130. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">修复</a>
  131. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">结构</a>
  132. </td>
  133. <?php
  134. } else {
  135. echo "<td></td><td></td><td></td><td></td>";
  136. }
  137. echo "</tr>";
  138. }
  139. ?>
  140. <tr>
  141. <td height="26" colspan="8">其它数据表:</td>
  142. </tr>
  143. <tr bgcolor="#F8FCF1" align="center">
  144. <td width="5%" height="26">选择</td>
  145. <td width="20%">表名</td>
  146. <td width="8%">记录数</td>
  147. <td width="17%">操作</td>
  148. <td width="5%">选择</td>
  149. <td width="20%">表名</td>
  150. <td width="8%">记录数</td>
  151. <td width="17%">操作</td>
  152. </tr>
  153. <?php
  154. for($i=0; isset($otherTables[$i]); $i++)
  155. {
  156. $t = $otherTables[$i];
  157. echo "<tr align='center'>";
  158. ?>
  159. <td height="26"><input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np"></td>
  160. <td><?php echo $t; ?></td>
  161. <td><?php echo TjCount($t,$dsql); ?></td>
  162. <td>
  163. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">优化</a>
  164. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">修复</a>
  165. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">结构</a>
  166. </td>
  167. <?php
  168. $i++;
  169. if(isset($otherTables[$i])) {
  170. $t = $otherTables[$i];
  171. ?>
  172. <td><input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np"></td>
  173. <td><?php echo $t; ?></td>
  174. <td><?php echo TjCount($t,$dsql); ?></td>
  175. <td>
  176. <a href="javascript:;" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">优化</a>
  177. <a href="javascript:;" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">修复</a>
  178. <a href="javascript:;" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-success btn-sm">结构</a>
  179. </td>
  180. <?php
  181. } else {
  182. echo "<td></td><td></td><td></td><td></td>";
  183. }
  184. echo "</tr>";
  185. }
  186. ?>
  187. <tr>
  188. <td height="26" colspan="8">
  189. 分卷大小:<input name="fsize" type="text" id="fsize" value="2048" style="width:60px"> K
  190. <input name="isstruct" type="checkbox" class="np" id="isstruct" value="1" checked="1"> 备份结构
  191. <?php if(@function_exists('gzcompress') && false) { ?>
  192. <input name="iszip" type="checkbox" class="np" id="iszip" value="1" checked="1"> 完成后压缩成ZIP
  193. <?php } ?>
  194. <button name="b1" type="button" id="b1" class="btn btn-success btn-sm" onClick="SelAll()">全选</button>
  195. <button name="b2" type="button" id="b2" class="btn btn-success btn-sm" onClick="ReSel()">反选</button>
  196. <button name="b3" type="button" id="b3" class="btn btn-success btn-sm" onClick="NoneSel()">取消</button>
  197. <button type="submit" name="Submit" class="btn btn-success btn-sm">提交</button>
  198. </td>
  199. </tr>
  200. </form>
  201. <tr>
  202. <td height="26" colspan="8">结果:</td>
  203. </tr>
  204. <tr>
  205. <td height="360" colspan="8">
  206. <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
  207. </td>
  208. </tr>
  209. </table>
  210. </body>
  211. </html>