<!--#include file="setup.asp"-->
<%
'#########################################################################
'插件编号:
'插件名称:社区澡堂
'插件介绍:社区澡堂
'插件作者:DAYMOON
'任何问题请登陆HTTP://PLUS.YUZI.NET 或 HTTP://WWW.TALKBBS.NET
'##########################################################################
top
dim username,lx,sl,Jname,mess
Response.Buffer=True 
username=Request.Cookies("username")
response.write "<table cellpadding=0 cellspacing=0 align=center class=a4 width="&(wid)&"><tr><td valign=middle colspan=2 align=center height=25 class=a1><b>社区澡堂</b></td></tr><tr><td valign=middle class=a4 height=100>"
lx=request.form("lx")
sl=request.form("sl")
if sl=0 or sl<0 then
	mess="你不洗澡到这里来干什么？"
else
	Jname=username
	sql="select * from [user] where username='" & Jname & "' and [money]>0"
	set rs=conn.execute(sql)
		select case lx
		case "rou"
		sql="update [user] set [money]=[money]-"& sl*20 &",[magicpower]=[magicpower]+"& sl*1 &",[experience]=[experience]+"& sl*1 &",[userlife]=100 where username='" & Jname & "'"
			conn.execute sql
			mess="<img src=images/plus/xz1.jpg><br><br><li>哇！好舒服哦！你选择了普通洗澡，洗了"& sl &"次，,经验增加了"& sl*1 &",魅力增加了"& sl*1 &",体力也回复了。"
		case "gt"
		sql="update [user] set [money]=[money]-"& sl*40 &",[magicpower]=[magicpower]+"& sl*2 &",[experience]=[experience]+"& sl*2 &",[userlife]=100  where username='" & Jname & "'"
			conn.execute sql
			mess="<img src=images/plus/xz2.jpg><br><br><li>开心吗？像游泳一样的洗澡！洗了"& sl &"次,经验增加了"& sl*2 &",魅力增加了"& sl*2 &",体力也回复了。"
		case "xnj"
		sql="update [user] set [money]=[money]-"& sl*50 &",[magicpower]=[magicpower]+"& sl*3 &",[experience]=[experience]+"& sl*3 &",[userlife]=100  where username='" & Jname & "'"
			conn.execute sql
			mess="<img src=images/plus/xz3.jpg><br><br><li>桑拿！是否感到热得不行了呢？撑下去！呵呵：）。洗了"& sl &"次,经验增加了"& sl*3 &",魅力增加了"& sl*3 &",体力也回复了。"
		case "xz"
		sql="update [user] set [money]=[money]-"& sl*70 &",[magicpower]=[magicpower]+"& sl*4 &",[experience]=[experience]+"& sl*4 &",[userlife]=100  where username='" & Jname & "'"
			conn.execute sql
			mess="<img src=images/plus/xz4.jpg><br><br><li>搓背！感到很舒服吧？洗了"& sl &"次,经验增加了"& sl*4 &",魅力增加了"& sl*4 &",体力也回复了。"
		case "lhr"
		sql="update [user] set [money]=[money]-"& sl*90 &",[magicpower]=[magicpower]+"& sl*5 &",[experience]=[experience]+"& sl*5 &",[userlife]=100  where username='" & Jname & "'"
			conn.execute sql
			mess="<img src=images/plus/xz5.jpg><br><br><li>按摩一下，浑身的疲劳都没了……洗了"& sl &"次,经验增加了"& sl*5 &",魅力增加了"& sl*5 &",体力也回复了。"
		end select
%>

<%
	rs.close
	set rs=nothing
	end if


