<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="../Include/md5.jsp" -->
<!--#include file="IsLogin.jsp" -->
<%
 dim rs,m_Sql
 dim m_ID 
 mUserID = Request.Cookies("aspxnet")("CurUserID")
  m_username= Request.Cookies("aspxnet")("CurUsername")
 m_ID = Request.Cookies("aspxnet")("CurUserID")
 m_grade=request.cookies("aspxnet")("curgrade")
 m_Sql = "SELECT * FROM T_Member WHERE F_ID=" & m_ID
 Set rs = conn.Execute(m_Sql)
 if rs.Eof then
   Response.write "对不起，无此会员！"
   Response.end
 end if
 Session("m_Integral") = rs("F_Integral")
 m_MyImage = rs("F_MyImage")
 session("m_MyImage") = m_MyImage
  '短信
					sql_m="select count(f_id) as n_count from t_message where F_username_a='"&m_username&"' and F_accept=0"
					Set rs_m = conn.Execute(sql_m)
					m_count=rs_m("n_count")
					sql_m="select count(f_id) as n_count from t_message where F_username_a='"&m_username&"' and F_accept=0 and  F_active=0 "
					Set rs_m = conn.Execute(sql_m)
					m_newcount=rs_m("n_count")
					rs_m.close
					
 sql_m = "SELECT Points FROM LeadBBS_User Where UserName='" & m_username & "'"
			Set Rstest = conn.Execute(sql_m)
			
			
If Request.ServerVariables("REQUEST_METHOD")="POST" then
  'Read Reuest
  m_CardNumber = checkStr(Trim(Request.Form("txtCardNumber")))
  m_IDCard = checkStr(rTrim(Request.Form("txtIDCard")))
  m_Sql = "SELECT * FROM T_CardMember WHERE  F_IsRegister = 0 and F_IDCard ='"&m_IDCard&"' and F_CardNumber='"&m_CardNumber&"'"
  Set rs = conn.Execute(m_SQL)
  if rs.Eof then
     rs.Close
	 Call CloseDatabase()
	 call Msgbox("对不起，您无法注册升级为聚宝卡VIP会员,错误原因:\n聚宝卡号码或身份证号码输入有误,\n该聚宝卡号码已经注册为聚宝卡会员，请核对您的号码\n如果您还没有聚宝卡，可以先注册普通会员!",1)
  else
	 '错误
	  on error resume next
	  ''read
	  m_BuyCardTime = rs("F_BuyCardTime")
	  m_AvailabilityTime = rs("F_AvailabilityTime")
	  m_IsSecrecy = rs("F_IsSecrecy")
	  if isnull(m_IsSecrecy) then m_IsSecrecy = 0
	  m_CardNumber = rs("F_CardNumber")
	  m_IsFree = rs("F_IsFree")
	  if isnull(m_IsFree) then m_IsFree = 0
  	  rs.Close
      'F_IsRegister = 1
	  m_SQL = "UPDATE T_CardMember SET F_IsRegister=1 WHERE F_IDCard ='"&m_IDCard&"' and F_CardNumber='"&m_CardNumber&"'"
      conn.Execute(m_SQL)
	  'Modify T_Member
	  m_SQL = "UPDATE T_Member SET F_Grade=1,F_BuyCardTime='"&m_BuyCardTime&"',F_AvailabilityTime='"&m_AvailabilityTime&"',F_IsSecrecy="&m_IsSecrecy&",F_IsFree="&m_IsFree&",F_CardNumber='"&m_CardNumber&"',F_IDCard='"&m_IDCard&"' where F_UserName='"&m_UserName&"'"
	   conn.Execute(m_SQL)
	   '修改俱乐部会员资料
           m_sql="UPDATE T_club_member SET f_grade=1 where WHERE f_username='" &m_username&"'"
          conn.execute(m_sql)
	    '真情告白
         m_sql="UPDATE T_say SET f_grade=1 where WHERE f_username='" &m_username&"'"
         conn.execute(m_sql)
		  
	  Response.Cookies("aspxnet")("Curgrade") =1
	
    m_logcontent="恭喜您！您已经升级为聚宝卡VIP会员."
   if syslog_function(m_username,m_logcontent) <> "OK" then
   response.write "系统有错误！"	
   end if
   
  end if
  Response.Write "<script language=""javascript"">alert('恭喜您，您已经成功升级成为聚宝卡VIP会员！');window.location.href='UserGrade.jsp';</script>"
end if
				
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>升级成为VIP会员</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=Page-Enter content=blendTrans(Duration=0.5)>
<META http-equiv=Page-Exit content=blendTrans(Duration=0.5)><LINK 
href="css/index.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1555" name=GENERATOR></HEAD>
<BODY><!--menu start-->
<DIV id=menu><SPAN>登陆帐号：<%m_TempUserName = Request.Cookies("aspxnet")("CurUserName")
				  if m_TempUserName = "" then Response.write "游客" else
				   Response.write ""&m_TempUserName&""
				  %> | <A 
