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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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" class="table maintable table-bordered mt-3">
  82. <tr>
  83. <td height="19" colspan="8" background="images/tbg.gif" bgcolor="#E7E7E7">
  84. <table width="96%" border="0" cellspacing="1" cellpadding="1" class="table table-borderless">
  85. <tr>
  86. <td width="24%" style="padding-left:10px;"><strong>数据库管理</strong></td>
  87. <td width="76%" align="right">
  88. <a href="sys_data_revert.php" class="btn btn-secondary btn-sm">数据还原</a>
  89. <a href="sys_sql_query.php" class="btn btn-secondary btn-sm">SQL命令行工具</a>
  90. </td>
  91. </tr>
  92. </table>
  93. </td>
  94. </tr>
  95. <form name="form1" onSubmit="checkSubmit()" action="sys_data_done.php?dopost=bak" method="post" target="stafrm">
  96. <input type='hidden' name='tablearr' value='' />
  97. <tr bgcolor="#F7F8ED">
  98. <td height="24" colspan="8"><strong>DedeCMS默认系统表:</strong></td>
  99. </tr>
  100. <tr bgcolor="#FBFCE2" align="center">
  101. <td height="24" width="5%">选择</td>
  102. <td width="20%">表名</td>
  103. <td width="8%">记录数</td>
  104. <td width="17%">操作</td>
  105. <td width="5%">选择</td>
  106. <td width="20%">表名</td>
  107. <td width="8%">记录数</td>
  108. <td width="17%">操作</td>
  109. </tr>
  110. <?php
  111. for($i=0; isset($dedeSysTables[$i]); $i++)
  112. {
  113. $t = $dedeSysTables[$i];
  114. echo "<tr align='center' bgcolor='#FFFFFF' height='24'>\r\n";
  115. ?>
  116. <td>
  117. <input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" checked />
  118. </td>
  119. <td>
  120. <?php echo $t; ?>
  121. </td>
  122. <td>
  123. <?php echo TjCount($t,$dsql); ?>
  124. </td>
  125. <td>
  126. <a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">优化</a>
  127. <a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">修复</a>
  128. <a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">结构</a>
  129. </td>
  130. <?php
  131. $i++;
  132. if(isset($dedeSysTables[$i])) {
  133. $t = $dedeSysTables[$i];
  134. ?>
  135. <td>
  136. <input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" checked />
  137. </td>
  138. <td>
  139. <?php echo $t; ?>
  140. </td>
  141. <td>
  142. <?php echo TjCount($t,$dsql); ?>
  143. </td>
  144. <td>
  145. <a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">优化</a>
  146. <a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">修复</a>
  147. <a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">结构</a>
  148. </td>
  149. <?php
  150. }
  151. else
  152. {
  153. echo "<td></td><td></td><td></td><td></td>\r\n";
  154. }
  155. echo "</tr>\r\n";
  156. }
  157. ?>
  158. <tr bgcolor="#F9FCEF">
  159. <td height="24" colspan="8"><strong>其它数据表:</strong></td>
  160. </tr>
  161. <tr bgcolor="#FBFCE2" align="center">
  162. <td height="24" width="5%">选择</td>
  163. <td width="20%">表名</td>
  164. <td width="8%">记录数</td>
  165. <td width="17%">操作</td>
  166. <td width="5%">选择</td>
  167. <td width="20%">表名</td>
  168. <td width="8%">记录数</td>
  169. <td width="17%">操作</td>
  170. </tr>
  171. <?php
  172. for($i=0; isset($otherTables[$i]); $i++)
  173. {
  174. $t = $otherTables[$i];
  175. echo "<tr align='center' bgcolor='#FFFFFF' height='24'>\r\n";
  176. ?>
  177. <td>
  178. <input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" />
  179. </td>
  180. <td>
  181. <?php echo $t; ?>
  182. </td>
  183. <td>
  184. <?php echo TjCount($t,$dsql); ?>
  185. </td>
  186. <td>
  187. <a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">优化</a>
  188. <a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">修复</a>
  189. <a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">结构</a>
  190. </td>
  191. <?php
  192. $i++;
  193. if(isset($otherTables[$i])) {
  194. $t = $otherTables[$i];
  195. ?>
  196. <td>
  197. <input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" />
  198. </td>
  199. <td>
  200. <?php echo $t; ?>
  201. </td>
  202. <td>
  203. <?php echo TjCount($t,$dsql); ?>
  204. </td>
  205. <td>
  206. <a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">优化</a>
  207. <a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">修复</a>
  208. <a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');" class="btn btn-secondary btn-sm">结构</a>
  209. </td>
  210. <?php
  211. }else{
  212. echo "<td></td><td></td><td></td><td></td>\r\n";
  213. }
  214. echo "</tr>\r\n";
  215. }
  216. ?>
  217. <tr bgcolor="#ffffff">
  218. <td height="24" colspan="8">
  219. &nbsp;
  220. <button name="b1" type="button" id="b1" class="btn btn-secondary btn-sm" onClick="SelAll()">全选</button>
  221. &nbsp;
  222. <button name="b2" type="button" id="b2" class="btn btn-secondary btn-sm" onClick="ReSel()">反选</button>
  223. &nbsp;
  224. <button name="b3" type="button" id="b3" class="btn btn-secondary btn-sm" onClick="NoneSel()">取消</button>
  225. </td>
  226. </tr>
  227. <tr bgcolor="#F9FCEF">
  228. <td height="24" colspan="8"><strong>数据备份选项:</strong></td>
  229. </tr>
  230. <tr align="center" bgcolor="#FFFFFF">
  231. <td height="50" colspan="8">
  232. <table width="90%" border="0" cellspacing="0" cellpadding="0" class="table table-borderless">
  233. <tr>
  234. <td height="30">当前数据库版本: <?php echo $mysql_version?></td>
  235. </tr>
  236. <tr>
  237. <td height="30">
  238. 指定备份数据格式:
  239. <label><input name="datatype" type="radio" class="np" value="4.0"
  240. <?php if($mysql_version<4.1) echo " checked='1'";?> />
  241. MySQL3.x/4.0.x 版本</label>
  242. <label><input type="radio" name="datatype" value="4.1" class="np"
  243. <?php if($mysql_version>=4.1) echo " checked='1'";?> />
  244. MySQL4.1.x/5.x 版本</label>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td height="30">
  249. 分卷大小:
  250. <input name="fsize" type="text" id="fsize" value="2048" size="6" />
  251. K&nbsp;,
  252. <label><input name="isstruct" type="checkbox" class="np" id="isstruct" value="1" checked='1' />
  253. 备份表结构信息</label>
  254. <?php if(@function_exists('gzcompress') && false) { ?>
  255. <input name="iszip" type="checkbox" class="np" id="iszip" value="1" checked='1' />
  256. 完成后压缩成ZIP
  257. <?php } ?>
  258. <button type="submit" name="Submit" class="btn btn-secondary btn-sm">提交</button>
  259. </td>
  260. </tr>
  261. </table>
  262. </td>
  263. </tr>
  264. </form>
  265. <tr bgcolor="#F9FCEF">
  266. <td height="24" colspan="8"><strong>进行状态:</strong></td>
  267. </tr>
  268. <tr bgcolor="#FFFFFF">
  269. <td height="180" colspan="8">
  270. <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
  271. </td>
  272. </tr>
  273. </table>
  274. </body>
  275. </html>