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

141 lines
7.8KB

  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/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/popper.min.js"></script>
  12. <script src="../static/web/js/bootstrap.min.js"></script>
  13. <script src="../static/web/js/style.js"></script>
  14. <style>body{line-height:1.6;letter-spacing:.6px;font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#f5f5f5}a{color:#545b62}h2,legend{line-height:1.6;font-size:18px;font-weight:600;color:#393d49}label{margin-bottom:10px;line-height:18px}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}.fa{font-size:14px!important;color:inherit;cursor:pointer}@media (max-width:760px){.install-box{width:100%}.admin-head{padding:1rem 15px}.admin-nav-a{display:none!important}}</style>
  15. </head>
  16. <body>
  17. <div class="d-flex flex-md-row align-items-center shadow-sm rounded admin-head mb-5">
  18. <div class="container">
  19. <div class="row">
  20. <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>
  21. <div class="col-6 col-md-8 text-right d-flex justify-content-end admin-nav">
  22. <a href="https://www.dedebiz.com/help" target="_blank" class="admin-nav-a"><i class="fa fa-info-circle"></i> 帮助中心</a>
  23. <a href="https://www.dedebiz.com/service" target="_blank" class="admin-nav-a"><i class="fa fa-handshake-o"></i> 技术服务</a>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="container install-box">
  29. <div class="row">
  30. <div class="col-md-12">
  31. <?php
  32. if (count($arrMsg) > 0){
  33. foreach($arrMsg as $msg){
  34. ?>
  35. <div class="alert alert-warning"><?php echo $msg ?></div>
  36. <?php }}?>
  37. <div class="alert alert-warning">请先阅读<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-primary">《站点授权协议》</a></div>
  38. <div class="card shadow-sm mb-3">
  39. <div class="card-header bg-success">
  40. <h2 class="text-center text-white my-0">安装DedeV<?php echo $cfg_version_detail;?></h2>
  41. </div>
  42. <div class="card-body">
  43. <form action="../install/index.php" method="post" name="form1">
  44. <input type="hidden" name="step" value="2">
  45. <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode;?>">
  46. <input type="hidden" name="adminmail" value="admin@dedebiz.com">
  47. <legend class="text-success">数据库设置</legend>
  48. <hr>
  49. <div class="form-group">
  50. <label for="dbtype" class="form-label">数据库类型<i class="ml-2 fa fa-question-circle text-warning" data-toggle="tooltip" title="数据库类型一般为MySQL,类型SQLite用于开发调试,不建议生产中使用"></i></label>
  51. <select id="dbtype" name="dbtype" class="form-control form-select">
  52. <option value="mysql" selected>MySQL</option>
  53. <?php if (extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?>
  54. </select>
  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" placeholder="请输入数据库密码">
  67. </div>
  68. <div class="form-group">
  69. <label for="dbprefix" class="form-label">数据表前缀<i class="fa fa-exclamation-circle text-danger ml-2" data-toggle="tooltip" data-html="true" title="请注意DedeV6数据表前缀默认为<span class='text-danger'>biz_</span>"></i></label>
  70. <input type="text" name="dbprefix" id="dbprefix" class="form-control" placeholder="biz_">
  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">管理员账号<i class="fa fa-question-circle text-warning ml-2" data-toggle="tooltip" title="只能用[0-9a-zA-Z_@!.-]以内范围的字符"></i></label>
  92. <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin">
  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>
  98. <div class="form-group">
  99. <label for="cmspath" class="form-label">安装目录<i class="fa fa-question-circle text-warning ml-2" data-toggle="tooltip" title="根目录安装时不必理会"></i></label>
  100. <input type="text" name="cmspath" id="cmspath" class="form-control" value="<?php echo $basepath;?>" placeholder="<?php echo $basepath;?>">
  101. </div>
  102. <div class="text-right"><button type="submit" class="btn btn-success">安装</button></div>
  103. </form>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="col-md-12">
  108. <p>Powered by <a href="https://www.dedebiz.com" target="_blank">DedeBIZ开发团队</a></p>
  109. </div>
  110. </div>
  111. <script>
  112. $("#btnCheckConnect").click(function() {
  113. let dbhost = $('#dbhost').val();
  114. let dbuser = $('#dbuser').val();
  115. let dbpwd = $('#dbpwd').val();
  116. if (!dbhost) dbhost = "localhost";
  117. if (!dbuser) dbuser = "root";
  118. $.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,
  119. function(rs) {
  120. console.log(rs);
  121. let result = JSON.parse(rs);
  122. if (result.code === 200) {
  123. ShowAlert("#alertConnect", result.data, "success", 5000)
  124. } else {
  125. ShowAlert("#alertConnect", result.data, "danger", 5000)
  126. }
  127. })
  128. });
  129. $("#dbtype").change(function() {
  130. if ($(this).val() === 'sqlite') {
  131. $(".form-group.server").hide()
  132. } else {
  133. $(".form-group.server").show()
  134. }
  135. });
  136. $(function() {
  137. $('[data-toggle="tooltip"]').tooltip()
  138. });
  139. </script>
  140. </body>
  141. </html>