<!--#include file="inc/conn.asp"-->
<!--#include file="inc/safe.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/md5.asp"-->
<%

dim logins,lastlogintime,artnum,lycount,photo,renqi
set rs=server.CreateObject("adodb.recordset")
sql="select logins,lastlogin,aq,artnum,photo,renqi,endtime,grade,innum,outnum from user_info where userid="& UserId &""
rs.open sql,conn,1,3
if not rs.bof then
  logins=rs("logins")
  lastlogintime=rs("lastlogin")
  artnum=rs("artnum")
  photo=rs("photo")
  renqi=rs("renqi")
  innum=rs("innum")
  outnum=rs("outnum")
  aqb=rs("aq")
  if isnull(rs("endtime")) or rs("endtime")<now() then
    rs("grade")=1
	rs.update
	Response.Cookies(Forum_sdjy)("userclass")="注册会员"
	memberclass=checkStr(request.cookies(Forum_sdjy)("Userclass"))
  end if
end if
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset") '新留言数
sql1="select count(*) from sd_ly where userid="& UserId &" and isread=0"
rs.open sql1,conn,1
lycount=rs(0)
rs.close
set rs=nothing

if request("sdate")="" then
response.Redirect("regupdate.asp")
response.End()
end if
regdate=request.Form("sdate")

if int(regdate)>int(aqb) then
response.Redirect("pay.asp")
response.End()
end if

'on error resume next
regclass=request("vipclass")

set rs=server.CreateObject("adodb.recordset")
sql="select * from apply_info where userid="& userid &" and applytype="& regclass &""
'response.Write(sql)
'response.End()

rs.open sql,conn,1
if not rs.eof then
  errmsg=errmsg+"<br><li>你已经提交过会员升级申请！"
end if
rs.close
set rs=nothing



set rst=server.CreateObject("adodb.recordset")   
sql1="select * from apply_info"
rst.open sql1,conn,1,3
rst.addnew
rst("userid")=userid
rst("applytype")=regclass

set dat=conn.execute("select * from vipjg where jg="&regdate)
if not dat.eof then
rst("applymonth")=dat("ts")
end if

rst("applytime")=now()
rst.update
rst.close
set rst=nothing

conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>升级申请提交成功</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='1;url=index.asp'>
</head>

<table border="0" cellspacing="0" width="100%" cellpadding="0" height="418" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" height="418" valign="middle" align="center" class="STYLE4">
<b>您的申请升级信息已经提交发送！<a href="index.asp"><font color="#996633">返回首页</font></a></b></td>
</tr>
</table>
</body>
</html>