<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="sjfunc.asp"-->
<!--#include file="func.asp"-->
<!--#include file="../../mywp.asp"-->
<%
Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
'#####房间处理#####
zhbg_roominfo=split(Application("zhbg_room"),";")
chatinfo=split(zhbg_roominfo(nowinroom),"|")
if chatinfo(8)<>0 then
	Response.Write "<script language=JavaScript>{alert('提示：在["&chatinfo(0)&"]房间不可以使用卡片！');}</script>"
	Response.End
end if
if Instr(LCase(Application("zhbg_useronlinename"&nowinroom)),LCase(" "&zhbg_name&" "))=0 then 
	Session("zhbg_inthechat")="0" 
	Response.Redirect "chaterr.asp?id=001" 
end if
f=Minute(time())
zhbg_kptime=Application("zhbg_kptime")
if f>zhbg_kptime and chatinfo(0)<>"恩怨情仇" then
 Response.Write "<script language=javascript>{alert('提示：非恩怨房间用卡请在每小时的前"&zhbg_kptime&"分');}</script>"
 Response.End
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,"&","&")
'对系统禁止字符处理
if zhbg_grade<9 then
says=bdsays(says)
end if
act=1
towhoway=0
i=instr(says,"$")
fnn1=trim(mid(says,i+1))
if fnn1<>"归来卡" then call dianzan(towho) 
says=kapian(mid(says,i+1),towho)
call chatsay(act,towhoway,towho,saycolor,addwordcolor,addsays,says)

'卡片
function kapian(fn1,to1)
fn1=trim(fn1)
if InStr(fn1,"'")<>0 or InStr(fn1,"`")<>0 or InStr(fn1,"=")<>0 or InStr(fn1,"-")<>0 or InStr(fn1,",")<>0 then 
	Response.Write "<script language=JavaScript>{alert('滚吧，你想做什么？想捣乱吗？！');}</script>"
	Response.End 
end if
if zhbg_name=to1 and instr(";解除卡;陷害卡;查税卡;吃豆卡;捣乱卡;逮捕卡;踢人卡;冬眠卡;抢亲卡;情人卡;查税卡;穷神卡;衰神卡;死神卡;分手卡;降级卡;怪兽卡;",fn1)<>0 then
	Response.Write "<script language=javascript>alert('【"&fn1&"】不能自己进行操作！');</script>"
	Response.End
end if
if to1="大家" and instr("逮捕卡;踢人卡;冬眠卡;抢亲卡;情人卡;查税卡;穷神卡;衰神卡;死神卡;分手卡;降级卡;怪兽卡;种子卡;种花卡;",fn1)<>0 then
	Response.Write "<script language=javascript>alert('【"&fn1&"】不能大家进行操作！');</script>"
	Response.End
