<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="UserConn.asp" --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=Config(8)%>_用户会员注册</title>
<link href="/images/ui.css" rel="stylesheet" type="text/css" /><%=Css%>
<script type="text/javascript">var InstallDir="<%=Config(0)%>";</script>
<script type="text/javascript" src="<%=Config(0)%>js/QvodCms.Ajax.js"></script>
<script type="text/javascript" src="<%=Config(0)%>js/QvodCms.Funciton.js"></script>
<!--默认将ie将大化开始-->
<script language="JavaScript1.2"> 
<!-- 
window.moveTo(0,0); 
if(document.all){ 
top.window.resizeTo(screen.availWidth,screen.availHeight); 
} 
else if(document.layers||document.getElementById){ 
if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){ 
top.window.outerHeight = screen.availHeight; 
top.window.outerWidth = screen.availWidth; 
} 
} 
//--> 
</script> 
<!--默认将ie将大化结束-->
</head>
<body>
<%
Dim result, token, qqid, nickname,display
Dim qc, qurl,oauth_token,oauth_vericode,timestamp,openid
UserID=QvodCms_Clng(NoSqlHack(Request.QueryString("UserID")))
reurl=Request.QueryString("reurl")'来源地址
oauth_token=Request.QueryString("oauth_token")
oauth_vericode=Request.QueryString("oauth_vericode")
timestamp=Request.QueryString("timestamp")
openid=Request.QueryString("openid")
if len(oauth_token)>10 and  oauth_vericode<>"" and len(timestamp)>5 and len(openid)=32 then
    SET qc = New QqConnet
    result = qc.CheckLogin()
    If IsArray(result) Then
	   result = qc.GetAccessToken(result)
	   qqid = result(0)
	   result = qc.GetUserInfo(result)
	   nickname = qc.UTF2GB(qc.GetUserName(result))
	   nickpic = "http://qzapp.qlogo.cn/qzapp/" & Config(31) & "/" & qqid & "/100"
	   Set rs = Server.CreateObject("adodb.recordset")
       sql = "select * from qvodcms_user where uqqid='" & md5(qqid,32) & "'"
       rs.Open sql, Conn, 1, 3
       If rs.bof And rs.EOF Then
	     display="none"
       Else
        Response.Cookies("qvodcms")("UserName") =nickname
		Response.Cookies("qvodcms")("Uid") =QvodCms_CLng(rs("Uid"))
        Response.Cookies("qvodcms")("Ujf") =QvodCms_CLng(rs("ujf"))
        Response.Cookies("qvodcms")("Ulc") =nickname
        Response.Cookies("qvodcms")("Uvip") =rs("uvip")
		Response.Cookies("qvodcms")("UPic") =Trim(rs("upic"))
        Response.Cookies("qvodcms")("Utime") =Formatdatetime(rs("utime"),2)
		If addbox=0 then
		Response.Cookies("qvodcms").Expires=dateadd("n",30,now())
		Else
		Response.Cookies("qvodcms").Expires=Date+30
		End if
		rs("uname")=nickname
		rs("ulc")=nickname
		rs("upic")=nickpic
		rs.update
		rs.Close:Set rs=Nothing
		if reurl<>"" then
		Response.Write "<script>window.parent.location.href='"&Reurl&"';</script>"
		Else
		Reurl="UserMian.Asp"
		Response.Write "<script>window.parent.location.href='"&Reurl&"';</script>"
		End if
		Response.End()
	   End if
   
   End If
End IF
%>
<center><%=OpenContent(SiteHeader)%></center>
<table  border="0" align="center" cellpadding="0" cellspacing="0" class="userbox">
<form name="form1" method="post" action="UserRegAdd.Asp?submit=b98b864de069e757713db50c338f95df_________64de069e7577sadf_________64deo44tyy8498f95df&reurl=<%=reurl%>&openid=<%=md5(openid,32)%>&qqid=<%=qqid%>" onSubmit="return QvodCmsReg<%=display%>()">
  <tr>
    <td height="30" colspan="4" class="usertitle"><%=Config(8)%>-会员注册</strong></td>
  </tr>
  <tr>
    <td height="5" colspan="3"></td>
    </tr>
  <tr style="display:<%=display%>">
    <td width="75" height="28">&nbsp;&nbsp;登录名称：</td>
    <td width="174"><Div id="regadd"></Div><label>
      <input name="username" type="text" class="input" id="username" onblur='if(this.value){var ajax = new AJAXRequest();ajax.get("UserAjax.Asp?action=reg&value="+this.value,"regadd");}' value="<%=nickname%>" maxlength="18"/>
	  <input name="uqqid" value="<%=qqid%>" type="hidden" />
	  <input name="nickpic" value="<%=nickpic%>" type="hidden" />
    </label></td>
    <td width="420"><span class="STYLE2" >*</span><span id="divuser">（6-18位英文(Aa-Zz)加数字(0-9)组合）如：QvodCms</span></td>
  </tr>
  <tr>
    <td height="28">&nbsp;&nbsp;登录密码：</td>
    <td><label>
      <input name="password" Class="input" type="password" id="pwd" maxlength="18" />
    </label></td>
    <td colspan="2" ><span class="STYLE2" >*</span>  （密码至少6位，可英文、数字 6-18位）</td>
  </tr>
  <tr >
    <td height="28">&nbsp;&nbsp;确认密码：</td>
    <td><label>
      <input name="password2" Class="input" type="password" id="pwd2" maxlength="18" />
    </label></td>
    <td colspan="2" ><span class="STYLE2" >*</span></td>
  </tr>
  <tr style="display:<%=display%>">
    <td height="28">&nbsp;&nbsp;真实姓名：</td>
    <td><label>
      <input name="lname" value="<%=nickname%>" Class="input" type="text" id="lname" maxlength="6" />
    </label></td>
    <td colspan="2" ><span class="STYLE2" >*</span>  （请输入真实姓名,奖品兑换时发货联系人）</td>
  </tr>
  <tr>
    <td height="28">&nbsp;&nbsp;联系QQ号：</td>
    <td><label>
      <input name="qq" Class="input" type="text" id="qq" maxlength="12" onkeyup='this.value=this.value.replace(/\D/gi,"")'/>
    </label></td>
    <td colspan="2" ><span class="STYLE2" >*</span>  （兑换奖品时联系，请认真填写）</td>
  </tr>
  <tr>
    <td height="28">&nbsp;&nbsp;密码保护：</td>
    <td><label>
      <input name="ask" Class="input" type="text" id="ask" maxlength="10" />
    </label></td>
    <td colspan="2" ><span class="STYLE2" >*</span>  （请输入密码保护问题，如：我的老婆叫？）找回密码时使用</td>
  </tr>
  <tr>
    <td height="28">&nbsp;&nbsp;保护答案：</td>
    <td><label>
      <input name="askok" Class="input" type="text" id="askok" maxlength="10" />
    </label></td>
    <td colspan="2" ><span class="STYLE2" >*</span>  （请输入保护问题答案，如：张子怡）<span class="STYLE2">请牢记保护问题和答案!</span></td>
  </tr>
  <tr style="display:<%=display%>">
    <td height="28">&nbsp;&nbsp;网站调查：</td>
    <td colspan="3"><label>
    <select name="webcha" id="webcha">
      <option value="0">-你是如何知道本站？-</option>
      <option value="百度搜索">百度搜索</option>
      <option value="谷歌搜索">谷歌搜索</option>
      <option value="雅虎搜索">雅虎搜索</option>
      <option value="其它搜索">其它搜索</option>
      <option value="网站广告">网站广告</option>
      <option value="好友介绍">好友介绍</option>
    </select>
    </label> 选择头像：<select name="userpic" onchange="document.images['idface'].src=options[selectedIndex].value;">
