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

127 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. <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 shadow-sm mb-3">
  36. <div class="card-header">
  37. <h1 class="text-center">安装DedeV<?php echo $cfg_version_detail;?></h1>
  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. <div class="form-group">
  45. <label for="dbtype" class="form-label">数据库类型</label>
  46. <select id="dbtype" name="dbtype" class="form-control form-select">
  47. <option value="mysql" selected>MySQL</option>
  48. <?php if (extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?>
  49. </select>
  50. <div class="form-text">数据库类型一般为MySQL,则SQLite用于开发调试</div>
  51. </div>
  52. <div class="form-group server">
  53. <label for="dbhost" class="form-label">数据库地址</label>
  54. <input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost">
  55. </div>
  56. <div class="form-group server">
  57. <label for="dbuser" class="form-label">数据库账号</label>
  58. <input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root">
  59. </div>
  60. <div class="form-group server">
  61. <label for="dbpwd" class="form-label">数据库密码</label>
  62. <input type="text" name="dbpwd" id="dbpwd" class="form-control" placeholder="请输入数据库密码">
  63. </div>
  64. <div class="form-group">
  65. <label for="dbprefix" class="form-label">数据表前缀</label>
  66. <input type="text" name="dbprefix" id="dbprefix" class="form-control" placeholder="biz_">
  67. <div class="form-text text-danger">注意DedeV<?php echo $cfg_version_detail;?>数据表前缀默认为biz_</div>
  68. </div>
  69. <div class="form-group">
  70. <label for="dbname" class="form-label">数据库名称</label>
  71. <div class="input-group">
  72. <input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
  73. <div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查</button></div>
  74. </div>
  75. </div>
  76. <div id="alertConnect"></div>
  77. <div class="form-group">
  78. <label for="baseurl" class="form-label">网站地址</label>
  79. <input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl;?>">
  80. </div>
  81. <div class="form-group">
  82. <label for="webname" class="form-label">网站名称</label>
  83. <input type="text" name="webname" id="webname" class="form-control" placeholder="我的网站">
  84. </div>
  85. <div class="form-group">
  86. <label for="adminuser" class="form-label">管理员账号</label>
  87. <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');">
  88. <div class="form-text">请使用数字0-9小写a-z大写A-Z符号_@!.-</div>
  89. </div>
  90. <div class="form-group">
  91. <label for="adminpwd" class="form-label">管理员密码</label>
  92. <input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');">
  93. <div class="form-text">请使用数字0-9小写a-z大写A-Z符号_@!.-</div>
  94. </div>
  95. <div class="text-right"><button type="submit" class="btn btn-success">安装</button></div>
  96. </form>
  97. </div>
  98. </div>
  99. <p><a href="https://www.dedebiz.com" target="_blank">Powered by DedeBIZ开发团队</a></p>
  100. </div>
  101. <script>
  102. $("#btnCheckConnect").click(function() {
  103. let dbhost = $('#dbhost').val();
  104. let dbuser = $('#dbuser').val();
  105. let dbpwd = $('#dbpwd').val();
  106. if (!dbhost) dbhost = "localhost";
  107. if (!dbuser) dbuser = "root";
  108. $.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,function(rs) {
  109. console.log(rs);
  110. let result = JSON.parse(rs);
  111. if (result.code === 200) {
  112. ShowAlert("#alertConnect", result.data, "success", 3000);
  113. } else {
  114. ShowAlert("#alertConnect", result.data, "danger", 3000);
  115. }
  116. })
  117. });
  118. $("#dbtype").change(function() {
  119. if ($(this).val() === 'sqlite') {
  120. $(".form-group.server").hide()
  121. } else {
  122. $(".form-group.server").show()
  123. }
  124. });
  125. </script>
  126. </body>
  127. </html>