<!--#include virtual="/show/indexhead.asp"-->
<!--#include virtual="/inc/md52.asp"-->
<!--#include virtual="/inc/getip/index.asp"-->
<script src="/Template/newbuy/css/jquery.min.js" type="text/javascript"></script>
<script src="/inc/layer/layer.js" type="text/javascript"></script>
<%
if SafeRequestform("act")="regin" then
call chkwurl()

Const stringmodarr = "0123456789abcdefghijklmnopqrstuvwxyz"
Const stringmodarr2 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
regstr=Right((year(Now())),2)&Right(("00"&Month(Now())),2)&Right(("00"&Day(Now())),2)&Right(("00"&hour(Now())),2)&Right(("00"&minute(Now())),2)&Right(("00"&second(Now())),2)
strlength = Len(stringmodarr)
strlength2 = Len(stringmodarr2)
Randomize timer
For i = 1 To 20 
sumstr = sumstr&Mid(stringmodarr,Int(Rnd * strlength + 1),1)  
Next 
For i = 1 To 4 
sumstr2 = sumstr2&Mid(stringmodarr2,Int(Rnd * strlength2 + 1),1)  
Next
username="IK"&regstr&sumstr2  '商户名

chkcode=SafeRequestform("chkcode")

if chkcode="" or request.Cookies("GetCode")="" then 
call PopErr("验证码错误err1") 
response.End()
end if
if int(request.Cookies("GetCode"))<>int(trim(chkcode)) then 
call PopErr("验证码错误err2") 
response.End()
end if
	
sql="select ayshangshenhe,ayisyaoqing,kamishuju,ayreg,ayregshang,flku,spku,ddku,cwku,rzku,regjibie from ayquanju" 
rs.open sql,conn,1,1
ayisyaoqing=rs("ayisyaoqing")
kamishuju=trim(rs("kamishuju"))
ayreg=rs("ayreg")
ayregshang=rs("ayregshang")
ayshangshenhe=rs("ayshangshenhe")
flku=trim(rs("flku"))
spku=trim(rs("spku"))
ddku=trim(rs("ddku"))
cwku=trim(rs("cwku"))
rzku=trim(rs("rzku"))
regjibie=rs("regjibie")
rs.close

if cint(ayregshang)=0 then 
call PopErr("目前已关闭了商户注册 请联系管理人员")
response.End()
end if

yaoqingma=SafeRequestform("yaoqingma")

'原邀请码功能
'if trim(yaoqingma)<>"" then 
'	if cint(ayisyaoqing)=0 then 
'	call PopErr("平台暂未开启邀请码注册功能")
'	response.End()
'	end if
'	rs.open "select * from ayyaoqing where card='"&trim(yaoqingma)&"' and isyong=0" ,conn,1,1
'	if rs.bof and rs.eof then 
'	call PopErr("邀请码无效或已被使用")
'	response.End()
'	end if
'	rs.close
'end if

'新邀请码功能
if cint(ayisyaoqing)=1 then 
	if trim(yaoqingma)="" then 
	call PopErr("请填写邀请码")
	response.End()
	end if

	rs.open "select * from ayyaoqing where card='"&trim(yaoqingma)&"' and isyong=0" ,conn,1,1
	if rs.bof and rs.eof then 
	call PopErr("邀请码无效或已被使用")
	response.End()
	end if
	rs.close
end if


password1=SafeRequestform("pass1") 
password2=SafeRequestform("pass2") 
email=SafeRequestform("email")
Mobile=SafeRequestform("Mobile")
'ptype=SafeRequestform("ptype") 
'card=SafeReplace(SafeRequestform("card")," ","") 
realname=SafeRequestform("realname") 
idcard=SafeRequestform("idcard") 

'if ptype<>"1" and ptype<>"2" and ptype<>"4" then 
'bankname=ptype
'ptype="3"
'end if

if trim(password1)="" or trim(password2)="" then call PopErr("请设置密码！")
if trim(password1)<>trim(password2) then call PopErr("两次密码输入不一致！")
if trim(email)="" then call PopErr("请填写邮箱！")
if trim(Mobile)="" then call PopErr("请填写手机号！")
'if trim(card)="" then call PopErr("请填写收款账号！")
if trim(idcard)="" then call PopErr("请填写身份证号！")
if trim(realname)="" then call PopErr("请填写身收款姓名！")
if left(Mobile,3)="170" or left(Mobile,3)="171" then call PopErr("该手机号段禁止使用！")
if left(Mobile,3)="145" or left(Mobile,3)="146" or left(Mobile,3)="147" then call PopErr("该手机号段禁止使用！")