<option value="../Images/faces/nobody.gif" style="color:#FF0000">---热门导演头像---</option>
<option value="../Images/faces/1.gif">史蒂芬·斯皮尔伯格</option>
<option value="../Images/faces/2.gif">乔治·卢卡斯</option>
<option value="../Images/faces/3.gif">雷德利·斯科特</option>
<option value="../Images/faces/4.gif">彼得·杰克逊</option>
<option value="../Images/faces/5.gif">克林特·伊斯特伍德</option>
<option value="../Images/faces/6.gif">马丁·西科塞斯</option>
<option value="../Images/faces/7.gif">奥利弗·斯通</option>
<option value="../Images/faces/8.gif">詹姆斯·卡梅隆</option>
<option value="../Images/faces/9.gif">吕克·贝松</option>
<option value="../Images/faces/10.gif">弗朗西斯·福特·科波拉</option>
<option value="../Images/faces/nobody.gif" style="color:#FF0000">---热门动漫头像---</option>
<option value="../Images/faces/11.gif">火影忍者 </option>
<option value="../Images/faces/12.gif">灰太狼</option>
<option value="../Images/faces/13.gif">红太狼</option>
<option value="../Images/faces/14.gif">喜羊羊</option>
<option value="../Images/faces/15.gif">卡哇伊女生</option>
<option value="../Images/faces/16.gif">可爱娃娃</option>
<option value="../Images/faces/17.gif">奥特曼</option>
<option value="../Images/faces/18.gif">功夫熊猫</option>
<option value="../Images/faces/19.gif">米奇老鼠</option>
<option value="../Images/faces/20.gif">怪物史莱克</option>
<option value="../Images/faces/nobody.gif" style="color:#FF0000">---热门明星头像---</option>
<option value="../Images/faces/21.gif">周星驰</option>
<option value="../Images/faces/22.gif">小沈阳</option>
<option value="../Images/faces/23.gif">韩彩英</option>
<option value="../Images/faces/24.gif">宫心计</option>
<option value="../Images/faces/25.gif">蔡少芬</option>
<option value="../Images/faces/26.gif">苏乞儿</option>
<option value="../Images/faces/27.gif">孔  子</option>
<option value="../Images/faces/28.gif">范  伟</option>
<option value="../Images/faces/29.gif">甄子丹</option>
<option value="../Images/faces/30.gif">古天乐</option>
<option value="../Images/faces/31.gif">林  峰</option>
<option value="../Images/faces/32.gif">孙燕姿</option>
<option value="../Images/faces/33.gif">林志铃</option>
<option value="../Images/faces/34.gif">刘德华</option>
<option value="../Images/faces/35.gif">成  龙</option>
<option value="../Images/faces/36.gif">林正英</option>
<option value="../Images/faces/37.gif">李连杰</option>
<option value="../Images/faces/38.gif">赵本山</option>
<option value="../Images/faces/39.gif">张学友</option>
<option value="../Images/faces/40.gif">苍井空</option>
<option value="../Images/faces/41.gif">范冰冰</option>
<option value="../Images/faces/42.gif">洪金宝</option>
<option value="../Images/faces/43.gif">梁朝伟</option>
<option value="../Images/faces/44.gif">吴彦祖</option>
<option value="../Images/faces/45.gif">张曼玉</option>
<option value="../Images/faces/46.gif">黄日华</option>
<option value="../Images/faces/47.gif">张卫健</option>
<option value="../Images/faces/48.gif">张家辉</option>
<option value="../Images/faces/49.gif">吴耀汉</option>
<option value="../Images/faces/50.gif">王  晶</option>
</select>
    <img src="../Images/faces/nobody.gif" class="idface" id=idface></td>
    </tr>
  <tr>
    <td height="40" colspan="4" style="padding-left:13px;"><label>
      <input name="UserID" value="<%=Clng(UserID)%>" id="UserID" type="hidden">
      <input type="submit" class="usersub" name="button" id="button" value="确认注册">
      <input type="reset" class="usersub" name="button2" id="button2" value="重置">
    </label></td>
    </tr>
  </form>
</table>
<center><%=OpenContent(SiteFooter)%></center>
<%Call CloseConn()%>
</body>
</html>