<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="sjfunc.asp"-->
<!--#include file="../../mywp.asp"-->

<%'寻找卡片♀非凡国度→www.oneidc.cn♀
Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
if Instr(LCase(Application("zhbg_useronlinename"&nowinroom)),LCase(" "&zhbg_name&" "))=0 then 
	Session("zhbg_inthechat")="0" 
	Response.Redirect "chaterr.asp?id=001" 
end if 
towho=Trim(Request.Form("towho"))
towhoway=Request.Form("towhoway")
saycolor=Request.Form("saycolor")
addwordcolor=Request.Form("addwordcolor")
addsays=Request.Form("addsays")
says=Trim(Request.Form("sy"))
call dianzan(towho)
if len(says)>150 then says=Left(says,150)
says=lcase(says)
says=Replace(says,"&amp;","&")
if zhbg_grade<9 then
	says=bdsays(says)
end if

act=1
towhoway=0
i=instr(says,"$")
fnn1=mid(says,i+1)
says="<font color=red>【寻找卡片】<font color=" & saycolor & ">"+xunfaqi(mid(says,i+1),towho)+"</font>"
call chatsay(act,towhoway,towho,saycolor,addwordcolor,addsays,says)
'寻找卡片
function xunfaqi(fn1,to1)
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
rs.open "select 等级,会员等级,金币,操作时间 FROM 用户 WHERE 姓名='" & zhbg_name &"'" ,conn,2,2
dj=rs("等级")
fla=rs("金币")
if rs("金币")<60 then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script language=JavaScript>{alert('提示：你的金币不够无法施展呀，至少也得60个啊！');window.close();}</script>"
	response.end
end if
if dj<100 then
Response.Write "<script language=JavaScript>{alert('此功能需要100级战斗等级呀！');}</script>"
rs.close
	set rs=nothing	
	conn.close
	set conn=nothing
Response.End
end if
if DateDiff("s",rs("操作时间"),now())<300 then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script language=JavaScript>{alert('为了防止在乱刷，请等5分钟操作!');history.go(-1);}</script>"
	Response.End 
end if
hydj=rs("会员等级")
if hydj<5 then
        rs.close
        set rs=nothing
        conn.close
        set conn=nothing
	Response.Write "<script language=JavaScript>{alert('提示：会员等级为5级才可以进行寻找卡片！购买5级会员赠送200级每天可以领到100个金币！购买加QQ116722683 或打电话：13176775595');}</script>"
	Response.End
end if

rs.close
conn.execute "update 用户 set 金币=金币-60,操作时间=now()  where 姓名='"&zhbg_name&"'"
randomize 
r=int(rnd*10)+1
select case r
case 1
xunfaqi=zhbg_name & "你在" & to1 & "的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>福神卡</font></b>]一张<img src='card/bxk.jpg'>。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"福神卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close


case 2
xunfaqi=zhbg_name & "你在" & to1 & "的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>补血卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"补血卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close

	
case 3
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>涨钱卡</font></b>]一张<img src='card/金卡.jpg'>。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"涨钱卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close
	
case 4
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>练功卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"练功卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close
	
case 5
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>加点卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"加点卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close

case 6
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>吃豆卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"吃豆卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close

case 7
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>健身卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"健身卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close

case 8
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>万能卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"万能卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close
	
case 9
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>财神卡</font></b>]一张<img src='card/bxk.jpg'>。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"财神卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close
	
case 10
xunfaqi=zhbg_name & "在的家里做客，碰到了梦凡也在那里聚会。收到站长<font color=#0000FF>梦凡</font>赠送给您礼物[<b><font color=red>暴豆卡</font></b>]一张。"
	rs.open "SELECT w5 FROM 用户 WHERE 姓名='"&zhbg_name&"'",conn
	kapian=add(rs("w5"),"暴豆卡",1)
	conn.execute "update 用户 set  w5='"&kapian&"' where 姓名='"&zhbg_name&"'"
	rs.close
	
end select
set rs=nothing	
conn.close
set conn=nothing
end function
%>