if isNumeric(Mobile)=false then call PopErr("请正确填写手机号！")
if instr(1,email,"@")=0 then call PopErr("请正确填写邮箱！") 

rs.open "select aymail,iszhuxiao from ayname where aymail='"&trim(email)&"' and iszhuxiao=0" ,conn,1,1
if not(rs.bof and rs.eof) then
call PopErr("该邮箱已经注册过！")
end if
rs.close

rs.open "select * from ayname where aytel="&trim(Mobile)&" and iszhuxiao=0" ,conn,1,3
if not(rs.bof and rs.eof) then
call PopErr("该手机号已经注册过！")
end if
rs.addnew
rs("ayusername")=username
rs("aypassword")=md5(password1)
rs("aymail")=email
rs("aytel")=Mobile
rs("ayshenfenzheng")=idcard
rs("ayjiesuanms")=5

rs("aytrueuser")=realname
rs("ayjibie")=regjibie
rs("aydata")=now()
rs("ayip")=userinip 
rs("ayyue")=0
rs("ayxiaofei")=0
rs("ayusersuo")=0
rs("kamiku")=kamishuju
rs("suijimd5")=sumstr
rs("ayismd5")=1
rs("flku")=flku
rs("spku")=spku
rs("ddku")=ddku
rs("cwku")=cwku
rs("rzku")=rzku
rs("isjiekou")="1|1|1|1|1|1"
if trim(yaoqingma)<>"" then rs("isyaoqing")=1
rs.update  
rs.close

rs.open "select aymd5,ayusername,aynameid,iszhuxiao from ayname where ayusername='"&username&"' and iszhuxiao=0" ,conn,1,3
shouyaoid=rs("aynameid")
rs("aymd5")=mid(md5(rs("aynameid")),17,8) 
aynameid=rs("aynameid")
rs.update
rs.close


if trim(yaoqingma)<>"" then 
	rs.open "select * from ayyaoqing where card='"&trim(yaoqingma)&"' and isyong=0" ,conn,1,3
	if not(rs.bof and rs.eof) then
	rs("isyong")=1
	rs("userid")=shouyaoid
	rs.update
	end if
	rs.close
end if

conn.Execute("Insert Into "&rzku&"(ayloguserid,aylogcon,aylogip,ayipd,aylogleibie,aylogerr) values("&aynameid&",'"&username&"注册成功"&"','"&userinip&"','"&Look_Ip(userinip)&"','2','0')")
call PopErr2("注册成功！","/index/log")


end if
%>

<script language=javascript>
function refreshImage(img)
{
    var imageUrl = '/inc/code/'; 
    img.src = imageUrl + '?' + Math.random();
}
var jc_mail = /^[-_A-Za-z0-9]+@([_A-Za-z0-9]+\.)+[A-Za-z0-9]{2,3}$/;
var xmlhttp;
try
{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e){try{xmlhttp=new XMLHttpRequest();}catch (e){}}}

function checkMobile(str)
{ 
document.getElementById("err").value=1;
	if (str=="")
	{
	document.getElementById("Mobiled").className='regts_red';
	Mobiles.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写常用手机号";
	return false;
	}
	var regu =/^[1][3-9][0-9]{9}$/; 
	var re = new RegExp(regu); 
	if (re.test(str)) 
	{
			xmlhttp.open("get","/show/?Mobiled="+str+ "&act=regcktel&t=" +  new Date().getTime());
			xmlhttp.onreadystatechange=function()
			{
				if(200==xmlhttp.status)
				{
					if (xmlhttp.responseText=="no")
					{ 
					document.getElementById("Mobiled").className='regts_red';
					Mobiles.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>该手机号已经注册";
					return false;
					}
					if(xmlhttp.responseText=="yes")
					{
					document.getElementById("Mobiled").className='regts_green';
					Mobiles.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该手机号可用";
					document.getElementById("err").value=0;
					}
				}
			}
			xmlhttp.send(null); 
	}
	else
	{ 
	document.getElementById("Mobiled").className='regts_red';
	Mobiles.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>手机号格式不正确";
	return false;
	} 
} 