end if
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
fn1=trim(fn1)
rs.open "select 转生 from 用户 where  姓名='"&to1&"'",conn,2,2
zstt=rs("转生")
if zstt>=8 then
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##想对%%使用["&fn1&"]，但%%已经练成了超凡的能力(转生大于等于8次)，此卡片已经被化解了...</font>"
exit function
end if
rs.close
rs.open "select 会员金卡,w5,门派 from 用户 where  姓名='"&zhbg_name&"'",conn,2,2
mycard=abate(rs("w5"),fn1,1)
select case fn1
case "福神卡"
	conn.Execute ("update 用户 set sl='福神',slsj=now()+3 where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]现在神灵赋身了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷使用了["&fn1&"]<img src=card/BXK.JPG><bgsound src=mav/XL.MID loop=1>，神啊，您与我同在...</font>"
case "财神卡"
	conn.Execute ("update 用户 set sl='财神',slsj=now()+3 where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]现在神灵赋身了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷使用了["&fn1&"]<img src=card/caishen.JPG><bgsound src=mav/XL.MID loop=1>，神啊，您与我同在...</font>"
case "穷神卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set sl='穷神',slsj=now()+3 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]现在神灵与["&to1&"]赋身了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]<img src=card/qiongshen.JPG><bgsound src=mav/XL.MID loop=1>，神啊，与你同在...</font>"
case "衰神卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set sl='衰神',slsj=now()+3 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]现在神灵与["&to1&"]赋身了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]<img src=card/aishen.JPG><bgsound src=mav/XL.MID loop=1>，神啊，与你同在...</font>"
case "死神卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set sl='死神',slsj=now()+3 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]现在神灵与["&to1&"]赋身了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]<img src=card/sishen.JPG><bgsound src=mav/XL.MID loop=1>，神啊，与你同在...</font>"
case "送神卡"
	conn.Execute ("update 用户 set sl='无',slsj=now() where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]成功解除了神灵赋身！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了["&fn1&"]<img src=card/BXK.JPG><bgsound src=mav/XL.MID loop=1>，神啊，88！see tomorrow!</font>"
case "色魔卡"
	conn.Execute ("update 用户 set 结婚次数=结婚次数+5  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('您使用了色魔卡，也就表示你成了真正的色魔。！');}</script>"
	kapian="<font color=red>【色魔卡】<font color=" & saycolor & ">##使用了色魔卡<img src=card/semo.JPG><bgsound src=mav/XL.MID loop=1>，哈哈这下你那青梅竹马，海誓山盟的爱人不要你了，结婚次数成5次了：呵呵，哭也没办法了，谁让是个色鬼呢，哈哈。大家快打这个大色魔，快看看呀，才几天，已经结过这么多次婚了。哈哈。</font>"
case "非礼卡"
    wnky=wnk(to1)
    if wnky<>"ok" then 
		kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]<img src=card/feili.JPG><bgsound src=mav/XL.MID loop=1>...</font>"&wnky
		exit function
    end if
	conn.Execute ("update 用户 set 魅力=魅力-500 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]的魅力少了500！');}</script>"
	kapian="<font color=red>【卡片】<font color=" & saycolor & ">##色咪咪的，晕呼呼的就向%%的樱桃小嘴一阵KISS,%%只觉一阵恶心。魅力少了500点..</font>"
case "合好卡"
	conn.Execute ("update 用户 set 金币=金币+10 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]友谊之神,真诚的呼唤彼此,让我们快乐，让我们合好.！');}</script>"
	kapian="<img src=card/he1.gif><bgsound src=wav/hua.wav loop=1><font color=green>【卡片】<font color=" & saycolor & ">##真诚得对%%使用了合好卡<img src=card/hehao.gif>,为其送上了10个金币.真是有心,朋友请不要一些小事,就失去了我们的友谊.愿我们重归于好,友谊地久天长,一起唱,朋友一生一起走,那些日子不在有,一句话,一辈子,一生情,一杯酒...</font>"
case "神剑卡"
	conn.Execute ("update 用户 set 攻击=攻击+1000 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]本国度最高最美最强之物圣灵之剑,为对方献上了1000攻击,真是如意宝贝!');}</script>"
	kapian="<img src=card/jian.gif><bgsound src=readonly/okok.wav loop=1><font color=green>【卡片】<font color=" & saycolor & ">##真诚得对%%使用了依恋蝶最强最好最美之卡-------神剑卡<img src=card/jian1.gif>,梦幻之剑在瞬间发送耀眼的光彩.为其送上了1000攻击,这回天下无敌了,%%真是太感动了啊.呵呵，可不可以在来一张呀:)...</font>"
case "魔盾卡"
	conn.Execute ("update 用户 set 防御=防御+1000 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]非凡国度总站最高最美最强之物依恋圣龙之盾,为对方献上了10000防御!');}</script>"
	kapian="<img src=card/dun.gif><bgsound src=wav/hua.wav loop=2><font color=green>【卡片】<font color=" & saycolor & ">##真诚得对%%使用了非凡国度总站最强最好最美之卡-------魔盾卡<img src=card/dun1.gif>,梦幻之盾在瞬间发送耀眼的光彩.为其送上了1000防御,这回天下无敌了,%%真是太感动了啊.呵呵，救世主呀:)...</font>"
case "天戒卡"
    conn.Execute ("update 用户 set 法力=法力+20000 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]非凡国度总站最高最美最强之物圣龙之盾,为对方献上了20000法力！');}</script>"
	kapian="<img src=card/jie.gif><bgsound src=wav/hua.wav loop=2><font color=green>【卡片】<font color=" & saycolor & ">##真诚得对%%使用了非凡国度总站最强最好最美之卡-------天戒卡<img src=card/jie1.gif>,梦幻之戒在瞬间发送耀眼的光彩.为其送上了2000法力,这回天下无敌了,%%真是太感动了啊.呵呵，救世主呀:)...</font>"
case "战神卡"
    conn.Execute ("update 用户 set 武功=武功+2000 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]非凡国度网最高最美最强之物圣蝶之刃,为对方献上了2000武功！');}</script>"
	kapian="<img src=card/zhan.gif><bgsound src=cd.mid loop=1><font color=green>【卡片】<font color=" & saycolor & ">##真诚得对%%使用了非凡国度总站最强最好最美之卡-------战神卡<img src=card/zhan1.gif>,梦幻之刃在瞬间发送耀眼的光彩.为其送上了2000武功,这回天下无敌了,%%真是太感动了啊.呵呵，救世主呀:)...</font>"
case "仙靴卡"
    conn.Execute ("update 用户 set allvalue=allvalue+3000 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]非凡国度总站最高最美最强之物圣仙之靴,为对方献上了30000存点！');}</script>"
	kapian="<img src=card/xue.gif><bgsound src=wav/hua.wav loop=2><font color=green>【卡片】<font color=" & saycolor & ">##真诚得对%%使用了非凡国度网最强最好最美之卡-------仙靴卡<img src=card/xue1.gif>,梦幻之靴在瞬间发送耀眼的光彩.为其送上了3000存点,%%快点存点哦:)...</font>"
case "天之卡"
    conn.Execute ("update 用户 set allvalue=allvalue+1000") 
	Response.Write "<script language=JavaScript>{alert('["&to1&"]为非凡国度网所有玩家增加1000存点，梦凡对你表示忠心感谢！');}</script>"
	kapian="<img src=card/tzk.gif><bgsound src=wav/hua.wav loop=2><font color=green>【卡片】<font color=" & saycolor & ">##笑眯眯得对大家使用了天之卡<img src=card/tzk1.gif>,天地万物,唯我独尊.##的天之卡在明月的衬托下更加靓丽,所有玩家存点加1000.MYLOVE..这种宝贝,也真是##所拥有!让大家都好好感谢你吧,##你真是非凡国度的福神啊.大家快点存点哦.</font>"
case "神之卡"
    conn.Execute ("update 用户 set 金币=金币+88") 
	Response.Write "<script language=JavaScript>{alert('["&to1&"]为非凡国度总站所有玩家增加88个金币！');}</script>"
	kapian="<img src=card/szk.gif><bgsound src=wav/hua.wav loop=2><font color=green>【卡片】<font color=" & saycolor & ">##笑眯眯得对大家使用了神之卡<img src=card/szk1.gif>,天地万物,唯我独尊.##的神之卡在明月的衬托下更加靓丽,所有玩家金币加88.MYLOVE..这种宝贝,也真是##所拥有!让大家都好好感谢你吧,##你真是非凡国度的福神啊.</font>"
case "魔之卡"
    conn.Execute ("update 用户 set 状态='正常',体力=体力+15000") 
	Response.Write "<script language=JavaScript>{alert('["&to1&"]天皇神卡真牛.！');}</script>"
	kapian="<img src=card/mzk.gif><bgsound src=wav/hua.wav loop=2><font color=green>【卡片】<font color=" & saycolor & ">##笑眯眯使用了如来佛主赐予的魔之卡<img src=card/mzk1.gif>,天地万物,唯我独尊.##的魔之卡在明月的衬托下更加靓丽,一道佛光在爱情大厅折射出神奇的光芒.那些冬眠的,被点穴的,被打死的,所有人都回来了,真是不知道赶怎样形容这种宝贝了。##你真是非凡国度网的大救星啊.</font>"			
case "会员卡"
	conn.Execute ("update 用户 set 会员等级=1,会员日期=date()+10  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]使用了最高最美最强之物会员之神卡,恭喜你成为非凡国度总站的会员啦！');}</script>"
	kapian="<font color=red>【卡片】<font color=" & saycolor & ">##使用了梦幻之卡，在瞬间发送耀眼的光彩.让自己成为了一级会员，真是幸福啊,快刷新或重进吧！</font>"
case "超级红卡"
 conn.Execute ("update 用户 set 武功加=武功加+200,防御加=防御加+200,攻击加=攻击加+200,内力加=内力加+200,体力加=体力加+200 where 姓名='"&zhbg_name&"'")
 Response.Write "<script language=Javascript>{alert('对["&zhbg_name&"]使用了健身卡，锻练成功！武功、内力、体力、防御和攻击上限值各涨200点！！！');}</script>"
 kapian="<font size=2 color=green>【超级卡片】<font color=" & saycolor & "><font color=red>##</font>大叫着，我要更强，我要更强....从口袋中拿出超级红卡，经一翻艰苦训练，武功、攻击、防御、内力、体力上限值各涨<font color=red>200</font>点！！！"
case "美丽卡"
	conn.Execute ("update 用户 set 魅力=魅力+10000  where  姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]的魅力上涨了10000！');}</script>"
	kapian="<font color=red>【美丽卡】<font color=" & saycolor & ">##我要美丽，我要美丽~~我要变成最美丽的人，要赛过李嘉欣，刘德华，大家看这人呆呆的，出于同情，凑齐10000魅力给了她！</font>"
case "亲亲卡"
    wnky=wnk(to1)
    if wnky<>"ok" then 
		kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
		exit function
    end if
    if rs("门派")="出家" then
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】你是出家人，搞错了！！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
    end if
    rs.close
    rs.open "select * from 用户 where 姓名='"&to1&"'",conn
    if rs("门派")="出家" then
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】人家是出家人，搞错了！！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing

    end if
    if rs("性别")=sex then
        kapian="<img src=card/qinqin.jpg><font color=green><bgsound src=003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用亲亲卡失败:原因是"&to1&"与"&zhbg_name&"是同性!没爱人了玻璃也想啊？</font>"
       	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
        exit function
    end if
    conn.Execute ("update 用户 set allvalue=allvalue+50  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]使用了亲亲卡，泡点数上涨50点！');}</script>"
    kapian="<img src=card/ai1.gif><font color=green><bgsound src=123.wav loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用亲亲卡<img src=card/qinqin.jpg>,终于如愿以尝的与"&to1&"在国度的大厅疯狂的<img src=card/ai.gif>起来!真叫人羡慕啊！同时"&zhbg_name&"的泡点上升50点！你看！把"&zhbg_name&"乐得都跳起来了！大叫：<font color=red><b>抱抱卡在手帅哥美女别想走!</b></font></font>" 
case "羞羞卡"
    wnky=wnk(to1)
    if wnky<>"ok" then 
		kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
		exit function
    end if
	conn.Execute ("update 用户 set 魅力=魅力+500 where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]的魅力多了500！');}</script>"
	kapian="<font color=red>【卡片】<font color=" & saycolor & ">##脸泛桃花，含情默默地向自己追求已久的%%深情的吻去,%%只觉心神激荡，一种幸福感涌上心头，彼此的心扉在那一刻盛开。感情也随之升华。魅力上升了500点..</font>"
case "抱抱卡"
 rs.close
 rs.open "select 性别 from 用户 where 姓名='"&zhbg_name&"'",conn,2,2
 my_xb=rs("性别")
 rs.close
 rs.open "select 性别 from 用户 where 姓名='"&to1&"'",conn,2,2
 to_xb=rs("性别")
 if my_xb=to_xb then
	Response.Write "<script language=JavaScript>{alert('异性朋友你也抱？是不是同性恋啊？');}</script>"
	response.end
 end if
 conn.Execute ("update 用户 set 体力=体力-100,内力=内力+500,魅力=魅力+500 where 姓名='"&to1&"'")
 conn.Execute ("update 用户 set 体力=体力-100,内力=内力+500,道德=道德-100,allvalue=allvalue+300 where 姓名='"&zhbg_name&"'")
 kapian="<bgsound src=wav/baobao.wav loop=1><font color=green>【卡片】<font color=" & saycolor & ">##对%%使用了抱抱卡，终于如愿以偿的与%%在国度的大厅疯狂的<img src=card/baobao.gif>起来！真叫人羡慕啊！同时##的经验值增加了300点,你看，把##乐得三天三夜睡不着觉！大叫：<font color=red><b>抱抱卡在手帅哥美女别想走!</b></font>"
case "真爱卡"
 rs.close
 rs.open "select 性别 from 用户 where 姓名='"&zhbg_name&"'",conn,2,2
 my_xb=rs("性别")
 rs.close
 rs.open "select 性别 from 用户 where 姓名='"&to1&"'",conn,2,2
 to_xb=rs("性别")
 if my_xb=to_xb then
	Response.Write "<script language=JavaScript>{alert('异性朋友你爱什么啊？是不是同性恋啊？');}</script>"
	response.end
 end if
 conn.Execute ("update 用户 set 道德=道德+50,魅力=魅力+50,allvalue=allvalue+500 where 姓名='"&to1&"'")
 conn.Execute ("update 用户 set 道德=道德+50,魅力=魅力+50,allvalue=allvalue-500 where 姓名='"&zhbg_name&"'")
 kapian="<bgsound src=wav/zhenai.wav loop=1><font color=green>【卡片】<font color=" & saycolor & ">##对%%使用了真爱卡，终于如愿以偿的与%%在国度的大厅疯狂的<img src=card/zhenai.gif>给真爱的%%500经验,爱是无私的奉献，真叫国度人士眼红啊！同时双方的道德和魅力都上升50点，你看，把##乐得跳起来了，大叫：<font color=red><b>下辈子我还要你爱我可以吗？</b></font>"
case "请神卡"
	dim sl(4)
	sl(0)="福神"
	sl(1)="财神"
	sl(2)="衰神"
	sl(3)="死神"
	sl(4)="穷神"
	randomize timer
	sss=int(rnd*4)+1
	if sss=5 then sss=4
	conn.Execute ("update 用户 set sl='"&sl(sss)&"',slsj=now()+3 where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('成功使用了["&fn1&"]现在得到神灵["&sl(sss)&"]赋身！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷使用了["&fn1&"]，神啊，您与我同在...请得大神["&sl(sss)&"]到自己的身上…</font>"
	erase sl
case "解除卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set 保护=false,操作时间=now() where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('成功解决了["&to1&"]的练功状态！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷使用了解除卡片，也不知道哪一位大虾要倒霉了...</font>"
case "陷害卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set 内力=int(内力/3),体力=int(体力/3) where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]的体力体力只剩原来的1/3了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##终于忍不可忍，拿出自己陷害卡，向%%的头上打去,%%只觉眼前一黑，体力、内力损失大半..</font>"
case "补血卡"
	conn.Execute ("update 用户 set 体力=体力+50000,内力=内力+50000  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]的体力、体力都增加了5万点！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了补血卡，这一下可是有福了，体力、内力暴涨5万点！</font>"
case "涨钱卡"
	conn.Execute ("update 用户 set 存款=存款+88880000  where  姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]的存款上涨了8888万！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了涨钱卡，自己的小荷包都装不下了，8888万呀！</font>"
case "练功卡"
	conn.Execute ("update 用户 set 武功=武功+10000  where  姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]使用了练功卡，武功上涨1万！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了练功卡，武功可是大幅度上涨，看来国度又要不太平了！</font>"
case "攻防卡"
	conn.Execute ("update 用户 set 攻击=攻击+300,防御=防御+300  where  姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]使用了攻防卡，攻击和防御各涨300点！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了攻防卡，攻击和防御大幅度上涨，看来国度又多出一位高手了！</font>"
case "加点卡"
	conn.Execute ("update 用户 set allvalue=allvalue+1000  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('["&zhbg_name&"]使用了加点卡，泡点数上涨1000点！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了加点卡，呵。。不用泡点也加点，真是有福气！</font>"
case "归来卡"
wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
 if Instr(LCase(application("zhbg_zanli")),LCase("!"&to1&"!"))=0 then
  kapian="<img src=card/youyi.jpg><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & sayscolor & ">"&zhbg_name&"对"&to1&"使用了归来卡,可惜{"&to1&"}并不是在暂离状态!白白浪费了一张归来卡！</font>"
 else
  rs.close
  rs.open "select id,会员等级,等级,身份,门派,名单头像,性别,好友名单,配偶,通缉 from 用户 where 姓名='" & to1 &"'",conn,2,2
  jhid=rs("id")
  hydj=rs("会员等级")
  jhdj=rs("等级")
  jhsf=rs("身份")
  if rs("通缉")=True then
   jhmp="通缉犯"
  else
   jhmp=rs("门派")
  end if
  jhtx=rs("名单头像")
  sex=rs("性别")
'  nowinroom=session("nowinroom")
  Application.Lock
  onlinelist=Application("zhbg_onlinelist"&nowinroom)
  onlinenum=UBound(onlinelist)
  for i=1 to onlinenum step 1
   onlinexx=split(onlinelist(i),"|")
   if onlinexx(0)=to1 then
   zhbg_zm=to1&"|"&sex&"|"&jhmp&"|"&jhsf&"|"&jhtx&"|"&jhdj&"|"&jhid&"|"&hydj&"|0"&"|"&onlinexx(9)
   onlinelist(i)=zhbg_zm
   exit for
   end if
  next
  Application("zhbg_onlinelist"&nowinroom)=onlinelist
  zhbg_zanli=split(application("zhbg_zanli"),";")
  for x=0 to UBound(zhbg_zanli)
   dxname=split(zhbg_zanli(x),"|")
   if dxname(0)="!"&to1&"!" then
    dxcz=zhbg_zanli(x)&";"
    application("zhbg_zanli")=replace(application("zhbg_zanli"),dxcz,"")
    kapian="<img src=card/youyi.jpg><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & sayscolor & ">"&zhbg_name&"对"&to1&"使用了归来卡,成功地把{"&to1&"}从暂离状态拖回来!</font>"
    exit for
   end if
  next
  Application.UnLock
 end if
case "吃豆卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set 暴豆时间=now()  where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('对["&to1&"]使用了吃豆卡，他不能再暴豆了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##实在对%%的行为看不过去，使用了吃豆卡，%%大叫一声，晕死过去。豆豆没有了...</font>"
case "暴豆卡"
	conn.Execute ("update 用户 set 暴豆时间=now()  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('对["&zhbg_name&"]使用了暴豆卡，现在暴豆成功了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##:大叫着，我暴，我暴....从口袋中拿出暴豆卡，暴豆成功！</font>"
case "捣乱卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
	conn.Execute ("update 用户 set 武功=int(武功/3)  where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('对["&to1&"]使用了捣乱卡，他武功只剩1/3了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##:大叫着，谁也不要拦着我，我要为民除害！使用了捣乱卡，"&to1&"的武功失去大半....</font>"
case "怪兽卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
        rs.close
        rs.open "SELECT * FROM 用户 WHERE  姓名='" & to1 & "'",conn,2,2
        if rs("门派")="官府" then 
            kapian="<img src=card/guaishou.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&",你不能对官府人员使用怪兽卡!"
           	rs.close
		set rs=nothing
		conn.close
	    	set conn=nothing
	        exit function
	end if
        if rs("身份")="掌门" then 
            kapian="<img src=card/guaishou.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&",你不能对门派的掌门人<font color=red>[["&to1&"]]</font>使用怪兽卡!"
           	rs.close
		set rs=nothing
		conn.close
	    	set conn=nothing
	        exit function
	end if
	conn.Execute ("update 用户 set 身份='僵尸王',状态='僵尸王' where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('对["&to1&"]使用了怪兽卡，他已经变成了僵尸了！');}</script>"
	kapian="<img src=card/guaishou.jpg><font color=green>【卡片】<font color=" & saycolor & ">##:大叫着，"&to1&"变成了僵尸，请大家小心哦，如果怕的话请来我这边，我可以保护大家....</font>"
case "清纯卡"
	conn.Execute ("update 用户 set 结婚次数=0  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('您使用了清纯卡，结婚次数清0完成！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##好怀念过去的时光呀……</font>"
case "好人卡"
	conn.Execute ("update 用户 set 总杀人=0  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('您使用了好人卡，杀人总数清0完成！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了[好人卡]，杀人总数为0了……</font>"
case "变性卡"
	rs.close
	rs.open "select 性别,配偶 FROM 用户 WHERE 姓名='" & zhbg_name &"'",conn,2,2
	sex=rs("性别")
	pl=rs("配偶")
	rs.close
    if pl="无" then 
        if sex="男" then
               sql="update 用户 set 性别='女' WHERE 姓名='" & zhbg_name & "'"
               xb="漂亮的女生"
         end if 
          if sex="女" then 
              sql="update 用户 set 性别='男' WHERE 姓名='" & zhbg_name & "'"
              xb="英俊的男孩"
          end if
          Set Rs=conn.Execute(sql)  
            bianxi=zhbg_name&"使用变性卡后,终于如愿以尝,变成了"&xb&"!" 
        else
          bianxi="使用变性卡失败!原因:"&zhbg_name&"是有家室的人呢,怎么还想变性呀!这样不是乱套了!为了惩戒像"&zhbg_name&"你这种道德败坏的人,特此没收"&zhbg_name&"的变性卡!"
        end if
	kapian="<img src=card/bxk.jpg></td><td><font color=green>【卡片】<font color=" & saycolor & ">##：这年头，克隆技术真先进呀，我变，我变……(不是在变成克琳钝，在作变性手术！）<br>【结果】"&bianxi&"</font>"
case "离婚卡"
	rs.close
	rs.open "select 配偶 FROM 用户 WHERE 姓名='" & zhbg_name &"'",conn,2,2
	peiou=rs("配偶")
	if peiou="无" then
		rs.close
		set rs=nothing	
		conn.close
		set conn=nothing
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】你有钱呀，根本没有配偶呀！');</script>"
		Response.End
	end if
	conn.Execute ("update 用户 set 配偶='无'  where 姓名='" & zhbg_name &"'")
	rs.close
	rs.open "select 配偶 FROM 用户 WHERE 姓名='"&peiou&"'",conn,2,2
	if not(Rs.Bof OR Rs.Eof) then
		conn.Execute ("update 用户 set 配偶='无'  where 姓名='"&peiou&"'")
	end if
	rs.close
	kapian="<img src=card/lifen.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">##：想前想后，经过自己一番思想斗争，使用了离婚卡,终于想好了与["&peiou&"]离婚了……</font>"
case "抢亲卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
    if rs("门派")="出家" then
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】你是出家人，搞错了！！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
    end if
    rs.close
    rs.open "select * from 用户 where 姓名='"&to1&"'",conn,2,2
    if rs("门派")="出家" then
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】人家是出家人，搞错了！！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
    end if
	sex=rs("性别")
    if rs("配偶")<>"无" then
	    kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用抢亲卡失败:原因是"&to1&"是有家室的人</font>"
    	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
    	exit function
	end if
    if rs("门派")="官府" then 
           kapian="不可以对管理员使用抢亲卡……"
           	rs.close
			set rs=nothing
			conn.close
	    	set conn=nothing
	        exit function
    end if
    rs.close
    rs.open "select * from 用户 where 姓名='"&zhbg_name&"'",conn,2,2
    if rs("配偶")<>"无" then
        kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用抢亲卡失败:原因是自己已经是有家室的人了!</font>"
       	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
        exit function
    end if
    if rs("性别")=sex then
        kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用抢亲卡失败:原因是"&to1&"与"&zhbg_name&"是同性!</font>"
       	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
        exit function
    end if
    conn.execute "update 用户 set 配偶='"&zhbg_name&"' where 姓名='"&to1&"'"
    conn.execute "update 用户 set 配偶='"&to1&"' where 姓名='"&zhbg_name&"'"
    kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用抢亲卡,终于如愿以尝的与"&to1&"结为夫妇!</font>"
case "分手卡"
	rs.close
	rs.open "select 情人 FROM 用户 WHERE 姓名='" & zhbg_name &"'",conn,2,2
	peiou=rs("情人")
	if peiou="无" then
		rs.close
		set rs=nothing	
		conn.close
		set conn=nothing
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】你有钱呀，根本没有情人呀！');</script>"
		Response.End
	end if
	conn.Execute ("update 用户 set 情人='无'  where 姓名='" & zhbg_name &"'")
	rs.close
	rs.open "select 情人 FROM 用户 WHERE 姓名='"&peiou&"'",conn,2,2
	if not(Rs.Bof OR Rs.Eof) then
		conn.Execute ("update 用户 set 情人='无'  where 姓名='"&peiou&"'")
	end if
	rs.close
	kapian="<img src=card/lifen.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】##：想前想后，经过自己一番思想斗争，使用了分手卡,终于想好了与["&peiou&"]分手了……</font>"
case "情人卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
    if rs("门派")="出家" then
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】你是出家人，搞错了！！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
    end if
    rs.close
    rs.open "select * from 用户 where 姓名='"&to1&"'",conn,2,2
    if rs("门派")="出家" then
		Response.Write "<script language=javascript>alert('【"&zhbg_name&"】人家是出家人，搞错了！！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
    end if
	sex=rs("性别")
    if rs("情人")<>"无" then
	    kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用情人卡失败:原因是"&to1&"是有情人的人了</font>"
    	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
    	exit function
	end if
    if rs("门派")="官府" then 
           kapian="不可以对管理员使用情人卡……"
           	rs.close
			set rs=nothing
			conn.close
	    	set conn=nothing
	        exit function
    end if
    rs.close
    rs.open "select * from 用户 where 姓名='"&zhbg_name&"'",conn,2,2
    if rs("情人")<>"无" then
        kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用情人卡失败:原因是自己已经是有情人的人了!</font>"
       	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
        exit function
    end if
    if rs("性别")=sex then
        kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用情人卡失败:原因是"&to1&"与"&zhbg_name&"是同性!</font>"
       	rs.close
		set rs=nothing
		conn.close
	    set conn=nothing
        exit function
    end if
    conn.execute "update 用户 set 情人='"&zhbg_name&"' where 姓名='"&to1&"'"
    conn.execute "update 用户 set 情人='"&to1&"' where 姓名='"&zhbg_name&"'"
    kapian="<img src=card/qinren.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用情人卡,终于如愿以尝的与"&to1&"结为情人!</font>"
case "逮捕卡"
wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
        rs.close
        rs.open "SELECT * FROM 用户 WHERE  姓名='" & to1 & "'",conn,2,2
        if rs("门派")="官府" then 
            kapian="<img src=card/xianhao.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&",你不能对官府人员使用逮捕令!"
           	rs.close
			set rs=nothing
			conn.close
	    	set conn=nothing
	        exit function
		end if
        kapian="<img src=card/xianhao.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"拿出国度特许的逮捕令,把"&to1&"给抓了!"
        mzky=mzk(to1)
        if mzky="ok" then   
           conn.execute "update 用户 set 状态='狱',登录=now()+3 where 姓名='" & to1 & "'"
            call boot(to1,to1&"被"&zhbg_name&"使用了逮捕令")
        else
           kapian=kapian&mzky
        end if
case "踢人卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
      rs.close
      rs.open "SELECT * FROM 用户 WHERE  姓名='" & to1 & "'",conn,2,2
      if rs("门派")="官府" then 
        kapian="<img src=card/dz04.gif></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&",你不能对官府人员使用踢人卡!"
       	rs.close
		set rs=nothing
		conn.close
	   	set conn=nothing
        exit function
	  end if
       mtky=mtk(to1)
       if mtky="ok" then   
	      kapian="<img src=card/dz04.gif></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"使用踢人卡,飞起一脚，结果把"&to1&"踢了出去!"
    	  call boot(to1,to1&"被"&zhbg_name&"使用了踢人卡")     
    	else
			kapian=mtky
    	end if
case "冬眠卡"      
  wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
  rs.close
  rs.open "SELECT * FROM 用户 WHERE  姓名='" & to1 & "'",conn,2,2
  if rs("门派")="官府" then
     kapian="<img src=card/shuimian.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&",你不能对官府人员使用冬眠卡!"
       	rs.close
		set rs=nothing
		conn.close
	   	set conn=nothing
        exit function
  end if
   rs.close
   qxky=qxk(to1)
   if qxky="ok" then   
	   conn.execute "update 用户 set 登录=now()+12/(4*144),状态='眠' where 姓名='" & to1 & "'"
	   kapian="<img src=card/shuimian.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用冬眠卡!使"&to1&"睡着了!"
	   call boot(to1,to1&"被"&zhbg_name&"使用了冬眠卡")
   else
   		kapian=qxky
   end if
case "查税卡" 
  wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
  rs.close   
  rs.open "SELECT * FROM 用户 WHERE  姓名='" & to1 & "'",conn,2,2
  if rs("门派")="官府" then
    kapian="<img src=card/chashui.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&",你不能对官府人员使用查税卡!"
   	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
    exit function
  end if
    yl=rs("银两")+rs("存款")
    if yl<=10000 then
    	kapian="<img src=card/chashui.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用查税卡失败:原因"&to1&"身上的银子小于10000两!"
	   	rs.close
		set rs=nothing
		conn.close
		set conn=nothing
	    exit function
	end if
    mhky=mhk(to1)
    if mhky="ok" then   
      yl=int(yl*0.02)
      conn.execute "update 用户 set 银两=银两+"&yl&" where 姓名='"&zhbg_name&"'"
      if rs("银两")>=rs("存款") then
        conn.execute "update 用户 set 银两=银两-"&yl&" where 姓名='"&to1&"'"
      else
        conn.execute "update 用户 set 存款=存款-"&yl&" where 姓名='"&to1&"'"
      end if
      kapian="<img src=card/chashui.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"使用查税卡,查得"&to1&"共"&yl&"两银子,全部归"&zhbg_name&"所有!"
    else
       kapian="<img src=card/chashui.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"对"&to1&"使用查税卡失败!"
       kapian=kapian&mhky
    end if
case "升级卡"
 rs.close
 rs.open "select allvalue,会员等级,等级 from 用户 where 姓名='"&zhbg_name&"'",conn,2,2
 if rs("会员等级")>3 or rs("等级")>100 then
		Response.Write "<script language=javascript>alert('提示：100级以上或4级以上会员无需使用升级卡！');</script>"
		Response.End
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
    end if
 jhjy=rs("allvalue")
 jhdj=int(sqr(jhjy/50))
 jhadd=((jhdj+1)*(jhdj+1)-jhdj*jhdj)*50
 jhdj=jhdj+1
 jhjy=jhjy+jhadd
 conn.Execute ("update 用户 set allvalue="&jhjy&",等级="&jhdj&" where 姓名='"&zhbg_name&"'")
 Response.Write "<script language=Javascript>{alert('对["&zhbg_name&"]使用了升级卡！国度经验值上升了"&jhadd&"点，战斗等级上升1级，现为"&jhdj&"级');}</script>"
 kapian=zhbg_name&"使用了升级卡，"&zhbg_name&"的泡点增加"&jhadd&"点，战斗等级上升1级...真是好福气呀，不泡点也升级！"
case "健身卡"
 conn.Execute ("update 用户 set 武功加=武功加+500,内力加=内力加+500,体力加=体力加+500 where 姓名='"&zhbg_name&"'")
 Response.Write "<script language=Javascript>{alert('对["&zhbg_name&"]使用了健身卡，锻练成功！武功、内力、体力上限值各涨500点！！！');}</script>"
 kapian="【卡片】"&zhbg_name&"大叫着，我要更强，我要更强....从口袋中拿出健身卡，在"&Application("zhbg_user")&"的精心调教下，"&zhbg_name&"经过一翻艰苦训练，武功、内力、体力上限值各涨500点！！！"
case "好人卡"
	conn.Execute ("update 用户 set 杀人数=0  where 姓名='" & zhbg_name &"'")
	Response.Write "<script language=JavaScript>{alert('您使用了好人卡，杀人数清0完成！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##说，我是好人，我今天没有杀人呀……</font>"
case "天眼卡"
	Response.Write "<script>parent.slbox=true;<"&"/script>"	
	Response.Write "<script language=JavaScript>{alert('您使用了天眼卡，现在可以看到别人私聊了！');}</script>"
	kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷地天启了天眼，十万百千里的地方都能看见了……</font>"
case "降级卡"
    wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
     rs.close
     rs.open "select * from 用户 where 姓名='"&to1&"'",conn,2,2
     jhdj=rs("等级")
     del1=jhdj*jhdj*50
     del2=(jhdj+1)*(jhdj+1)*50
     delok=del2-del1
     jhjf=rs("allvalue")-delok
 	conn.Execute ("update 用户 set 等级=等级-1,allvalue="&jhjf&" where 姓名='" & to1 &"'")
	Response.Write "<script language=JavaScript>{alert('["&to1&"]的等级降为"&jhdj-1&"级了！');}</script>"
	kapian="<img src=card/jiangji.jpg><font color=green><bgsound src=wav/003.mid loop=1><font color=green>【卡片】<font color=" & saycolor & ">##对%%使用了降级卡,%%的等级降为"&jhdj-1&"级，积分也大为减少.</font>"
case "嫁祸卡"
rs.close
rs.open "select * from 用户 where 姓名='"&to1&"'",conn,2,2
if rs("通缉")="True" then
kapian="<bgsound src=plus/wav/wav/003.mid loop=1><font color=green>【卡片】</font><font color=blue>"&zhbg_name&"</font>对<font color=green>"&to1&"</font>使用<font color=red><b>嫁祸卡</b></font>失败："&to1&"也是通辑犯，已经不用你嫁祸了！！"
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  exit function
end if
if rs("门派")="官府" then 
  kapian=""&zhbg_name&"你不可以对管理员使用嫁祸卡……"
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  exit function
end if
rs.close
rs.open "select 通缉 from 用户 where 姓名='"&zhbg_name&"'",conn,2,2
if rs("通缉")="False" then
kapian="<bgsound src=wav/wav/003.mid loop=1><font color=green>【卡片】</font><font color=blue>"&zhbg_name&"</font>对<font color=green>"&to1&"</font>使用<font color=red><b>嫁祸卡</b></font>失败："&zhbg_name&"不是通辑犯，怎么嫁祸呀！！"
        rs.close
set rs=nothing
conn.close
set conn=nothing
exit function
end if
wnky=wnk(to1)
if wnky<>"ok" then 
kapian="<font color=green>【卡片】<font color=" & saycolor & ">##偷偷对%%使用了["&fn1&"]...</font>"&wnky
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
exit function
end if
conn.execute "update 用户 set 通缉=True where 姓名='"&to1&"'"
conn.execute "update 用户 set 通缉=False where 姓名='"&zhbg_name&"'"
kapian="<bgsound src=wav/wav/003.mid loop=1><font color=green>【卡片】</font>##偷偷使用卡片：现在%%是通辑犯大家快杀呀！"
Case "猪崽卡"
    rs.close
    rs.Open "select pig from 用户 where  姓名='" & zhbg_name & "'", conn,2,2
    myhua = rs("pig")
    If myhua = "" or IsNull(myhua) Or InStr(myhua, "|") = 0 Then
                kapian = "<font color=green>【卡片】</font>##你并没有小猪,不能使用猪崽卡，请去建设猪圈!"
                Exit Function
    End If
        zt = Split(myhua, "|")
        ub = UBound(zt)
        If ub <> 27 Then
                kapian = "<font color=green>【卡片】</font>##你的猪崽数据有问题，请重新建设猪圈!"
                Exit Function
        End If
        '增加猪崽
        newmyhua = ""
        zt = Split(myhua, "|")
        newmyhua = CLng(zt(0)) + 5 & "|"
        For I = 1 To 26
                newmyhua = newmyhua & zt(I) & "|"
        Next
        conn.Execute "update 用户 set pig='" & newmyhua & "' where 姓名='" & zhbg_name & "'"
        kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了猪崽卡<img src=card/zhuzai.JPG><bgsound src=mav/XL.MID loop=1>,得到了5头猪崽，快去养猪吧！</font>"
Case "种子卡"
    rs.close
    rs.Open "select hua from 用户 where  姓名='" & zhbg_name & "'", conn,2,2
    myhua = rs("hua")
    If myhua = "" or IsNull(myhua) Or InStr(myhua, "|") = 0 Then
                kapian = "<font color=green>【卡片】</font>##你并没有鲜花,不能使用种子卡，请去开垦!"
                Exit Function
    End If
        zt = Split(myhua, "|")
        ub = UBound(zt)
        If ub <> 27 Then
                kapian = "<font color=green>【卡片】</font>##你的鲜花数据有问题，请重新开垦!"
                Exit Function
        End If
        '增加种子
        newmyhua = ""
        zt = Split(myhua, "|")
        newmyhua = CLng(zt(0)) + 5 & "|"
        For I = 1 To 26
                newmyhua = newmyhua & zt(I) & "|"
        Next
        conn.Execute "update 用户 set hua='" & newmyhua & "' where 姓名='" & zhbg_name & "'"
        kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了种子卡,得到了5颗花种，快去种花吧！</font>"
Case "种花卡"
    rs.close
    rs.Open "select hua from 用户 where  姓名='" & zhbg_name & "'", conn,2,2
    myhua = rs("hua")
    If myhua = "" Or IsNull(myhua) or InStr(myhua, "|") = 0 Then
                kapian = "<font color=green>【卡片】</font>##你并没有鲜花,不能使用种花卡，请去开垦!"
                Exit Function
    End If
        zt = Split(myhua, "|")
        ub = UBound(zt)
        If ub <> 27 Then
                kapian = "<font color=green>【卡片】</font>##你的鲜花数据有问题，请重新开垦!"
                Exit Function
        End If
        newmyhua = ""
        For I = 0 To 26
                If I >= 2 Then
                temp = Split(zt(I), ";")
                If CLng(temp(0)) > 0 And CLng(temp(0)) < 94 Then
                ss = CLng(temp(0)) + 5 & ";" & temp(1) & ";0"
                newmyhua = newmyhua & ss & "|"
                Else
                newmyhua = newmyhua & zt(I) & "|"
                End If
                Else
                newmyhua = newmyhua & zt(I) & "|"
                End If
        Next
        conn.Execute "update [用户] set hua='" & newmyhua & "' where 姓名='" & zhbg_name & "'"
        kapian="<font color=green>【卡片】<font color=" & saycolor & ">##使用了种花卡,真是爽啊，眼看着花迅速地上涨！</font>"
case else
	Response.Write "<script language=JavaScript>{alert('系统并没有["&fn1&"]这种卡片,或不能使用你搞错了！');}</script>"
	Response.End
end select
'删除自己卡片，记录
conn.execute "update 用户 set w5='"&mycard&"' where  姓名='"&zhbg_name&"'"
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& to1 &"','操作','"& fn1 & "')"
set rs=nothing	
conn.close
set conn=nothing
end function
'免税卡
function mhk(to1)
  Set conn=Server.CreateObject("ADODB.CONNECTION")
  Set rs=Server.CreateObject("ADODB.RecordSet")
  conn.open Application("zhbg_usermdb")
  rs.open "select w5 from 用户 where 姓名='"&to1&"'",conn,2,2
	if iswp(rs("w5"),"免税卡")=0 then
		rs.close
	    mhk="ok"
	    exit function
	else
		tocard=abate(rs("w5"),"免税卡",1)
		conn.execute "update 用户 set w5='"&tocard&"' where  姓名='"&to1&"'"
	   'mhk="<br><font color=green>【免税卡】</font>"&to1&"身上的免税卡生效,因此不能抓他!"
	   mhk="<img src=card/mhk.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"正准备喜滋滋的从"&to1&"的口袋中拿钱,就在此时,"&to1&"掏出身上的免税卡说,慢着,我身上有免税卡,嘿嘿!"
	  end if
	  rs.close
	  conn.close
	  set rs=nothing
	  set conn=nothing
end function
'免罪卡
function mzk(to1)
  Set conn=Server.CreateObject("ADODB.CONNECTION")
  Set rs=Server.CreateObject("ADODB.RecordSet")
  conn.open Application("zhbg_usermdb")
  rs.open "select w5 from 用户 where 姓名='"&to1&"'",conn,2,2
	if iswp(rs("w5"),"免罪卡")=0 then
		rs.close
	    mzk="ok"
	    exit function
	else
		tocard=abate(rs("w5"),"免罪卡",1)
		conn.execute "update 用户 set w5='"&tocard&"' where  姓名='"&to1&"'"
	   'mzk="<br><font color=green>【免罪卡】</font>"&to1&"身上的免罪卡生效,因此不能抓他!"
	   mzk="<img src=card/myk.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&"官府的人准备用根铁索套在"&to1&"的脖子上,就在此时,"&to1&"掏出身上的免罪卡说,慢着,我身上有免罪卡,嘿嘿!</font>"
	end if
	  rs.close
	  conn.close
	  set rs=nothing
	  set conn=nothing
end function
'清醒卡
function qxk(to1)
  Set conn=Server.CreateObject("ADODB.CONNECTION")
  Set rs=Server.CreateObject("ADODB.RecordSet")
  conn.open Application("zhbg_usermdb")
  rs.open "select w5 from 用户 where 姓名='"&to1&"'",conn,2,2
	if iswp(rs("w5"),"清醒卡")=0 then
		rs.close
	    qxk="ok"
	    exit function
	else
		tocard=abate(rs("w5"),"清醒卡",1)
		conn.execute "update 用户 set w5='"&tocard&"' where  姓名='"&to1&"'"
	   qxk="><img src=card/mhk.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"拿出水晶球，睡吧，睡吧，在催眠……"&to1&"睁着个大眼睛，傻嘻嘻的看着他……在说我吗？"&to1&"掏出身上的清醒卡,慢着,我身上有清醒卡,嘿嘿!"
	  end if
	  rs.close
	  conn.close
	  set rs=nothing
	  set conn=nothing
end function
'免踢卡
function mtk(to1)
  Set conn=Server.CreateObject("ADODB.CONNECTION")
  Set rs=Server.CreateObject("ADODB.RecordSet")
  conn.open Application("zhbg_usermdb")
  rs.open "select w5 from 用户 where 姓名='"&to1&"'",conn,2,2
	if iswp(rs("w5"),"免踢卡")=0 then
		rs.close
	    mtk="ok"
	    exit function
	else
		tocard=abate(rs("w5"),"免踢卡",1)
		conn.execute "update 用户 set w5='"&tocard&"' where  姓名='"&to1&"'"
	   mtk="<img src=card/mhk.jpg></td><td><font color=green><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&zhbg_name&"使出国产臭脚，准备来个国际行动，却不小心踢到石头……"&to1&"在一边嘿嘿的笑，就你呀，还要踢我，再来20年……"
	  end if
	  rs.close
	  conn.close
	  set rs=nothing
	  set conn=nothing
end function
'万能卡
function wnk(to1)
  Set conn=Server.CreateObject("ADODB.CONNECTION")
  Set rs=Server.CreateObject("ADODB.RecordSet")
  conn.open Application("zhbg_usermdb")
  rs.open "select w5 from 用户 where 姓名='"&to1&"'",conn,2,2
	if iswp(rs("w5"),"万能卡")=0 then
		rs.close
	    wnk="ok"
	    exit function
	else
		tocard=abate(rs("w5"),"万能卡",1)
		conn.execute "update 用户 set w5='"&tocard&"' where  姓名='"&to1&"'"
	   wnk="<img src=card/wangneng.jpg></td><td><font color=green style='font-size=9pt'><bgsound src=wav/003.mid loop=1>【卡片】<font color=" & saycolor & ">"&to1&"在一边嘿嘿的笑，就你呀，万能卡，万能卡，一卡在手，走遍天下……"
	  end if
	  rs.close
	  conn.close
	  set rs=nothing
	  set conn=nothing
end function
%>