<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<!--#include file="../Inc/chinahanzi.asp"-->
<%call head()
call saycarda("VIP自助购买/延期")%>
<!--#INCLUDE file="newguest.asp"-->
<%
dim vip

vipdate=rs("vipdate")
vip=request("vip")
vipjb=vip*888
TP=clng(request("TP"))
if TP=1 then
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from Users where id="&myid,conn,1,2
If rs.eof Then
  Call Error("会员不存在！")
  end if

if myjb<vipjb or vip<=0 then
 Response.Write "您的金币不足已购买"&vip&"天的VIP服务！或所填天数不正确！"
else
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;saytk="&saytk&"&sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"成功购买了(url=/bbs/vipgm.asp?saytk="&saytk&"&sid=[sid])天付VIP(/url)')")
 conn.execute("update Users Set myjb = myjb - 888,vipdj=1,vipdate=now()+"&vip&" where ID="&myid)
rs.update
rs.close
set rs=Nothing
 Response.Write "恭喜您已成功购买/延期了"&vip&"天的VIP服务,花费"&vipjb&"个"&getcent&"<br/>"
end if
else

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from Users where id="&myid,conn,1,1

vipdj=rs("vipdj")
rs.close
set rs=Nothing
if vipdj>0 or vipface>0 then
 Response.Write "您是VIP会员,无需购买,会员期限是"&vipdate&""
else
Response.Write "您还不是VIP会员,赶快购买体验尊贵VIP服务吧<br/>注:购买时间是已当前时间来计算,所以短时间内不要重复购买!"
if saytk=>2 then
	Response.write "<form name=""form"" method=""post"" action=""vipgm.asp?saytk="&saytk&"&amp;sid="&sid&""">"
end if

 Response.Write "<br/>购买/续期.天数(1天需888"&getcent&")<br/>"
 Response.Write "<input name=""vip"" maxlength=""18"" value=""7""/><br/>"
if saytk=>2 then
response.write "<input type=""hidden"" name=""TP"" value=""1""/>"

%>

<input type="submit" name="Submit" value="确认购买VIP"></form><br/><%
else

Response.Write "<anchor>确定购买VIP"
 Response.Write "<go href=""vipgm.asp?saytk="&saytk&"&amp;sid="&sid&""" method=""post"" accept-charset='utf-8'>"
 Response.Write "<postfield name=""vip"" value=""$(vip)""/>"
 Response.Write "<postfield name=""TP"" value=""1""/>"
 Response.Write "</go></anchor>"&chr(13)
end if
end if

end If
response.write"<br/>===VIP会员特权===<br/>"&chr(13)
response.write"回复删除|强行开锁<br/>昵称修改|属性恢复<br/>广播前置|"&getcent&"续期<br/>帖子道具|花园开垦<br/>优先体验喂养宠物<br/>优先体验社区新上线功能"

conn.close
set conn=nothing
%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>