function checkemail(str)
{
document.getElementById("err").value=1;
	if (str=="")
	{
	document.getElementById("emaild").className='regts_red';
	emails.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写电子邮箱";
	return false;
	}
	if(jc_mail.test(str)==false)	
	{
	document.getElementById("emaild").className='regts_red';
	emails.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>电子邮箱格式不正确！";
	return false;
	}
	//if(str.split("qq.").length>1)
	//{
	//document.getElementById("emaild").className='regts_red';
	//emails.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>因腾讯限制,不支持QQ邮箱";
	//return false;
	//}
	//if(str.split("QQ.").length>1)
	//{
	//document.getElementById("emaild").className='regts_red';
	//emails.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>因腾讯限制,不支持QQ邮箱";
	//return false;
	//}
	xmlhttp.open("get","/show/?email="+str+ "&act=regckmail&t=" +  new Date().getTime());
	xmlhttp.onreadystatechange=function()
	{
		if(200==xmlhttp.status)
		{
			if (xmlhttp.responseText=="yes")
			{ 
			document.getElementById("emaild").className='regts_red';
			emails.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>该邮箱已被使用！";
			return false;
			}
			else
			{
			document.getElementById("emaild").className='regts_green';
			emails.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该邮箱可用";
			document.getElementById("err").value=0;
			}
		}
	}
	xmlhttp.send(null); 
}  


function passone(str)
{
document.getElementById("err").value=1;
	if (str=="")
	{
	document.getElementById("pass1d").className='regts_red';
	pass1s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请设置一个密码";
	return false;
	}
    if(str.length<6||str.length>15)
	{
	document.getElementById("pass1d").className='regts_red';
	pass1s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>密码长度应在6-15位";
	return false;
	}else
	{
	document.getElementById("pass1d").className='regts_green';
	pass1s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该密码可用";
	document.getElementById("err").value=0;
	}
}
function passtwo(str)
{	
document.getElementById("err").value=1;
	pass1=document.getElementById("pass1").value;
	if (str=="")
	{
	document.getElementById("pass2d").className='regts_red';
	pass2s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请设置一个密码";
	return false;
	}
	if (pass1!=str)
	{
	document.getElementById("pass2d").className='regts_red';
	pass2s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>两次密码不一致";
	return false;
	}
    if(str.length<6||str.length>15)
	{
	document.getElementById("pass2d").className='regts_red';
	pass2s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>密码长度应在6-15位";
	return false;
	}
	else
	{
	document.getElementById("pass2d").className='regts_green';
	pass2s.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该密码可用";
	document.getElementById("err").value=0;
	}
}


function selectptype(str)
{
	if(str=="1")
	{
	payid.innerHTML = "支付宝账号";
	cards.innerHTML = "请正确填写支付宝账号";
	document.getElementById("cardd").className='regts';
	document.getElementById("card").value="";
	}
	else if(str=="2")
	{
	payid.innerHTML = "财付通账号";
	cards.innerHTML = "请正确填写财付通账号";
	document.getElementById("cardd").className='regts';
	document.getElementById("card").value="";
	}
	else if(str=="4")
	{
	payid.innerHTML = "微信号";
	cards.innerHTML = "请正确填写微信号";
	document.getElementById("cardd").className='regts';
	document.getElementById("card").value="";
	}
	else
	{
	payid.innerHTML = "银行卡卡号";
	cards.innerHTML = "请正确填写"+str+"卡号";
	document.getElementById("cardd").className='regts';
	document.getElementById("card").value="";
	}
}
function checkcard(str)
{
document.getElementById("err").value=1;
	if (str=="")
	{
	document.getElementById("cardd").className='regts_red';
	cards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写收款账号";
	return false;
	}
	else
	{
	document.getElementById("cardd").className='regts_green';
	cards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该收款账号可用";
	document.getElementById("err").value=0;
	}
}

function checkname(str)
{
document.getElementById("err").value=1;
	if (str=="")
	{
	document.getElementById("realnamed").className='regts_red';
	realnames.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写真实姓名";
	return false;
	}
	else
	{
	document.getElementById("realnamed").className='regts_green';
	realnames.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该收款姓名可用";
	document.getElementById("err").value=0;
	}
}


