<?php
error_reporting(0); 
include("../../config/config.php");
$agent = $_SERVER['HTTP_USER_AGENT'];
if(strpos($agent,"Android") || strpos($agent,"iPhone") || strpos($agent,"iPad") || strpos($agent,"MIDP-2.0") || strpos($agent,"Opera Mini") || strpos($agent,"UCWEB") || strpos($agent,"NetFront") || strpos($agent,"Windows CE") || strpos($agent,"SymbianOS")){ 
}else{
echo "<script>location.href='/index$dshz'</script>";
exit;
}
if($reg==0){
$code=$_SERVER["REQUEST_URI"];
$html ='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">';
$html.='<html><head>';
$html.='<meta charset="gb2312">';
$html.='<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />';
$html.='<title>404 Not Found</title>';
$html.='</head><body>';
$html.='<h1>Not Found</h1>';
$html.='<p>The requested URL '.$code.' was not found on this server.</p>';
$html.='</body>';
$html.='</html>';
echo $html;
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="gb2312">
<title>代理注册</title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
<meta content="telephone=no" name="format-detection"/>
<link href="/2019newui/m/css/style.css" rel="stylesheet" type="text/css"/>
<script src="/2019newui/js/jquery.min.js"></script>
</head>
<body>
<section class="aui-flexView">
<header class="aui-navBar aui-navBar-fixed">
<div class="aui-center">
<span class="aui-center-title">代理注册</span>
</div>
</header>
<section class="aui-scrollView">
<div class="aui-code-box">
<form class="layui-form layui-form-pane" action="" method="post" name="FormInfo" id="FormInfo">
<p class="aui-code-line">
<input type="text" class="aui-code-line-input" name="name" value="" autocomplete="off" placeholder="请输入代理账号" required lay-verify="required" />
</p>
<p class="aui-code-line">
<input type="text" class="aui-code-line-input" name="nikname" value="" autocomplete="off" placeholder="请输入代理昵称" required lay-verify="required" />
</p>
<p class="aui-code-line">
<input type="text" class="aui-code-line-input" name="pass" value=""  autocomplete="off" placeholder="请输入代理密码" required lay-verify="required" />
</p>
<?php if($yqmkg==1){?>
<p class="aui-code-line">
<input type="text" class="aui-code-line-input" name="yqm" value=""  autocomplete="off" placeholder="请输入邀请码" required lay-verify="required" />
</p>
<?php }?>
<div class="aui-code-btn"><button  lay-submit="" lay-filter="FormInfo">代理注册</button>
</div>
</form>
<div class="aui-code-btn"><a href="/m<?php echo $dshz?>" style="color: rgb(153, 153, 153); text-decoration: none; font-size: 13px;" id="forgot">已有账号，返回登录</a></div>
</div>
</section>
</section>
<script src="/layui/layui.js"></script>
<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:'/mregpost<?php echo $dshz?>',
data:$("#FormInfo").serialize(),
dataType:'json',
success:function(result){
if(result.status == 'true'){
layer.closeAll('loading');
layer.open({
type: 1
,offset: 'auto'
,id: 'layerMsg'
,content: '<div style="padding: 20px 100px;">注册成功</div>'
,btn: '确定'
,btnAlign: 'c'
,shade: 0
,closeBtn: 0
,yes: function(index){
location.href='/m<?php echo $dshz?>';
}
});
}else{
layer.closeAll('loading');
layer.msg(result.msg);
}
}	
});
return false;
});
});
</script>
</body>
</html>