⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pros.asp

📁 asp构建网站bbs.采用B/S架构
💻 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&"&nbsp;&nbsp;&nbsp;&nbsp;["&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,"&","&amp;")
CovHtml=replace(CovHtml,"<","&lt;")
CovHtml=replace(CovHtml,">","&gt;")
CovHtml=replace(CovHtml,chr(34),"&quot;")
CovHtml=replace(CovHtml,chr(39),"&#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 + -