国内流行的内容管理系统(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>
  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:#545b62;background:#f8f8f8}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/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"><?php echo $msg ?></div>
  28. <?php
  29. }
  30. }
  31. ?>
  32. <div class="card mb-4 shadow-sm">
  33. <div class="card-header bg-success text-white">
  34. <h5 class="my-0 fw-normal text-center">首次运行程序安装DedeCMSV<?php echo $cfg_version_detail;?></h5>
  35. </div>
  36. <div class="card-body">
  37. <form action="index.php" method="post" name="form1">
  38. <input type="hidden" name="step" value="2" />
  39. <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode; ?>">
  40. <input type="hidden" name="adminmail" value="admin@dedebiz.com">
  41. <legend>数据库设置</legend>
  42. <hr>
  43. <div class="mb-3">
  44. <label for="dbtype" class="form-label">数据库类型</label>
  45. <select id="dbtype" name="dbtype" class="form-control form-select">
  46. <option value="mysql" selected>MySQL</option>
  47. <option value="sqlite">SQLite</option>
  48. </select>
  49. <div class="form-text text-danger">一般为MySQL,SQLite仅用于开发调试不建议生产中使用</div>
  50. </div>
  51. <div class="mb-3">
  52. <label for="dbhost" class="form-label">数据库主机</label>
  53. <input id="dbhost" name="dbhost" type="text" class="form-control" placeholder="localhost">
  54. </div>
  55. <div class="mb-3">
  56. <label for="dbuser" class="form-label">数据库用户</label>
  57. <input name="dbuser" id="dbuser" type="text" class="form-control" placeholder="root">
  58. </div>
  59. <div class="mb-3">
  60. <label for="exampleInputPassword1" class="form-label">数据库密码</label>
  61. <input name="dbpwd" type="text" class="form-control" id="dbpwd">
  62. </div>
  63. <div class="mb-3">
  64. <label for="dbprefix" class="form-label">数据表前缀</label>
  65. <input name="dbprefix" type="text" class="form-control" id="dbprefix" placeholder="biz_">
  66. <div class="form-text text-danger">请注意数据库名称默认为biz_</div>
  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 ml-1">
  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-dark">只能用'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" value="<?php echo $basepath; ?>" placeholder="<?php echo $basepath; ?>">
  100. <div class="form-text text-danger">在根目录安装时不必理会</div>
  101. </div>
  102. <button type="submit" class="btn btn-success">立即安装</button>
  103. <span class="ml-2">安装即表示您同意<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-success">《站点授权协议》</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">© 2022 <a href="https://www.dedebiz.com" target="_blank" class="text-dark">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>