123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- include_once('tpl/header.php');
- include_once('functions/medoo.php');
- include_once("config.php");
- $host = $_SERVER['HTTP_HOST'].$_SERVER["PHP_SELF"];
- $host = "http://".str_replace("editsite.php","",$host)."functions/method.php?type=select_ssl";
-
- $selectssl = file_get_contents($host);
- $database = new medoo([
- 'database_type' => 'sqlite',
- 'database_file' => 'data/nssl.db3']);
- $siteid = $_GET['siteid'];
- $siteinfo = $database->get("s_site",["domain","sslid","https"],["id" => $siteid]);
- ?>
- <div class="layui-container" style = "margin-top:40px;">
- <div class="layui-row">
- <div class="layui-col-lg10 layui-col-md-offset1">
- <!--提示-->
- <div>
- <pre class="layui-code">请在下方填写需要启用SSL的站点,域名不需要包含http://,如果您的网站调用了http链接,强制HTTPS会导致网站异常。</pre>
- </div>
- <!--提示END-->
- <!--表单-->
- <div id="" style = "margin-top:40px;">
- <form class="layui-form" action="">
- <div class="layui-form-item">
- <label class="layui-form-label">域名</label>
- <div class="layui-input-block">
- <input type="text" id="domain" readonly="readonly" required lay-verify="required" placeholder="输入要启用SSL的域名" autocomplete="off" class="layui-input" value = "<?php echo $siteinfo['domain']; ?>">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">选择证书</label>
- <div class="layui-input-block">
- <select id = "cert" lay-verify="required">
- <?php echo $selectssl; ?>
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">强制HTTPS</label>
- <div class="layui-input-block">
- <input type="checkbox" name="switch" lay-skin="switch" id = "https">
- </div>
- </div>
- </form>
- <div class="layui-form-item">
- <div class="layui-input-block">
- <button class="layui-btn" lay-filter="formDemo" id = "btn">保存</button>
- <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
- </div>
- </div>
- </div>
- <!--表单END-->
- </div>
- </div>
- </div>
- <?php
- include_once('tpl/footer.php');
- ?>
- <script>
- layui.use(['form','element'], function(){
- var form = layui.form;
- //监听提交
- });
- </script>
|