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

135 lines
6.1KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="<?php echo $cfg_soft_lang; ?>">
  5. <title>DedeCMSV6程序安装</title>
  6. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <script src="../static/web/js/jquery.min.js"></script>
  9. <script src="../static/web/js/popper.min.js"></script>
  10. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  11. <script src="../static/web/js/style.js"></script>
  12. <style>body{font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#f6f6f6}input,select,.btn{font-size:14px!important}@media (min-width:1170px){.container{max-width:860px}}</style>
  13. </head>
  14. <body>
  15. <div class="d-flex flex-column flex-md-row align-items-center mb-3 p-3 px-md-5 bg-white border-bottom shadow-sm">
  16. <h5 class="my-0 mr-md-auto text-success">程序安装</h5>
  17. <nav class="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"><?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">首次运行程序安装DedeCMSV<?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-danger">一般为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="biz_">
  67. <div class="form-text text-danger">请注意数据库名称默认为biz_</div>
  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-dark">只能用'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" value="<?php echo $basepath; ?>" placeholder="<?php echo $basepath; ?>">
  101. <div class="form-text text-danger">在根目录安装时不必理会</div>
  102. </div>
  103. <button type="submit" class="btn btn-success">立即安装</button>
  104. <span class="ml-2">安装即表示您同意<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-success">《站点授权协议》</a></span>
  105. </form>
  106. </div>
  107. </div>
  108. <footer>
  109. <div class="row">
  110. <div class="col-12 col-md">
  111. <p class="d-block mb-3">© 2022 <a href="https://www.dedebiz.com" target="_blank" class="text-dark">DedeBIZ技术支持</a></p>
  112. </div>
  113. </div>
  114. </footer>
  115. </main>
  116. <script>
  117. $("#btnCheckConnect").click(function() {
  118. let dbhost = $('#dbhost').val();
  119. let dbuser = $('#dbuser').val();
  120. let dbpwd = $('#dbpwd').val();
  121. if (!dbhost) dbhost = "localhost";
  122. if (!dbuser) dbuser = "root";
  123. $.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,function(rs){
  124. console.log(rs);
  125. let result = JSON.parse(rs);
  126. if (result.code === 200) {
  127. ShowAlert("#alertConnect", result.data, "success", 5000);
  128. } else {
  129. ShowAlert("#alertConnect", result.data, "danger", 5000);
  130. }
  131. })
  132. })
  133. </script>
  134. </body>
  135. </html>