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

132 lines
6.0KB

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