?? post.asp
字號:
<%
Response.Buffer =true
if not isarray(session("dv_user")) then
Response.Write "未登陸不能發(fā)言!"
Response.End
end if
dv_user=session("dv_user")
username=dv_user(0)
userline=dv_user(1)
sendtime=dv_user(2)
send_time=now()
if Instr(LCase(Application("onlinelist")),LCase(username&" "))=0 then
Response.Write "<script>alert('您與服務(wù)器斷開聯(lián)接,請刷新頁面!');</script>"
Response.End
end if
if datediff("s",sendtime,send_time)<3 then
Response.Write "<script>alert('兩次發(fā)言時間需間隔3秒!');</script>"
Response.End
end if
saystr=Request.Form ("post_msg")
towho=Request.Form ("towho")
addsays=Request.Form ("addsays")
addwordcolor=Request.Form ("addwordcolor")
sayscolor=Request.Form ("sayscolor")
towhoway=Request.Form ("towhoway")
gonggao=Request.Form ("gonggao")
if sayscolor="" or addwordcolor="" then Response.End
if towho<>"大家" then
if Instr(LCase(Application("onlinelist")),LCase(towho&" "))=0 then
Response.Write "<script>alert('"&towho&"目前己離開聊天室!');</script>"
response.end
end if
end if
if towhoway<>1 then towhoway=0
if gonggao<>1 then gonggao=0
if Instr(saystr,"[tu]")<>0 then
dim reg
set reg=new regexp
reg.IgnoreCase=true
reg.Global=true
reg.Pattern="(\[tu\])([1234567890])(\[\/tu\])"
saystr=reg.Replace(saystr,"<img src=logo/$2.gif>")
reg.Pattern="(\[tu\]1)([1234567890])(\[\/tu\])"
saystr=reg.Replace(saystr,"<img src=logo/1$2.gif>")
set reg=nothing
end if
if towhoway=1 and (towho="大家" or towho=username) then
Response.Write "<script>alert('不能對自己或大家私聊!');</script>"
Response.End
end if
act=0
if left(saystr,2)="//" then
act=1
saystr=mid(saystr,3,len(saystr))
addsays=0
else
if addsays="" then
addsays="對"
else
addsays=addsays&"對"
end if
end if
SayStr="parent.getmsg('"&username&"','"&towho&"','"&addsays&"','"&saystr&"','"&act&"','"&addwordcolor&"','"&sayscolor&"','"&towhoway&"','"&time()&"','"&gonggao&"');"
Application.Lock
sd=Application("chat_sd")
line=int(Application("chat_line"))
Application("chat_line")=line+1
Dim newsd(50)
j=1
for i=3 to 50 step 2
newsd(j)=sd(i)
newsd(j+1)=sd(i+1)
j=j+2
next
newsd(49)=line+1
newsd(50)=SayStr
Application("chat_sd")=newsd
Application.UnLock
sd=Application("chat_sd")
newuserline=0
for i=1 to 50 step 2
newuserline=sd(i)
if sd(i)>userline then
Response.Write "<script language=javascript>"&sd(i+1)&"</script>"
end if
next
dv_user(1) = newuserline
dv_user(2) = send_time
session("dv_user")=dv_user
Response.End
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -