<!-- #include file="setup.asp" -->

<%
top
if Request.Cookies("username")=empty then error("<li>您还未<a href=login.asp>登录</a>社区")


%>
<%

sql="select * from [user] where username='"&Request.Cookies("username")&"'"
rs.Open sql,Conn,1,3


pagesetup=10 '设定每页的显示数量
rs.pagesize=pagesetup
TotalPage=rs.pagecount  '总页数
PageCount = cint(Request.QueryString("ToPage"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1




exre=1000 '申请VIP需要经验
postre=50 '申请VIP需要贴数
moneyre=5000 '申请VIP需要金钱


totalpost= rs("postrevert")+rs("posttopic")
lacking=totalpost-postre
if totalpost=>postre then
lack="<font color=red>你已经答到此要求了!</font>"
else
lack="你还需要<font color=red>"&-lacking&"</font>帖!"
end if

lacking2=rs("experience")-exre

if rs("experience")=>exre then

lack2="<font color=red>你已经答到此要求了!</font>"
else
lack2="你还需要<font color=red>"&-lacking2&"</font>经验!"
end if

lacking3=rs("money")-moneyre

if rs("money")=>moneyre then

lack3="<font color=red>你已经答到此要求了!</font>"
else
lack3="你还需要<font color=red>"&-lacking3&"</font>金钱!"
end if

select case Request("menu")


case "vip"
if rs("membercode")>1 then
message=message&"<li>喂~!VIP会员比你现在的等级还低哦~!"
error(message)
end if
if rs("money")<moneyre or totalpost<postre or rs("experience")<exre then
message=message&"<li>你还未答到要求!"
error(message)
end if
rs("money")=rs("money")+20000
rs("experience")=rs("experience")+1000
rs("membercode")=2
rs.update
rs.close
error2("你已经申请成功了!!!恭喜你成为VIP会员!!")
end select
%>
      

<table border=0 width=<%=dkuan%> align=center cellspacing=1 cellpadding=4 class=a2>
<tr class=a3>
<td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%></a> → VIP会员申请</td>
</tr>
</table><br>

<SCRIPT>valigntop()</SCRIPT>
<br>

<div align=center><fieldset style="border:1px solid #a4b6d7;WIDTH: 440" >
       <legend>你的状态</legend> 
      <table border="0" cellspacing="0" cellpadding="0" height="105" align="center" width="408">
        <tr> 
          <td width="91">社区昵称：</td>
          <td width="136"><%=rs("username")%></td>
          <td width="91">注册日期：</td>
          <td width="136"> <%=rs("regtime")%></td>
        </tr>
<tr> 
          <td width="91">发表贴数：</td>
          <td width="136"> <%=rs("posttopic")+rs("postrevert")%></td>
          <td width="84">精华贴数：</td>
          <td width="97"><%=rs("goodtopic")%></td>
        </tr>
        <tr> 
 <td width="84">社区金币：</td>
          <td width="97"><%=rs("money")%></td>
          <td width="84">体 力 值：</td>
          <td width="97"><%=rs("userlife")%></td>
          
        </tr>
<tr> 
          <td width="91">经 验 值：</td>
          <td width="136"> <%=rs("experience")%></td>
          <td width="84"> 魅 力 值：</td>
          <td width="97"><%=rs("magicpower")%></td>
        </tr>
                <tr> 
          <td width="91">登陆次数：</td>
          <td width="136"> <%=rs("degree")%></td>
<td width="84">当前门派：</td>
          <td width="97"> 
            <%
if ""&rs("faction")&""="" then
response.write "无"
else
response.write rs("faction")
end if
%>
          </td>
          
        </tr>
       
<tr> 
          <td width="95">社区威望：</td>
          <td width="142"><%=rs("power")%></td>
          
          </td>
 <td width="95">社区头衔：</td>
          <td width="142"> 
            <%
if ""&rs("honor")&""="" then
response.write "无"
else
response.write rs("honor")
end if
%>
          </td>
</tr>
        <tr> 
          <td width="91">社区住宅：</td>
          <td width="136"> 
            <%
if ""&rs("building")&""="" then
response.write "无"
else
response.write rs("building")
end if
%>
          </td>
          <td width="91">社区伴侣：</td>
          <td width="136"> 
         <%
if ""&rs("consort")&""="" then
response.write "无"
else
response.write rs("consort")
end if
%>
          </td>
        </tr>
      </table>
      <br>
     &nbsp;&nbsp; 欢迎申请VIP会员!申请者必须答到以下要求!
</font></fieldset></div>
<br>

<TABLE cellSpacing=1 cellPadding=1 width=60% align=center border=0 class=a3>

<div align=center><img src=images/vip/vipneed.gif align=middle></div>
<br>

<TR align=middle class=a1>
<TD height=23>需要贴数</TD>
<TD height=23>还差贴数</TD>
<TD height=23>需要经验</TD>
<TD height=23>还差经验</TD>
<TD height=23>需要金钱</TD>
<TD height=23>还差金钱</TD>



<TR align=left class=a3><TD height=20 align=center>
<%=postre%></td>
<TD height=20 align=center><%=lack%></TD>
<TD height=20 align=center><%=exre%></TD>
<TD height=20 align=center><%=lack2%></TD>
<TD height=20 align=center><%=moneyre%></TD>
<TD height=20 align=center><%=lack3%></TD>




</table>


<TABLE cellSpacing=1 cellPadding=1 width=40% align=center border=0 class=a3>
<br>
<div align=center><img src=images/vip/vip.gif align=middle></div>
<br>

<TR align=middle class=a1>
<TD height=23>经验</TD>
<TD height=23>金钱</TD>
<TD height=23>等级</TD>




<TR align=left class=a3>
<TD height=20 align=center><font color=red>+1000</font></TD>
<TD height=20 align=center><font color=red>+20000</font></TD>
<TD height=20 align=center><font color=red>VIP会员<img src=images/vip/vipmedal.gif></font></TD>



<form method=POST action=?menu=vip>
<div align=center><input type=image src="images/vip/began.gif" border="0" name="Submit"></div></td></TD></TR></form>
</table>




<%
RS.MoveNext
loop
RS.Close

%><center>
<SCRIPT>valignbottom()</SCRIPT>
<%
htmlend
%>
