?? pros.asp
字號:
<!--#include file="path.asp"-->
<!--#include file="inc.asp"-->
<%
if request("action")="close" then
Response.Cookies("chat")="close"
Response.Cookies("chat").expires=date()+9999
Response.Cookies("chat").path="/"
Response.Redirect("index1.asp")
end if
if request("action")="open" then
Response.Cookies("chat")="open"
Response.Cookies("chat").expires=date()+9999
Response.Cookies("chat").path="/"
Response.Redirect("index1.asp")
end if
Session("username"&forum_sn)=lgname&Application("count_id"&forum_sn)
if Session("username"&forum_sn)="" or Session("username"&forum_sn)="%游客%" then
response.write "<html><script>alert(""游客不能說話,請先登陸或者注冊!"");parent.sendm.location=(""" & "sendm.asp?message=" & message & """)</script></html>"
response.end
end if
if Session("username"&forum_sn)="" then
Session("username"&forum_sn)="%游客%"&Application("count_id"&forum_sn)
end if
if request("message")<>"" then
dim message,i,msgs,newmsgs,ti
message=CovHtml(request("message"))
if DateDiff("s",Session("lsmt"),now())>=5 then
Application.lock
msgs=Application("messagef"&forum_sn)
msgs=split(msgs,vbcrlf)
if ubound(msgs)<=30 then
si=ubound(msgs)
else
si=30
end if
for i=si to 0 step -1
if i>ubound(msgs) then
exit for
end if
newmsgs=msgs(i)&vbcrlf&newmsgs
next
ti=date+time
Application("messagef"&forum_sn)=Session("username"&forum_sn)&": "&message&" ["&ti&"]"&"<br>"&vbcrlf&newmsgs
Application.unlock
Session("lsmt")=now
response.write "<html><script>parent.showmsg.location.href='showmsg.asp';parent.sendm.location=(""" & "sendm.asp?message="")</script></html>"
else
response.write "<html><script>alert(""離下次說話還需要" & 5-DateDiff("s",Session("lsmt"),now()) & "秒"");parent.sendm.location=(""" & "sendm.asp?message=" & message & """)</script></html>"
response.end
end if
end if
function CovHtml(content)
ON ERROR RESUME NEXT
CovHtml=content
if not isnull(content) then
CovHtml=replace(CovHtml,"&","&")
CovHtml=replace(CovHtml,"<","<")
CovHtml=replace(CovHtml,">",">")
CovHtml=replace(CovHtml,chr(34),""")
CovHtml=replace(CovHtml,chr(39),"'")
end if
if Err.Number <>0 then
CovHtml= "CovHtml轉換中出錯請聯系管理員<br>"
Err.Clear
end if
end function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -