国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

143 líneas
4.7KB

  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">
  8. //获得选中文件的数据表
  9. function getCheckboxItem(){
  10. var myform = document.form1;
  11. var allSel="";
  12. if(myform.bakfile.value) return myform.bakfile.value;
  13. for(i=0;i<myform.bakfile.length;i++)
  14. {
  15. if(myform.bakfile[i].checked){
  16. if(allSel=="")
  17. allSel=myform.bakfile[i].value;
  18. else
  19. allSel=allSel+","+myform.bakfile[i].value;
  20. }
  21. }
  22. return allSel;
  23. }
  24. //反选
  25. function ReSel(){
  26. var myform = document.form1;
  27. for(i=0;i<myform.bakfile.length;i++){
  28. if(myform.bakfile[i].checked) myform.bakfile[i].checked = false;
  29. else myform.bakfile[i].checked = true;
  30. }
  31. }
  32. //全选
  33. function SelAll(){
  34. var myform = document.form1;
  35. for(i=0;i<myform.bakfile.length;i++){
  36. myform.bakfile[i].checked = true;
  37. }
  38. }
  39. //取消
  40. function NoneSel(){
  41. var myform = document.form1;
  42. for(i=0;i<myform.bakfile.length;i++){
  43. myform.bakfile[i].checked = false;
  44. }
  45. }
  46. //
  47. function checkSubmit()
  48. {
  49. var myform = document.form1;
  50. myform.bakfiles.value = getCheckboxItem();
  51. return true;
  52. }
  53. </script>
  54. </head>
  55. <body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  56. <table width="99%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">
  57. <tr>
  58. <td height="19" colspan="4" background="images/tbg.gif" bgcolor="#E7E7E7">
  59. <table width="96%" border="0" cellspacing="1" cellpadding="1">
  60. <tr>
  61. <td width="24%"><strong>数据还原</strong></td>
  62. <td width="76%" align="right">
  63. <b><a href="sys_data.php"><u>数据备份</u></a></b>
  64. |
  65. <b><a href="sys_sql_query.php"><u>SQL命令行工具</u></a></b>
  66. </td>
  67. </tr>
  68. </table>
  69. </td>
  70. </tr>
  71. <form name="form1" onSubmit="checkSubmit()" action="sys_data_done.php" method="post" target="stafrm">
  72. <input type='hidden' name='dopost' value='redat' />
  73. <input type='hidden' name='bakfiles' value='' />
  74. <tr bgcolor="#F7F8ED">
  75. <td height="24" colspan="4" valign="top">
  76. <strong>发现的备份文件:</strong>
  77. <?php if(count($filelists)==0) echo " 没找到任何备份文件... "; ?>
  78. </td>
  79. </tr>
  80. <?php
  81. for($i=0;$i<count($filelists);$i++)
  82. {
  83. echo "<tr bgcolor='#FFFFFF' align='center' height='24'>\r\n";
  84. $mtd = "<td width='10%'>
  85. <input name='bakfile' id='bakfile' type='checkbox' class='np' value='".$filelists[$i]."' checked='1' />
  86. </td>
  87. <td width='40%'>{$filelists[$i]}</td>\r\n";
  88. echo $mtd;
  89. if(isset($filelists[$i+1]))
  90. {
  91. $i++;
  92. $mtd = "<td width='10%'>
  93. <input name='bakfile' id='bakfile' type='checkbox' class='np' value='".$filelists[$i]."' checked='1' />
  94. </td>
  95. <td width='40%'>{$filelists[$i]}</td>\r\n";
  96. echo $mtd;
  97. }else{
  98. echo "<td></td><td></td>\r\n";
  99. }
  100. echo "</tr>\r\n";
  101. }
  102. ?>
  103. <tr align="center" bgcolor="#FDFDEA">
  104. <td height="24" colspan="4">
  105. &nbsp;
  106. <input name="b1" type="button" id="b1" onClick="SelAll()" value="全选" />
  107. &nbsp;
  108. <input name="b2" type="button" id="b2" onClick="ReSel()" value="反选" />
  109. &nbsp;
  110. <input name="b3" type="button" id="b3" onClick="NoneSel()" value="取消" />
  111. </td>
  112. </tr>
  113. <tr bgcolor="#F7F8ED">
  114. <td height="24" colspan="4" valign="top">
  115. <strong>附加参数:</strong>
  116. </td>
  117. </tr>
  118. <tr bgcolor="#FFFFFF">
  119. <td height="24" colspan="4">
  120. <input name="structfile" type="checkbox" class="np" id="structfile" value="<?php echo $structfile?>" checked='1' />
  121. 还原表结构信息(<?php echo $structfile?>)
  122. <input name="delfile" type="checkbox" class="np" id="delfile" value="1" />
  123. 还原后删除备份文件 </td>
  124. </tr>
  125. <tr bgcolor="#E3F4BB">
  126. <td height="33" colspan="4">
  127. &nbsp;
  128. <input type="submit" name="Submit" value="开始还原数据" class="coolbg np" />
  129. </td>
  130. </tr>
  131. </form>
  132. <tr bgcolor="#F7F8ED">
  133. <td height="24" colspan="4"><strong>进行状态: </strong></td>
  134. </tr>
  135. <tr bgcolor="#FFFFFF">
  136. <td height="180" colspan="4">
  137. <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
  138. </td>
  139. </tr>
  140. </table>
  141. </body>
  142. </html>