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

140 lines
7.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>安装DedeV6程序</title>
  7. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  9. <link rel="shortcut icon" href="../static/web/img/favicon.ico">
  10. <script src="../static/web/js/jquery.min.js"></script>
  11. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  12. <script src="../static/web/js/style.js"></script>
  13. <style>*{margin:0;padding:0;letter-spacing:.6px;box-sizing:border-box}body{line-height:1.5;font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#f5f5f5}a{color:#545b62}input,select,.btn{font-size:14px!important}.install-box{margin:0 auto;width:860px}.admin-head{padding:1rem 0;background:#fff}.logo{height:36px}.admin-nav{height:36px;line-height:36px}.admin-nav-a{padding-right:30px}.admin-btn{color:#545b62}.dropdown-menu{min-width:8rem;font-size:14px}.dropdown-item{padding:0 1rem;height:36px;line-height:36px;font-size:14px;color:#545b62!important}@media (max-width:760px){.install-box{width:100%}.admin-head{padding:1rem 15px}.admin-nav-a{display:none!important}}</style>
  14. </head>
  15. <body>
  16. <div class="d-flex flex-md-row align-items-center shadow-sm admin-head mb-5">
  17. <div class="container">
  18. <div class="row">
  19. <div class="col-6 col-md-4 text-left"><img src="../static/web/img/logo.png" title="<?php echo $cfg_soft_enname;?>" class="logo"></div>
  20. <div class="col-6 col-md-8 text-right d-flex justify-content-end admin-nav">
  21. <a href="https://www.dedebiz.com/help" target="_blank" class="admin-nav-a"><i class="fa fa-info-circle"></i> 帮助中心</a>
  22. <a href="https://www.dedebiz.com/service" target="_blank" class="admin-nav-a"><i class="fa fa-handshake-o"></i> 技术服务</a>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="container install-box">
  28. <div class="row">
  29. <div class="col-md-12">
  30. <?php
  31. if (count($arrMsg) > 0){
  32. foreach($arrMsg as $msg){
  33. ?>
  34. <div class="alert alert-warning"><?php echo $msg ?></div>
  35. <?php }}?>
  36. <div class="alert alert-warning">请先阅读<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-primary">《站点授权协议》</a></div>
  37. <div class="card shadow-sm mb-3">
  38. <div class="card-header bg-success text-white">
  39. <h4 class="text-center my-0">欢迎使用DedeV<?php echo $cfg_version_detail;?></h4>
  40. </div>
  41. <div class="card-body">
  42. <form action="../install/index.php" method="post" name="form1">
  43. <input type="hidden" name="step" value="2" />
  44. <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode; ?>">
  45. <input type="hidden" name="adminmail" value="admin@dedebiz.com">
  46. <legend>数据库设置</legend>
  47. <hr>
  48. <div class="form-group">
  49. <label for="dbtype" class="form-label">数据库类型</label>
  50. <select id="dbtype" name="dbtype" class="form-control form-select">
  51. <option value="mysql" selected>MySQL</option>
  52. <?php if(extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php } ?>
  53. </select>
  54. <div class="form-text text-danger">数据库类型一般为MySQL,SQLite仅用于开发调试,不建议生产中使用。</div>
  55. </div>
  56. <div class="form-group server">
  57. <label for="dbhost" class="form-label">数据库主机</label>
  58. <input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost">
  59. </div>
  60. <div class="form-group server">
  61. <label for="dbuser" class="form-label">数据库用户</label>
  62. <input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root">
  63. </div>
  64. <div class="form-group server">
  65. <label for="exampleInputPassword1" class="form-label">数据库密码</label>
  66. <input type="text" name="dbpwd" id="dbpwd" class="form-control">
  67. </div>
  68. <div class="form-group">
  69. <label for="dbprefix" class="form-label">数据表前缀</label>
  70. <input type="text" name="dbprefix" id="dbprefix" class="form-control" placeholder="biz_">
  71. <div class="form-text text-danger">请注意数据库名称默认为biz_</div>
  72. </div>
  73. <div class="form-group">
  74. <label for="dbname" class="form-label">数据库名称</label>
  75. <div class="input-group">
  76. <input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
  77. <div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查连接</button></div>
  78. </div>
  79. </div>
  80. <div id="alertConnect"></div>
  81. <legend>站点设置</legend>
  82. <hr>
  83. <div class="form-group">
  84. <label for="baseurl" class="form-label">网站网址</label>
  85. <input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl; ?>">
  86. </div>
  87. <div class="form-group">
  88. <label for="webname" class="form-label">网站名称</label>
  89. <input type="text" name="webname" id="webname" class="form-control" placeholder="某某公司">
  90. </div>
  91. <div class="form-group">
  92. <label for="adminuser" class="form-label">用户名</label>
  93. <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin">
  94. <div class="form-text text-dark">只能用[0-9a-zA-Z_@!.-]以内范围的字符</div>
  95. </div>
  96. <div class="form-group">
  97. <label for="adminpwd" class="form-label">密码</label>
  98. <input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin">
  99. </div>
  100. <div class="form-group">
  101. <label for="cmspath" class="form-label">安装目录</label>
  102. <input type="text" name="cmspath" id="cmspath" class="form-control" value="<?php echo $basepath; ?>" placeholder="<?php echo $basepath; ?>">
  103. <div class="form-text text-danger">在根目录安装时不必理会</div>
  104. </div>
  105. <div class="text-right"><button type="submit" class="btn btn-success">立即安装</button></div>
  106. </form>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="col-md-12">
  111. <p>Powered by <a href="https://www.dedebiz.com" target="_blank" class="text-dark">DedeBIZ开发团队</a></p>
  112. </div>
  113. </div>
  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. $("#dbtype").change(function () {
  132. if ($(this).val() === 'sqlite') {
  133. $(".form-group.server").hide();
  134. } else {
  135. $(".form-group.server").show();
  136. }
  137. })
  138. </script>
  139. </body>
  140. </html>