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

145 lines
5.3KB

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