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

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