function checkidcard(cardid) 
{
document.getElementById("err").value=1;
	if (cardid=="")
	{
	document.getElementById("idcardd").className='regts_red';
	idcards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写真实身份证号";
	return false;
	}
	var pattern;
	if (cardid.length==15)
	{
	pattern= /^\d{15}$/;
		if (pattern.exec(cardid)==null)
		{
		document.getElementById("idcardd").className='regts_red';
		idcards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写真实身份证号";
		return false;
		}
		else
		{
		document.getElementById("idcardd").className='regts_green';
		idcards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该身份证号可用";
		document.getElementById("err").value=0;
		return true;
		}
	}
	else if (cardid.length==18)
	{
	pattern= /^\d{17}(\d|x|X)$/;
		if (pattern.exec(cardid)==null)
		{
		document.getElementById("idcardd").className='regts_red';
		idcards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写真实身份证号";
		return false;
		}
		else
		{
		document.getElementById("idcardd").className='regts_green';
		idcards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/dui.png width=16 height=17>该身份证号可用";
		document.getElementById("err").value=0;
		return true;
		}
	}
	 else
	{
	document.getElementById("idcardd").className='regts_red';
	idcards.innerHTML = "<img src=<%=ossurl%>Template/Template5/images/hong.png width=16 height=17>请填写真实身份证号";
	return false;
	}
}
function chkreg()
{
	var iskqyaoqing=form1.iskqyaoqing.value;
	
	if(iskqyaoqing=="1")
	{
	if(form1.yaoqingma.value==""){alert("请填写邀请码");return false;}
	}

	//var reg = /[\u4e00-\u9fa5]/g;
	//if(reg.test(form1.username.value)){document.getElementById("err").value=1;alert("商户名禁止使用中文字符");return false;}else{document.getElementById("err").value=0;}
		
	if((form1.pass1.value=="")||(form1.pass2.value=="")){alert("请设置一个登录密码");return false;}
	if(form1.pass1.value!=form1.pass2.value){alert("两次密码输入不一致");return false;}
	if(form1.email.value==""){alert("请填写一个常用电子邮箱");return false;}
	if(form1.Mobile.value==""){alert("请填写一个常用手机号");return false;}
	//if(form1.card.value==""){alert("请填写一个真实有效收款账号");return false;}
	if(form1.realname.value==""){alert("请填写真实收款姓名");return false;}
	if(form1.idcard.value==""){alert("请填写真实身份证号码");return false;}
	if(form1.chkcode.value==""){alert("请填写右侧的验证码");return false;}
	if(form1.err.value=="1"){alert("表单错误，请正确填写");return false;}
}
</script>

<%
rs.open "select ayisyaoqing from ayquanju" ,conn,1,1
iskqyaoqing=rs("ayisyaoqing")
rs.close
if cint(iskqyaoqing)=1 then
yaoqingstr="<br><br>由于平台商家过多，为避免资源浪费和提升平台质量，目前开启了商家邀请码注册，您可以<a href=https://v1.ikpay.cn/spguae69a4e1d4bb8f22 target=_blank>【购买邀请码】</a>(费用不支持退款)再注册！"
end if
%>

<script language="javascript">
window.onload = function(){layer.alert('该页面是商家(卖家)注册通道！！<br>如果你不是商家(卖家)禁止在该页面注册！！<%=yaoqingstr%><br><br>如果您是买家，买家注册【<a href="regbuy">请点击这里</a>】！！',{title: '重要提示',});}
</script>


