step4.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!doctype html>
  2. <meta name="renderer" content="webkit">
  3. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
  4. <html>
  5. <head>
  6. <meta charset="UTF-8" />
  7. <meta http-equiv="Content-Language" content="zh-cn"/>
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  9. <title><?php echo $Title; ?> - <?php echo $Powered; ?></title>
  10. <link rel="stylesheet" href="./css/install.css?v=v1.3.1" />
  11. <script src="./js/jquery.js?v=v1.3.1"></script>
  12. <script src="./../public/plugins/layer-v3.1.0/layer.js?v=v1.3.1"></script>
  13. </head>
  14. <body>
  15. <div class="wrap">
  16. <?php require './templates/header.php';?>
  17. <section class="section">
  18. <div class="blank30"></div>
  19. <div class="go go3"></div>
  20. <div class="blank30"></div>
  21. <div class="main ccaz">
  22. <div class="wraper">
  23. <div class="install" id="log">
  24. <div class="blank10"></div>
  25. <ul id="loginner">
  26. </ul>
  27. </div>
  28. <div class="bottom tac"> <a href="javascript:;" class="btn_old" id="loading"><img src="./images/loading.gif" align="absmiddle" />&nbsp;正在安装...</a> </div>
  29. </div>
  30. </div>
  31. </section>
  32. <script type="text/javascript">
  33. var n=-1;
  34. var data = <?php echo json_encode($_POST);?>;
  35. $.ajaxSetup ({ cache: false });
  36. function reloads(n) {
  37. var url = "<?php echo $_SERVER['PHP_SELF']; ?>?step=4&install=1&n="+n;
  38. $.ajax({
  39. type: "POST",
  40. url: url,
  41. data: data,
  42. dataType: 'json',
  43. beforeSend:function(){
  44. },
  45. success: function(msg){
  46. if (-1 == msg) {
  47. return false;
  48. } else if (null == msg) {
  49. $('#loading').hide();
  50. layer.alert('安装过程中断,请尝试F5刷新!', {icon: 5});
  51. }
  52. if(msg.n=='999999'){
  53. $('#dosubmit').attr("disabled",false);
  54. $('#dosubmit').removeAttr("disabled");
  55. $('#dosubmit').removeClass("nonext");
  56. setTimeout('gonext()',2000);
  57. }
  58. if(msg.n>=0){
  59. $('#loginner').append(msg.msg);
  60. reloads(msg.n);
  61. }else{
  62. $('#loading').hide();
  63. $('#loginner').append(msg.msg);
  64. layer.alert(msg.msg, {icon: 5});
  65. }
  66. }
  67. });
  68. }
  69. function gonext(){
  70. window.location.href='<?php echo $_SERVER['PHP_SELF']; ?>?step=5';
  71. }
  72. $(document).ready(function(){
  73. reloads(n);
  74. })
  75. </script>
  76. </div>
  77. <div class="blank30"></div>
  78. <?php require './templates/footer.php';?>
  79. </body>
  80. </html>