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

134 lines
6.0KB

  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=utf-8" />
  5. <title>安装程序 - DedeBIZ - DedeBIZ技术支持</title>
  6. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  7. <link rel="stylesheet" href="../static/font-awesome/css/font-awesome.min.css">
  8. <script src="../static/js/jquery.min.js"></script>
  9. <script src="../static/js/popper.min.js"></script>
  10. <script src="../static/js/bootstrap.bundle.js"></script>
  11. <script src="../static/js/dede.js"></script>
  12. </head>
  13. <body>
  14. <div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
  15. <h5 class="my-0 mr-md-auto font-weight-normal text-success">DedeBIZ安装程序</h5>
  16. <nav class="my-2 my-md-0 mr-md-3">
  17. <a class="p-2 text-dark" href="https://www.dedebiz.com/git" target="_blank">代码托管</a>
  18. <a class="p-2 text-dark" href="https://www.dedebiz.com/help" target="_blank">帮助中心</a>
  19. <a class="p-2 text-dark" href="https://www.dedebiz.com/service" target="_blank">技术服务</a>
  20. </nav>
  21. </div>
  22. <main class="container">
  23. <?php
  24. if(count($arrMsg) > 0){
  25. foreach($arrMsg as $msg){
  26. ?>
  27. <div class="alert alert-warning" role="alert">
  28. <?php echo $msg ?>
  29. </div>
  30. <?php
  31. }
  32. }
  33. ?>
  34. <div class="card mb-4 shadow-sm">
  35. <div class="card-header bg-success text-white">
  36. <h5 class="my-0 fw-normal text-center">首次运行安装程序(v<?php echo $cfg_version_detail;?>)</h5>
  37. </div>
  38. <div class="card-body">
  39. <form action="index.php" method="post" name="form1">
  40. <input type="hidden" name="step" value="2" />
  41. <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode; ?>">
  42. <input type="hidden" name="adminmail" value="admin@dedebiz.com">
  43. <legend>数据库设置</legend>
  44. <hr>
  45. <div class="mb-3">
  46. <label for="dbtype" class="form-label">数据库类型</label>
  47. <select id="dbtype" name="dbtype" class="form-control form-select">
  48. <option value="mysql" selected>MySQL</option>
  49. <option value="sqlite">SQLite</option>
  50. </select>
  51. <div class="form-text text-muted">一般为MySQL,SQLite仅用于开发调试不建议生产中使用</div>
  52. </div>
  53. <div class="mb-3">
  54. <label for="dbhost" class="form-label">数据库主机</label>
  55. <input id="dbhost" name="dbhost" type="text" class="form-control" placeholder="localhost">
  56. </div>
  57. <div class="mb-3">
  58. <label for="dbuser" class="form-label">数据库用户</label>
  59. <input name="dbuser" id="dbuser" type="text" class="form-control" placeholder="root">
  60. </div>
  61. <div class="mb-3">
  62. <label for="exampleInputPassword1" class="form-label">数据库密码</label>
  63. <input name="dbpwd" type="text" class="form-control" id="dbpwd" placeholder="">
  64. </div>
  65. <div class="mb-3">
  66. <label for="dbprefix" class="form-label">数据表前缀</label>
  67. <input name="dbprefix" type="text" class="form-control" id="dbprefix" placeholder="dede_">
  68. </div>
  69. <div class="mb-3">
  70. <label for="dbname" class="form-label">数据库名称</label>
  71. <div class="input-group mb-3">
  72. <input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
  73. <div class="input-group-append">
  74. <button class="btn btn-outline-success" type="button" id="btnCheckConnect">检查连接</button>
  75. </div>
  76. </div>
  77. </div>
  78. <div id="alertConnect"></div>
  79. <legend>站点设置</legend>
  80. <hr>
  81. <div class="mb-3">
  82. <label for="adminuser" class="form-label">用户名</label>
  83. <input name="adminuser" type="text" class="form-control" id="adminuser" placeholder="admin">
  84. <div class="form-text text-muted">只能用'0-9'、'a-z'、'A-Z'、'.'、'@'、'_'、'-'、'!'以内范围的字符</div>
  85. </div>
  86. <div class="mb-3">
  87. <label for="adminpwd" class="form-label">密码</label>
  88. <input name="adminpwd" type="text" class="form-control" id="adminpwd" placeholder="admin">
  89. </div>
  90. <div class="mb-3">
  91. <label for="webname" class="form-label">网站名称</label>
  92. <input name="webname" type="text" class="form-control" id="webname" placeholder="我的网站">
  93. </div>
  94. <div class="mb-3">
  95. <label for="baseurl" class="form-label">网站网址</label>
  96. <input name="baseurl" type="text" class="form-control" id="baseurl" placeholder="<?php echo $baseurl; ?>">
  97. </div>
  98. <div class="mb-3">
  99. <label for="cmspath" class="form-label">安装目录</label>
  100. <input name="cmspath" type="text" class="form-control" id="cmspath" placeholder="<?php echo $basepath; ?>">
  101. <div class="form-text text-muted">在根目录安装时不必理会</div>
  102. </div>
  103. <button type="submit" class="btn btn-success">立即安装</button> <span class="ml-2">安装即表示你同意<a href="https://www.dedebiz.com/license" target="_blank">站点授权协议</a></span>
  104. </form>
  105. </div>
  106. </div>
  107. <footer>
  108. <div class="row">
  109. <div class="col-12 col-md">
  110. <p class="d-block mb-3 text-muted">© 2022 <a href="https://www.dedebiz.com" target="_blank" title="DedeBIZ商业技术支持,提供更专业强大的站点应用开发技术">DedeBIZ技术支持</a></p>
  111. </div>
  112. </div>
  113. </footer>
  114. </main>
  115. <script>
  116. $("#btnCheckConnect").click(function() {
  117. let dbhost = $('#dbhost').val();
  118. let dbuser = $('#dbuser').val();
  119. let dbpwd = $('#dbpwd').val();
  120. if (!dbhost) dbhost = "localhost";
  121. if (!dbuser) dbuser = "root";
  122. $.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,function(rs){
  123. console.log(rs);
  124. let result = JSON.parse(rs);
  125. if (result.code === 200) {
  126. ShowAlert("#alertConnect", result.data, "success", 5000);
  127. } else {
  128. ShowAlert("#alertConnect", result.data, "danger", 5000);
  129. }
  130. })
  131. })
  132. </script>
  133. </body>
  134. </html>