<!--#include virtual="/show/userhead.asp"-->
<script>document.getElementById('o_1').setAttribute("class", "ed"); document.getElementById("t_1").style.display="";document.getElementById('s_1_6').setAttribute("class", "ed4");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />


<%
'call iszizhu()
'call chktel()

Const stringmodarr = "0123456789"
dim randarr2,strlength
strlength = Len(stringmodarr)
Randomize timer
For i = 1 To 16 
randarr2 = randarr2&Mid(stringmodarr,Int(Rnd * strlength + 1),1)  
Next 
randarr =randarr2 & Right(("00" & Second(Now())),2)


act=SafeRequestform("act")
if act="mailrenzheng" then
mailsum=SafeRequestform("mailsum")
if trim(mailsum)="" then call PopErr("请填写验证码")
if request.Cookies("mailrenzhengsum")="" then call PopErr("操作超时，请重新获取验证码")
if trim(mailsum)<>trim(request.Cookies("mailrenzhengsum")) then
call PopErr("验证码输入有误，请重新输入")
end if
sql="select ismailrz,aynameid from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
if rs("ismailrz")=1 then call PopErr2("该邮箱已经认证，如需更换请联系管理员","renzheng")
rs("ismailrz")=1
rs.update
rs.close
response.Cookies("mailrenzhengsum")=""
response.Cookies("rzmtime")=""
call logadd(request.Cookies("aynameid"),"邮箱认证成功",0,0)
call PopErr2("邮箱认证成功","renzheng")
end if

%>



<title><%=webname%>-邮箱认证</title>


<script language=javascript>
  function yanzheng()
  {
  
   var xmlhttp;
   try
   {
	 xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
   }
   catch (e)
   {
     try
     {
       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
     catch (e)
     { 
	    try
	    {
			xmlhttp=new XMLHttpRequest();
	    }
	    catch (e)
	    {
	    }
     }
   }

  	 
document.form1.Submit2.disabled="disabled"; 
	  
   xmlhttp.open("get","/show/?act=mailrenzheng&t=" +  new Date().getTime());
   xmlhttp.onreadystatechange=function()
   {
     if(4==xmlhttp.readyState) 
	 {
	   if(200==xmlhttp.status)
	   {
    		 
	   	    if (xmlhttp.responseText=="ok")
	     	{ 
		 	  alert('验证码已发送，请查收');
		 	  return false;
	     	}
	   	    if (xmlhttp.responseText=="no")
	     	{ 
		 	  alert('出现错误，请联系管理员');
		 	  return false;
	     	}
	   	    if (xmlhttp.responseText=="time")
	     	{ 
		 	  alert('请再一分钟后尝试重新发送验证码');
		 	  return false;
	     	}
	   	    if (xmlhttp.responseText=="chongfu")
	     	{ 
		 	  alert('该帐号邮箱已认证');
		 	  return false;
	     	}
			
	   }
	   else
	   {
		 alert('网络链接失败');
		 return false;
	   }
  
	 }
   }
   
   xmlhttp.send(null);  
   return false;
  
   }  
   
  //-->
  </script>
<script language="javascript">
function checkrz()
{   
if(document.form1.mailsum.value=="")
{alert("请填写验证码");return false}
 }
</script>
<style>
table{font-size:14px; font-weight:normal;line-height:27px;}
.regts{width:440px; height:36px; border:#CCC solid 1px; background:#f1f1f1; color:#666666; line-height:36px; padding-left:10px}
.reginput{width:290px; height:36px; border:#CCC solid 1px; color:#949494; text-indent:10px; line-height:36px}
.gexian20{float:left;width:100%;height:20px;}
.mzsmbox2{width:90%; height:auto; overflow:hidden; background:#fcf8e2; border-left:#edd28a solid 5px; color:#956825; line-height:22px; padding:20px;margin-left:40px; margin-bottom:60px; font-size:13px;padding-top:20px;}
.neitable table{border: 1px solid #E8E8E8;width: 100%;}
.neitable table tr{border-bottom: 1px solid #E8E8E8;}
.neitable table tr td{line-height: 42px;text-align: center;color: #1b1b1b;font-size: 14px;}
.neitable table tr.hd td{line-height: 35px;background-color: #F7F7F7;}
.btnFn1 {cursor:pointer!important;cursor:hand;  height:40px; width:101px; padding:0px 0px 0 0; }
.btnFn2 {cursor:pointer!important;cursor:hand;  height:40px; width:101px; padding:0px 0px 0 0; font-weight:bold; }
</style>
<br>
<DIV id=main2> 

<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>

<H2><SPAN>邮箱认证</SPAN></H2>
<DIV class=main4>
					<%
                    rs.open "select okjyrz from ayquanju",conn,1,1
					okjyrz=rs("okjyrz")
					rs.close
					
                    sql="select aymail,aynameid,ismailrz,ayusername,aytel,aychengjiao from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
                    rs.open sql,conn,1,1
					
					if clng(rs("aychengjiao"))=0 and cint(okjyrz)=1 then call PopErr("亲！先完成交易一笔，再进行认证。")
                    %>
                    <%if rs("ismailrz")=0 then%>
        <form action="" method="post" name="form1" id="form1" onSubmit="return checkrz()">
    				<table>
           		  		<tr>
                            <td width="110" align="right">电子邮箱：</td>
                            <td><%=trim(rs("aymail"))%>
                            <input type="submit" name="Submit2" id="Submit2" value=" 获取验证码 " class="logindlregedit" onClick="return yanzheng();"/>
                            </td>
                        </tr>
           		  		<tr>
                            <td width="110" align="right">验证码：</td>
                          <td><input name="mailsum" type="text" id="mailsum" size="10" maxlength="6" class="reginputdd"/></td>
                        </tr>
           		  		<tr>
                            <td width="110"><input name="act" type="hidden" id="act" value="mailrenzheng"></td>
                            <td> <input style="cursor:pointer"  class="logindlregedit" type="submit" name="Submit" value=" 邮 箱 认 证 " ></td>
                        </tr>
                    </table>
        </form>
                    <%elseif rs("ismailrz")=1 then%>
<table>
           		  		<tr>
                            <td width="65" height="35" align="right">电子邮箱：</td>
                          <td width="1121" height="35"><%=trim(rs("aymail"))%> <span style="color: #FF6600">[已认证]</span></td>
                        </tr>
                        <TR>
                            <TD height="35" colspan="2" align="left">&nbsp;</TD>
                        </TR>
                    </table>
                    <%end if%>
<br>

            
                    

</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>

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