<div class="mian">
<div class="regbox conter">
<div class="nyclassbt01 conter">注册成为商家&nbsp;&nbsp;<span style="font-size:16px;"><a href="regbuy">(或:买家注册)</a></span></div>
<form action="" method="post" id="form1" onSubmit="return chkreg()">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  
  <tr>
    <td height="50" class="regtext">手机号码：</td>
    <td><input name="Mobile" type="text" class="reginput" id="Mobile" onBlur="return checkMobile(this.value);" maxlength="11"></td>
    <td><div id="Mobiled" class="regts" ><span id="Mobiles"> 请填写常用手机号</span></div></td>
  </tr>
  <tr>
    <td width="280" height="50" class="regtext">电子邮箱：</td>
    <td width="303"><input name="email" type="text" class="reginput" id="email" onBlur="return checkemail(this.value);" maxlength="30"></td>
    <td width="452"><div id="emaild" class="regts" ><span id="emails"> 请填写常用电子邮箱</span></div></td>
  </tr>
  <tr>
    <td height="50" class="regtext">设置密码：</td>
    <td><input name="pass1" id="pass1" type="password" class="reginput" onBlur="return passone(this.value);" maxlength="15"></td>
    <td><div id="pass1d" class="regts" ><span id="pass1s"> 请设置密码(6~15个字符)</span></div></td>
  </tr>
  <tr>
    <td height="50" class="regtext">确认密码：</td>
    <td><input name="pass2" id="pass2" type="password" class="reginput" onBlur="return passtwo(this.value);" maxlength="15"></td>
    <td><div id="pass2d" class="regts" ><span id="pass2s"> 请设置密码(6~15个字符)</span></div></td>
  </tr>
   
  <tr>
    <td height="50" class="regtext">真实姓名：</td>
    <td><input name="realname" type="text" class="reginput" id="realname" onBlur="return checkname(this.value);" maxlength="50"></td>
    <td><div id="realnamed" class="regts" ><span id="realnames"> <span style="color:#F00"><strong>正确填写真实姓名，注册后不能修改！</strong></span></span></div></td>
  </tr>
  
  <tr>
    <td height="50" class="regtext">身份证号：</td>
    <td><input name="idcard" type="text" class="reginput" id="idcard" onBlur="return checkidcard(this.value);" maxlength="18"></td>
    <td><div id="idcardd" class="regts" ><span id="idcards"> <span style="color:#F00"><strong>账户拥有人唯一依据！！注册后不能修改！</strong></span></span></div></td>
  </tr>
  
<%
if cint(iskqyaoqing)=1 then%>
  <tr>
    <td height="50" class="regtext">邀请码：</td>
    <td><input name="yaoqingma" type="text" class="reginput" id="yaoqingma" value="<%if trim(SafeRequest("yq"))<>"" then response.Write trim(SafeRequest("yq"))%>" maxlength="10"></td>
    <td><div class="regts">为提升平台质量,请输入邀请码<a style="color:#F00" href="https://v1.ikpay.cn/spguae69a4e1d4bb8f22" target="_blank">【10元购买】</a></div></td>
  </tr>
<%
end if
%>
  <tr>
    <td height="50" class="regtext">验证码：</td>
    <td><input name="chkcode" type="text" class="reginput" id="chkcode" maxlength="4"></td>
    <td><img src="/inc/code/" alt="点击刷新验证码" style="cursor:pointer" border=0 onClick="refreshImage(this);"/></td>
  </tr>
  <tr>
    <td height="69" class="regtext">&nbsp;</td>
    <td align="left"><input style="cursor:pointer" name="tijiao" type="submit" class="logindlreg" id="tijiao" value="注册成为商家"></td>
    <td><input name="act" type="hidden" id="act" value="regin"><input name="err" type="hidden" id="err"><input name="iskqyaoqing" type="hidden" id="iskqyaoqing" value="<%=iskqyaoqing%>"></td>
  </tr>
  <tr>
    <td height="38" class="regtext">&nbsp;</td>
    <td colspan="2" align="left" style="line-height:25px;" >
    点击"注册成为商家"，即表示您已同意并愿意遵守<a href="/index/xieyi" target="_blank" style="color:#F93">《<%=jname%>寄售平台服务协议》</a>
    <a href="/index/jinshou" target="_blank" style="color:#F93">《<%=jname%>寄售平台禁售目录》</a> 
    <br>
    <a href="regbuy">[其他相关：买家注册]</a></td>
    </tr>
</table>
<div class="protect">
<p style="font-size: 14px"><strong>特别申明：</strong>赌博、淫秽色情、裸聊、诱导交友、欺诈钓鱼、未取得文网棋牌游戏等类别禁止注册，一经发现直接删除账户。</p>
<!--
<p style="font-size: 14px"><strong>重要提示：有投诉记录的商家我司要求：需强制开通平台VIP会员，否则不得上架销售！</strong></p>
-->
<p style="font-size: 14px;"><strong>重要提示：</strong>为提升平台质量，有以下情况的商户，平台有权在不提前告知情况下直接删除账户！ </p>
<p style="font-size: 14px;padding-left:70px;">1.注册信息严重有误、注册后30天内无交易或没有实质商品的。</p>
<p style="font-size: 14px;padding-left:70px;">2.商品涉及云盘，涉黄，卡密涉及虚假，无效，重复，卡密为联系QQ的。</p>
<p style="font-size: 14px;padding-left:70px;">3.对投诉问题24小时内不回复，不处理/消极/野蛮/敷衍处理投诉的。</p>
</div>

</form>
<br>

</div>
</div>



<!--#include virtual="/show/indexfoot.asp"-->