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

147 lines
5.5KB

  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">
  11. //获得选中文件的数据表
  12. function getCheckboxItem() {
  13. var myform = document.form1;
  14. var allSel = "";
  15. if (myform.bakfile.value) return myform.bakfile.value;
  16. for (i = 0; i < myform.bakfile.length; i++) {
  17. if (myform.bakfile[i].checked) {
  18. if (allSel == "")
  19. allSel = myform.bakfile[i].value;
  20. else
  21. allSel = allSel + "," + myform.bakfile[i].value;
  22. }
  23. }
  24. return allSel;
  25. }
  26. //反选
  27. function ReSel() {
  28. var myform = document.form1;
  29. for (i = 0; i < myform.bakfile.length; i++) {
  30. if (myform.bakfile[i].checked) myform.bakfile[i].checked = false;
  31. else myform.bakfile[i].checked = true;
  32. }
  33. }
  34. //全选
  35. function SelAll() {
  36. var myform = document.form1;
  37. for (i = 0; i < myform.bakfile.length; i++) {
  38. myform.bakfile[i].checked = true;
  39. }
  40. }
  41. //取消
  42. function NoneSel() {
  43. var myform = document.form1;
  44. for (i = 0; i < myform.bakfile.length; i++) {
  45. myform.bakfile[i].checked = false;
  46. }
  47. }
  48. //
  49. function checkSubmit() {
  50. var myform = document.form1;
  51. myform.bakfiles.value = getCheckboxItem();
  52. return true;
  53. }
  54. </script>
  55. </head>
  56. <body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  57. <table width="99%" border="0" cellpadding="3" cellspacing="1" align="center" bgcolor="#D6D6D6" class="table maintable table-bordered mt-3">
  58. <tr>
  59. <td height="19" colspan="4" background="images/tbg.gif" bgcolor="#E7E7E7">
  60. <table width="96%" border="0" cellspacing="1" cellpadding="1" class="table table-borderless">
  61. <tr>
  62. <td width="24%"><strong>数据还原</strong></td>
  63. <td width="76%" align="right">
  64. <a href="sys_data.php" class="btn btn-secondary btn-sm">数据备份</a>
  65. <a href="sys_sql_query.php" class="btn btn-secondary btn-sm">SQL命令行工具</a>
  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. <button name="b1" type="button" id="b1" onClick="SelAll()" class="btn btn-secondary btn-sm">全选</button>
  107. &nbsp;
  108. <button name="b2" type="button" id="b2" onClick="ReSel()" class="btn btn-secondary btn-sm">反选</button>
  109. &nbsp;
  110. <button name="b3" type="button" id="b3" onClick="NoneSel()" class="btn btn-secondary btn-sm">取消</button>
  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. <label><input name="structfile" type="checkbox" class="np" id="structfile" value="<?php echo $structfile?>"
  121. checked='1' />
  122. 还原表结构信息(<?php echo $structfile?>)</label>
  123. <label><input name="delfile" type="checkbox" class="np" id="delfile" value="1" />
  124. 还原后删除备份文件</label></td>
  125. </tr>
  126. <tr bgcolor="#E3F4BB">
  127. <td height="33" colspan="4">
  128. &nbsp;
  129. <button type="submit" name="Submit" class="btn btn-secondary">开始还原数据</button>
  130. </td>
  131. </tr>
  132. </form>
  133. <tr bgcolor="#F7F8ED">
  134. <td height="24" colspan="4"><strong>进行状态: </strong></td>
  135. </tr>
  136. <tr bgcolor="#FFFFFF">
  137. <td height="180" colspan="4">
  138. <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
  139. </td>
  140. </tr>
  141. </table>
  142. </body>
  143. </html>