<?php
error_reporting(0); 
include("../../config/ht.php");
session_start();
if(!isset($_SESSION['adminname'])){echo "<script>alert('请重新登录!')</script><script>top.location.href='/$htlj/'</script>";exit;}
$adminname=$_SESSION['adminname'];
$type="where name='$adminname'";
$adminpd=queryall(admin,$type);
if(!$adminpd){echo "<script>alert('请重新登录!')</script><script>top.location.href='/$htlj/'</script>";exit;}
if($adminpd[qx]=='超级管理员'){}else{echo "<script>alert('无权限')</script><script>top.location.href='/$htlj/'</script>";exit;}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<title>添加域名</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<link rel="stylesheet" href="/layui/css/houtai.css">
<script src="/layui/layui.js"></script>
<script src="/layui/jquery.min.js"></script>
</head>
<body style="padding:5px;overflow-x: hidden;">
<div class="layui-tab-item layui-show">
<form class="layui-form" name="FormInfo" id="FormInfo">
<input type="hidden" name="lx"  value="addzurl">
<div class="layui-form-item">
<input type="text" name="url"  autocomplete="off"  placeholder="请输入域名"   class="layui-input"  lay-verify="required">
</div>
<div class="layui-form-item">
<button class="layui-btn " lay-submit lay-filter="FormInfo" style="width: 100%;">立即提交</button>
</div>
</form>
</div><script>
layui.use(['form', 'layedit', 'laydate', 'element', 'jquery'], function(){
var form = layui.form
,layer   = layui.layer
,layedit = layui.layedit
,element = layui.element
,$= layui.jquery
,laydate = layui.laydate;
form.on('submit(FormInfo)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#FormInfo").serialize(),
dataType:'json',
success:function(result){
if(result.zt == '1'){
layer.closeAll('loading');
layer.msg('添加成功');
parent.location.href='/hthost<?php echo $dshz?>';
}else{
layer.closeAll('loading');
layer.msg(result.msg);
}
}	
});
return false;
});
});
</script>
</body>
</html>