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

224 lines
8.9KB

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