国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

122 строки
5.5KB

  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="install-head shadow-sm mb-3">
  16. <div class="container">
  17. <div class="row align-items-center">
  18. <div class="col-5">
  19. <a href="/" target="_blank" class="logo"><img src="/static/web/img/logo.png" title="DedeBIZ"></a>
  20. </div>
  21. <div class="col-7">
  22. <div class="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"><i class="fa fa-question-circle"></i> 帮助中心</a>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="container">
  31. <div class="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">
  38. <h1 class="text-center">安装DedeV<?php echo $cfg_version_detail;?></h1>
  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. <div class="form-group">
  46. <label for="dbtype" class="form-label">数据库类型</label>
  47. <select id="dbtype" name="dbtype" class="form-control form-select">
  48. <option value="mysql" selected>MySQL</option>
  49. <?php if (extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?>
  50. </select>
  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>
  68. <div class="form-group">
  69. <label for="dbname" class="form-label">数据库名称</label>
  70. <div class="input-group">
  71. <input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
  72. <div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查</button></div>
  73. </div>
  74. </div>
  75. <div id="alertConnect"></div>
  76. <div class="form-group">
  77. <label for="webname" class="form-label">网站名称</label>
  78. <input type="text" name="webname" id="webname" class="form-control" placeholder="我的网站">
  79. </div>
  80. <div class="form-group">
  81. <label for="adminuser" class="form-label">管理员账号</label>
  82. <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');">
  83. <small class="form-text text-black-50">请使用数字0-9小写a-z大写A-Z符号_@!.-</small>
  84. </div>
  85. <div class="form-group">
  86. <label for="adminpwd" class="form-label">管理员密码</label>
  87. <input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');">
  88. <small class="form-text text-black-50">请使用数字0-9小写a-z大写A-Z符号_@!.-</small>
  89. </div>
  90. <div class="text-right"><button type="submit" class="btn btn-success">安装</button></div>
  91. </form>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <script>
  97. $("#btnCheckConnect").click(function() {
  98. let dbhost = $('#dbhost').val();
  99. let dbuser = $('#dbuser').val();
  100. let dbpwd = $('#dbpwd').val();
  101. if (!dbhost) dbhost = "localhost";
  102. if (!dbuser) dbuser = "root";
  103. $.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,function(rs) {
  104. console.log(rs);
  105. let result = JSON.parse(rs);
  106. if (result.code === 200) {
  107. ShowAlert("#alertConnect", result.data, "success", 3000);
  108. } else {
  109. ShowAlert("#alertConnect", result.data, "danger", 3000);
  110. }
  111. })
  112. });
  113. $("#dbtype").change(function() {
  114. if ($(this).val() === 'sqlite') {
  115. $(".form-group.server").hide()
  116. } else {
  117. $(".form-group.server").show()
  118. }
  119. });
  120. </script>
  121. </body>
  122. </html>