<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<%
p = trim(Request.QueryString("p"))
a = trim(Request.QueryString("a"))
if a="1.jpg" then jia=5000
if a="2.jpg" then jia=8000
if a="3.jpg" then jia=2000
if a="4.jpg" then jia=10000
if a="5.jpg" then jia=18000
if a="6.jpg" then jia=10000
if a="7.jpg" then jia=1000
if a="1.jpg" then oooo=10
if a="2.jpg" then oooo=18
if a="3.jpg" then oooo=5
if a="4.jpg" then oooo=25
if a="5.jpg" then oooo=30
if a="6.jpg" then oooo=25
if a="7.jpg" then oooo=8
if a="1.jpg" then oo="温馨之家"
if a="2.jpg" then oo="小型别墅"
if a="3.jpg" then oo="破旧空间"
if a="4.jpg" then oo="小型部落"
if a="5.jpg" then oo="豪华别墅"
if a="6.jpg" then oo="恐怖鬼屋"
if a="7.jpg" then oo="交友会客"


img="/bbs/jia/"&a&""
Response.write "<card title=""购买""><p>"
if myid=0 then
Response.write "<a href='/bbs/login.asp?url="&Replace(Replace(R_url(),"sid=","sidoo="),"sid=","sidoo=")&"'>请您先登陆...</a>"& chr(13)
  Response.write "<br/><anchor><prev/>返回</anchor>" & chr(13)
  Response.write "</p></card></wml>"
  Response.end
end if
if p="" then
response.write "名称:"&oo&"<br/><img src='/bbs/jia/"&a&"' alt='logo'/><br/>"&chr(13)
 Response.Write "<br/><anchor>确定购买<go href=""index1.asp?p=ok&amp;sid="&sid&"&amp;a="&a&""" method=""post"">"
 Response.Write "<postfield name=""a"" value="""&a&"""/>"
 Response.Write "</go></anchor><br/>"
 Response.write "<a href='index.asp?sid="&sid&"'>考虑一下</a><br/>"

end if

if p="ok" then
if abs(int(myjb)) < jia then
  Call Error("你的"&getcent&"不够！")
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from jia",conn,1,2
rs.addnew
rs("myid")=myid
rs("fenid")=1
rs("r")=oooo
rs("name")=oo
rs("now")=""&date&""
rs("img")=img
rs.update
rs.close
set rs=nothing
conn.Execute("update Users set myjb=myjb-"&jia&" Where id="&myid)
response.write "名称:"&oo&"<br/><img src='/bbs/jia/"&a&"' alt='logo'/><br/>"&chr(13)
Response.write "购买成功<br/>"
 Response.Write "<br/><anchor>在资料显示自己的房屋<go href=""index1.asp?p=ko&amp;sid="&sid&"&amp;a="&a&""" method=""post"">"
 Response.Write "<postfield name=""a"" value="""&a&"""/>"
 Response.Write "</go></anchor><br/>"
end if

if p="ko" then
if a="" then
response.write "显示失败。"
else
response.write "名称:"&oo&"<br/><img src='/bbs/jia/"&a&"' alt='logo'/><br/>在资料显示成功"&chr(13)
sql="update Users set jia='(img)/bbs/jia/"&a&"(/img)',oo='"&oo&"' Where id="&myid&""
conn.execute(sql)
end if
end if
conn.close
set conn=Nothing

%>
<br/>---------------
<!--#include file="../fanhui.asp"-->
</p>
</card>
</wml>