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

133 lines
6.1KB

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