href="Logout.jsp">退出</A></SPAN> <B>操作中心</B> 
<DIV id=nav>
<DIV class=right><IMG src="img/nav_right.gif"></DIV>
<DIV class=left><IMG src="img/nav_left.gif"></DIV>
<UL>
 <LI><A href="Center_index.jsp">首 页</A> </LI>
  <LI><A href="friend_index.jsp">交友频道</A> </LI>
  <LI><A href="QQ_ployall.jsp">精彩活动</A> </LI>
  <LI><A href="../bbs/">论坛社区</A> </LI>
  <LI><A href="photo_default.jsp">网络相册</A> </LI>
  <LI><A href="QQ_index.jsp">小圈子</A> </LI>
  <LI><A href="../info/">分类广告</A> </LI>
  <LI><A href="../jubao/">折扣店</A> </LI>
  <LI><A href="../shop/">逛街购物</A> </LI></UL></DIV></DIV><!--menu end-->
<DIV id=mainone>
<DIV id=user>
<H3>欢迎您：<%m_TempUserName = Request.Cookies("aspxnet")("CurUserName")
				  if m_TempUserName = "" then Response.write "游客" else
				   Response.write ""&m_TempUserName&""
				  %></H3>
<DIV class=rim>
<DIV id=uinfo>
<DIV id=uimg align=center><%if session("m_MyImage")<>"" then %>
		  <img  src="<%=session("m_MyImage")%>" > <%else%><img  src="img/nophoto_man.gif"><%end if%></DIV>
<P>ID: <%m_TempUserName = Request.Cookies("aspxnet")("CurUserName")
				  if m_TempUserName = "" then Response.write "游客" else
				   Response.write ""&m_TempUserName&""
				  %></P>
<P><%
   sql_m = "SELECT OnlineTime FROM LeadBBS_User Where UserName='" & m_username & "'"
			Set Rstest = conn.Execute(sql_m)
%>
<script language=javascript>
			<!--
				document.write (""+qqlevel("<%=CLng(cCur(Rstest("OnlineTime"))/3600)%>")+"");
			//-->
			</script></P>
<HR>

<DIV id=usercon><A href="../bbs/" target=_blank><IMG height=20 
src="img/Center_left01.gif" width=27 border=0></A><A 
href="QQ_default.jsp" target=_blank><IMG height=21 
src="img/Center_left02.gif" width=21 border=0></A><A 
href="../blog/" target=_blank><IMG height=16 
src="img/Center_left03.gif" width=24 border=0></A><A 
href="#"><IMG 
src="img/ico4.gif"></A><A 
href="#" 
target=_blank><IMG src="img/ico5.gif" border=0></A> </DIV></DIV><%
   sql_m = "SELECT Points FROM LeadBBS_User Where UserName='" & m_username & "'"
			Set Rstest = conn.Execute(sql_m)
%>
<P class=uline><STRONG>用户金币：<%=rstest("Points")%></STRONG><BUTTON class=bot 
onclick="location.href='#a'">帐户冲值</BUTTON><BUTTON class=bot 
onclick="location.href='#a'"><B>VIP</B>冲值</BUTTON> </P>
<UL>
  <LI>·<A href="Center_userinfo.jsp">个人资料</A> </LI>
  <LI>·<A href="Center_msg.jsp">我的短信</A> </LI>
  <LI>·<A href="Center_contact.jsp">联系资料</A> </LI>
  <LI>·<A href="Center_wealth.jsp">金币兑换</A> </LI>
  <LI>·<A href="Center_editpassword.jsp">密码设置</A> </LI>
  <LI>·<A href="Center_ploy.jsp">我的活动</A> </LI></UL>
<DIV class=clear></DIV></DIV>
<H3>从这里开始</H3>
<DIV class=rim>
<DIV id=buildgroup>
<H4><A href="qq_ceaterclub.jsp" 
target=_blank><SPAN>建立小圈子</SPAN></A></H4>
<P>您可以在这里建立自己的小圈子，和更多的朋友一起互动。世界很小，圈子很大。您可以通过您的圈子认识更多志趣相投的朋友！</P></DIV>
<DIV id=invitefriend>
<H4><SPAN>邀请您的好友</SPAN></H4>
<P>您可以在这里建立自己的小圈子，和更多的朋友一起互动。世界很小，圈子很大。您可以通过您的圈子认识更多志趣相投的朋友！</P></DIV></DIV></DIV><!--contain-->
<DIV id=wealth>
<H3>升级成为VIP会员</H3>
<DIV class=rim>
<%
				if m_grade<>"1" then
				%><form name="form1" method="post" action="UserGrade.asp" ><LABEL><B>用 户 名：</B> <INPUT name=txtUserName disabled value="<%=m_UserName%>">
</LABEL>
<LABEL><B>卡　　号：</B> <INPUT name=txtCardNumber> “聚宝卡”号码
</LABEL><LABEL><B>身 份 证：</B> <input  name=txtIDCard> “身份证”号码(15位或18位)
</LABEL><LABEL><B>&nbsp;</B> <INPUT class=bot type=submit value=确认赠送 name=提交> <INPUT class=bot type=reset value=取消赠送 name=重置> </LABEL></FORM> <%
				  else
				  %>谢谢,您已经升级成为城市卡VIP会员！<%
				  end if
				  %>
</DIV></DIV></DIV></BODY></HTML>
