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

288 lines
9.8KB

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