step4.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title><?php echo $Title; ?> - <?php echo $Powered; ?></title>
  6. <link rel="stylesheet" href="./css/install.css?v=9.0" />
  7. <script src="./js/jquery.js?v=9.0"></script>
  8. </head>
  9. <body>
  10. <div class="wrap">
  11. <?php require './templates/header.php';?>
  12. <section class="section">
  13. <div class="step">
  14. <ul>
  15. <li class="on"><em>1</em>检测环境</li>
  16. <li class="on"><em>2</em>创建数据</li>
  17. <li class="current"><em>3</em>完成安装</li>
  18. </ul>
  19. </div>
  20. <div class="install" id="log">
  21. <ul id="loginner">
  22. </ul>
  23. </div>
  24. <div class="bottom tac"> <a href="javascript:;" class="btn_old"><img src="./images/install/loading.gif" align="absmiddle" />&nbsp;正在安装...</a> </div>
  25. </section>
  26. <script type="text/javascript">
  27. var n=-1;
  28. var data = <?php echo json_encode($_POST);?>;
  29. $.ajaxSetup ({ cache: false });
  30. function reloads(n) {
  31. var url = "<?php echo $_SERVER['PHP_SELF']; ?>?step=4&install=1&n="+n;
  32. $.ajax({
  33. type: "POST",
  34. url: url,
  35. data: data,
  36. dataType: 'json',
  37. beforeSend:function(){
  38. },
  39. success: function(msg){
  40. if(msg.n>=0){
  41. $('#loginner').append(msg.msg);
  42. if(msg.n=='999999'){
  43. $('#dosubmit').attr("disabled",false);
  44. $('#dosubmit').removeAttr("disabled");
  45. $('#dosubmit').removeClass("nonext");
  46. setTimeout('gonext()',2000);
  47. return false;
  48. }else{
  49. reloads(msg.n);
  50. }
  51. }else{
  52. //alert('指定的数据库不存在,系统也无法创建,请先通过其他方式建立好数据库!');
  53. alert(msg.msg);
  54. }
  55. }
  56. });
  57. }
  58. function gonext(){
  59. window.location.href='<?php echo $_SERVER['PHP_SELF']; ?>?step=5';
  60. }
  61. $(document).ready(function(){
  62. reloads(n);
  63. })
  64. </script>
  65. </div>
  66. <?php require './templates/footer.php';?>
  67. </body>
  68. </html>