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

131 lines
5.9KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>安装DedeV<?php echo $cfg_version_detail;?></title>
  7. <link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/web/css/admin.css">
  10. <script src="/static/web/js/jquery.min.js"></script>
  11. <script src="/static/web/js/bootstrap.min.js"></script>
  12. <script src="/static/web/js/style.js"></script>
  13. </head>
  14. <body>
  15. <div class="login-head shadow-sm mb-3">
  16. <div class="container">
  17. <div class="row align-items-center">
  18. <div class="col-6 col-md-4">
  19. <a href="/" target="_blank" class="logo"><img src="/static/web/img/logo.png" title="DedeBIZ"></a>
  20. </div>
  21. <div class="col-6 col-md-8">
  22. <div class="d-flex justify-content-end text-right">
  23. <a href="https://www.dedebiz.com/service" target="_blank"><i class="fa fa-handshake-o"></i> 技术服务</a>
  24. <a href="https://www.dedebiz.com/help" target="_blank" class="ml-3 d-none d-lg-block"><i class="fa fa-question-circle"></i> 帮助中心</a>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="container install-box">
  31. <?php if (count($arrMsg) > 0) {foreach($arrMsg as $msg){?>
  32. <div class="alert alert-warning"><?php echo $msg ?></div>
  33. <?php }}?>
  34. <div class="alert alert-warning">请先阅读<a href="https://www.dedebiz.com/license?from=install" target="_blank">《站点授权协议》</a></div>
  35. <div class="card mb-3">
  36. <div class="card-header">
  37. <h2 class="text-center">安装DedeV<?php echo $cfg_version_detail;?></h2>
  38. </div>
  39. <div class="card-body">
  40. <form action="/install/index.php" method="post" name="form1">
  41. <input type="hidden" name="step" value="2">
  42. <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode;?>">
  43. <input type="hidden" name="adminmail" value="admin@dedebiz.com">
  44. <legend class="text-success">数据库设置</legend>
  45. <hr>
  46. <div class="form-group">
  47. <label for="dbtype" class="form-label">数据库类型</label>
  48. <select id="dbtype" name="dbtype" class="form-control form-select">
  49. <option value="mysql" selected>MySQL</option>
  50. <?php if (extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?>
  51. </select>
  52. <div class="form-text">数据库类型一般为MySQL,则SQLite用于开发调试</div>
  53. </div>
  54. <div class="form-group server">
  55. <label for="dbhost" class="form-label">数据库地址</label>
  56. <input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost">
  57. </div>
  58. <div class="form-group server">
  59. <label for="dbuser" class="form-label">数据库用户名</label>
  60. <input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root">
  61. </div>
  62. <div class="form-group server">
  63. <label for="dbpwd" class="form-label">数据库密码</label>
  64. <input type="text" name="dbpwd" id="dbpwd" class="form-control" placeholder="请输入数据库密码">
  65. </div>
  66. <div class="form-group">
  67. <label for="dbprefix" class="form-label">数据表前缀</label>
  68. <input type="text" name="dbprefix" id="dbprefix" class="form-control" placeholder="biz_">
  69. <div class="form-text text-danger">注意DedeV<?php echo $cfg_version_detail;?>数据表前缀默认为biz_</div>
  70. </div>
  71. <div class="form-group">
  72. <label for="dbname" class="form-label">数据库名称</label>
  73. <div class="input-group">
  74. <input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
  75. <div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查</button></div>
  76. </div>
  77. </div>
  78. <div id="alertConnect"></div>
  79. <legend class="text-success">站点设置</legend>
  80. <hr>
  81. <div class="form-group">
  82. <label for="baseurl" class="form-label">网站网址</label>
  83. <input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl;?>">
  84. </div>
  85. <div class="form-group">
  86. <label for="webname" class="form-label">网站名称</label>
  87. <input type="text" name="webname" id="webname" class="form-control" placeholder="我的网站">
  88. </div>
  89. <div class="form-group">
  90. <label for="adminuser" class="form-label">管理员账号</label>
  91. <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin">
  92. <div class="form-text">仅限使用[0-9a-zA-Z_@!.-]</div>
  93. </div>
  94. <div class="form-group">
  95. <label for="adminpwd" class="form-label">管理员密码</label>
  96. <input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin">
  97. <div class="form-text">仅限使用[0-9a-zA-Z_@!.-]</div>
  98. </div>
  99. <div class="text-right"><button type="submit" class="btn btn-success">安装</button></div>
  100. </form>
  101. </div>
  102. </div>
  103. <p><a href="https://www.dedebiz.com" target="_blank">Powered by DedeBIZ开发团队</a></p>
  104. </div>
  105. <script>
  106. $("#btnCheckConnect").click(function() {
  107. let dbhost = $('#dbhost').val();
  108. let dbuser = $('#dbuser').val();
  109. let dbpwd = $('#dbpwd').val();
  110. if (!dbhost) dbhost = "localhost";
  111. if (!dbuser) dbuser = "root";
  112. $.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,function(rs) {
  113. console.log(rs);
  114. let result = JSON.parse(rs);
  115. if (result.code === 200) {
  116. ShowAlert("#alertConnect", result.data, "success", 3000);
  117. } else {
  118. ShowAlert("#alertConnect", result.data, "danger", 3000);
  119. }
  120. })
  121. });
  122. $("#dbtype").change(function() {
  123. if ($(this).val() === 'sqlite') {
  124. $(".form-group.server").hide()
  125. } else {
  126. $(".form-group.server").show()
  127. }
  128. });
  129. </script>
  130. </body>
  131. </html>