📄 webicqsend.asp
字号:
<%@ codepage ="936" %>
<%Response.Buffer = True
Response.Expires = 0
Response.CacheControl = "Private"
Sub Msg(v)
bgcolor="#DCD8D0"
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><body bgcolor="& bgcolor &" text=#000000>"
Response.Write "<script Language=JavaScript>"
Response.Write "alert('" & v & "');history.go(-1);"
Response.Write "</script>"
Response.End
End Sub
cahb=Int(Application("wsaxhxf_c_call"))
useronlinename=Application("wsaxhxf_c_useronlinename")
nickname=Session("hxf_u_nickname")
hb=Int(Session("hxf_u_hb"))
if hb<cahb then Msg "您的货币不足,不能发送传呼。\n\n此功能需要货币" & cahb & "¥。"
if nickname="" or Session("hxf_u_inthechat")<>"1" or Instr(useronlinename," "&nickname&" ")=0 then Msg "您不在聊天室内,不能发传呼。"
towho=Trim(Request.Form("towho"))
if Instr(useronlinename," "&towho&" ")=0 then Msg "" & towho & "不在聊天室内,不能给他发传呼"
intro=Trim(Request.Form("intro"))
if intro="" then Msg "消息不能为空"
intro=Replace(intro,"<br>",chr(13)&chr(10))
intro=server.HTMLEncode(intro)
intro=Replace(intro,chr(13)&chr(10),"<br>")
if len(intro)>1024 then Msg "消息长度不能超过1024字节"
if Instr(intro,"<br><br><br>")<>0 then Msg "消息长度不能超过1024字节"
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
Session("hxf_u_lasttime")=sj
wbq=Application("wsaxhxf_c_webicq")
wbqub=UBound(wbq)
if wbqub>0 then
Dim wbqnew()
j=1
for i=1 to wbqub step 4
if DateDiff("n",wbq(i),sj)<=10 then
Redim Preserve wbqnew(j),wbqnew(j+1),wbqnew(j+2),wbqnew(j+3)
wbqnew(j)=wbq(i)
wbqnew(j+1)=wbq(i+1)
wbqnew(j+2)=wbq(i+2)
wbqnew(j+3)=wbq(i+3)
j=j+4
end if
next
if j>=4 then
wbq=wbqnew
else
Dim wbqnull(0)
wbq=wbqnull
end if
wbqub=UBound(wbq)
end if
Redim Preserve wbq(wbqub+1),wbq(wbqub+2),wbq(wbqub+3),wbq(wbqub+4)
wbq(wbqub+1)=sj
wbq(wbqub+2)=towho
wbq(wbqub+3)=nickname
wbq(wbqub+4)=intro
wbqub=wbqub+4
webicqname=""
for i=1 to wbqub step 4
webicqname=webicqname & " " & wbq(i+1)
next
webicqname=webicqname&" "
Application.Lock
Application("wsaxhxf_c_webicq")=wbq
Application("wsaxhxf_c_webicqname")=webicqname
Application.UnLock
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql="SELECT hb FROM reginfo WHERE kill='0' and username='" & nickname & "'"
rs.open sql,conn,1,3
if Not(rs.Eof and rs.Bof) then
rs("hb")=rs("hb")-cahb
Session("hxf_u_hb")=rs("hb")
rs.Update
rs.close
sql = "SELECT value FROM system WHERE name='chatmoney'"
rs.open sql, conn, 1, 3
chatmoney = Int(rs("value")) + cahb
rs("value") = chatmoney
rs.Update
rs.Close
Application.Lock
Application("wsaxhxf_c_chatmoney") = chatmoney
Application.UnLock
end if
conn.close
set rs=nothing
set conn=nothing
Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
Response.Write "<script Language=JavaScript>alert('操作完成,您还剩货币 "&Session("hxf_u_hb")&"¥\n\n消息已经发送出,请点查看检查对方是否收到');top.window.close();</script></body></html>"
Response.End%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -