<?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, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/layui/css/houtai.css" media="all" />
</head>
<body style="padding:5px;overflow-x: hidden;">
<div class="layui-tab-item layui-show">
<button type="button" class="layui-btn  layui-btn-normal" id="pl" style="width: 100%;"><i class="layui-icon layui-icon-upload"  style="font-size: 16px; color: #000;"></i>上传域名配置文件【TXT格式】</button>
<br><br>
<center>操作流程：点击上方上传域名配置文件【TXT格式】<br><br>等待返回导入成功提示即可完成导入<br><br>如出现上传接口异常，请刷新重试！</center>
</div>
<script src="/layui/layui.js"></script>
<script src="/layui/jquery.min.js"></script>
<script>
layui.use(['form', 'layedit', 'laydate', 'element', 'jquery', 'upload'], function(){
var form = layui.form
,layer   = layui.layer
,layedit = layui.layedit
,element = layui.element
,upload  = layui.upload
,$       = layui.jquery
,laydate = layui.laydate;
upload.render({
elem: '#pl'
,url: '/htpldrhosturl/'
,accept: 'file'
,exts: 'txt'
,size: 50000000
,done: function(res){
if(res.status=='true'){
layer.msg("导入成功！");
parent.location.href='/hthost<?php echo $dshz?>';
}else{
layer.msg(res.msg);
location.reload();
}
}
});
});
</script>
</body>
</html>