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

287 lines
10KB

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