sub mysub()
	dim abc,addmoney,sql,addcool,userWealth,rs
	if Request.Cookies("username")=empty then
		userWealth=0
	else
	set rs=server.createobject("adodb.recordset")
		sql="select * from [user] where username='"&Request.Cookies("username")&"'"
	rs.Open sql,Conn,1,3
		userWealth=rs("money")
	end if
	
	Randomize
	abc=Fix(15*Rnd)
	addmoney=0
	addcool=0
	select case abc
	case 1
		addmoney=-20
		response.write "<li>哇！好舒服哦，给了小费<font color=red>"&abs(addmoney)&"</font> 社区币！"
	case 2
		addmoney=-30
		response.write "<li>开心吗？像游泳一样的洗澡！收服务费 <font color=red>"&abs(addmoney)&"</font> 社区币"
	case 3
		addmoney=-35
		response.write "<li>桑拿！是否感到热得不行了呢？撑下去！呵呵：）。好东西当然贵一点咯。^_^，多收你<font color=red>"&abs(addmoney)&"</font> 社区币。谢谢了！"
	case 4
		addmoney=-15
		response.write "<li>搓背！感到很舒服吧？收辛苦费<font color=red>"&abs(addmoney)&"</font> 社区币！"

	case 5
		addmoney=-10
		response.write "<li>按摩一下，浑身的疲劳都没了……你自己给了小费<font color=red>"&abs(addmoney)&"</font> 社区币！"

	case 6
		addmoney=-80
		response.write "<li>洗澡回去碰到喝醉的流氓，一阵殴打，金钱损失<font color=red>"&abs(addmoney)&"</font>元"

	case 7
		addmoney=-26
		response.write "<li>洗澡回去被人看到，交了封口费<font color=red>"&abs(addmoney)&"</font>社区币。 "

	case 8
		addcool=-1
		response.write "<li>唉！！洗澡没有洗，摔到地上魅力减少<font color=red>"&abs(addcool)&"</font>点"

	case 9
		addcool=-1
		response.write "<li>唉！！洗澡没有洗，被小狗咬魅力减少<font color=red>"&abs(addcool)&"</font>点"
	
	case 10
		addcool=1
		response.write "<li>啊！！洗澡时候看到金戒指，魅力增加<font color=red>"&abs(addcool)&"</font>点"

	case 11
		addcool=2
		response.write "<li>洗澡时候看到一条大美人鱼！魅力增加<font color=red>"&abs(addcool)&"</font>点"

	case 12
		addcool=1
		response.write "<li>洗澡时候看到一条小美人鱼！魅力增加<font color=red>"&abs(addcool)&"</font>点"

	case 13
		addmoney=38
		addcool=1
		response.write "<li>洗澡时候看到一条美丽小海豚，得<font color=red>"&abs(addmoney)&"</font>社区币！魅力增加<font color=red>"&abs(addcool)&"</font> "

	case 14
		addmoney=100
		response.write "<li>被人打了老板给你<font color=red>"&abs(addmoney)&"</font>社区币！这事情算了55555. "

	case 15
		addmoney=500
		addcool=5
		response.write "<li>恭喜你！你是第500个进澡堂的人，得<font color=red>"&abs(addmoney)&"</font>社区币！魅力增加<font color=red>"&abs(addcool)&"</font> "

	case else
		response.write "<li>什么事情都没有发生请回论坛或澡堂"
	end select
	if Request.Cookies("username")=empty then
		response.write "<b><font color=red>小子，没钱也想来啊？</b></font>！"
	else
	if addmoney<>0 then
		rs("money")=Fix(rs("money")+addmoney)
		if rs("money")<0 then
		rs("money")=0
		end if
		end if
	if addcool<>0 then
		rs("magicpower")=Fix(rs("magicpower")+addcool)
		if rs("magicpower")<0 then
		rs("magicpower")=0
		end if
		end if
		rs.update
end if	
end sub
%>
<table border=1 align=center width=<%=wid%> cellpadding="0" cellspacing="0">
  <tr> 
    <td> 
      <table width=100%>
        <tr> 
          <td align="center"> 
            <p><%=mess%></p>            
          </td>
        </tr>

<tr> 
          <th align="center" class=a1 height=25 width=100%> 
          <%call mysub()%>          
          </th>
        </tr>

      </table>
      
    </td>
  </tr>
</table>
<div align="center"><br>
<a href="plus_zaotang.asp"><font color="#000000">返回</font></a> </div>
<%    
response.write "</td></tr></table>"
htmlend
%> 