clearok.asp

来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 100 行

ASP
100
字号
<%@ LANGUAGE=VBScript%>
<%Server.ScriptTimeout=600
Response.Expires=0
if Session("a_c_user_name")="" then
 Response.write "<b>[操作失败]</b><p>您尚未登录(或已经超时退出),不能进行此操作!"
 Response.end
end if
if Session("a_c_user_level")<5 then
 Response.Write "<b>[操作失败]</b><p>您没有清屏操作的权限!"
 Response.End
end if
if NOT(Session("a_c_user_name")="聊天室管理员" or Session("a_c_user_outchat")=0) then
 Response.Write "<b>[操作失败]</b><p>你不在聊天室中,不能清屏!"
 Response.End
end if
clearwhy=server.HTMLEncode(Trim(Request.Form("clearwhy")))
if clearwhy="" then
 Response.write "<b>[操作失败]</b><p>"
 Response.write "  请输入原因,否则不能执行清屏操作! <a href=javascript:history.go(-1)>【返回】</a>"
 Response.end
end if
if len(clearwhy)>100 then clearwhy=left(clearwhy,100)
dim all_saysdata(400)
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 = s & ":" & f & ":" & m
sj2= n & "-" & y & "-" & r & " " & sj
all_saysdata(1) = 1
all_saysdata(2) = 0
all_saysdata(3) = Session("a_c_user_name")
all_saysdata(4) = "大家"
all_saysdata(5) = "660099"
all_saysdata(6) = "660099"
all_saysdata(7) = "对"
all_saysdata(8) = "<font color=000000>【清屏】</font><font color=FF0000>" & Session("a_c_user_name") & "</font><font color=8800FF>飞舞着大刷子打扫卫生……〖原因:" & clearwhy & "〗</font><font class=p9>(" & sj & ")</font>"
for j=9 to 400
 all_saysdata(j) = ""
next
Application.Lock
Application("a_c_all_title") = "<font color=0000FF>欢迎光临" & Application("a_c_chatroom_name") & ",祝你聊得开心!</font>"
Application("a_c_all_saysdata") = all_saysdata
Application.UnLock
cpcz=sj2 & " " & Session("a_c_user_name") & "(" & Request.ServerVariables("REMOTE_ADDR") & ") 执行清屏操作!【原因:" & clearwhy & "】(" & Application("a_c_user_inthechat") & "人)"
dim log()
logfile=server.mappath("logdata.asp")
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(logfile,1,False)
countlog = 0
do while not thisfile.AtEndOfStream
 thisline = thisfile.readline
 Redim preserve log(countlog)
 log(countlog) = thisline
 countlog = countlog + 1
loop
thisfile.Close
Set outfile = fs.CreateTextFile(logfile)
outfile.WriteLine log(0)
outfile.WriteLine cpcz
if countlog>500 then countlog=500
for i=1 to countlog-1
 outfile.WriteLine log(i)
next%><html>
<head>
<title>清屏操作</title>
<style type='text/css'>
<!--
.p9 {line-height: 150%; font-size: 9pt;}
.p12 {line-height: 150%; font-size: 12pt;}
body {line-height: 150%;font-size : 12pt;}
A  {text-decoration: none;}
A:Hover  {text-decoration : none;}
a:visited {  color: #0000FF}
-->
</style>
</head>
<body bgcolor="FFFFFF">
<h1 align="center"><font color="0099FF">【清屏操作】</font></h1>
<div align="center"></div>
<hr noshade size="1" color=009900>
<p><b>[清屏操作完成]</b></p>
<p>您刚才的操作已经被记录在“聊务公开”栏中,以供聊友监督:<a href="javascript:history.go(-2)">【返回】</a></p>
<blockquote>
<p><span class="p9"><font color="FF0000"><%=cpcz%></font></span></p>
</blockquote>
<p>本功能用于下述情况:</p>
<blockquote> 
<p class="p9">有网友在聊天室中贴了不雅的内容,或有人故意捣乱,此时就可以使用本功能将屏幕内容全部清除。但请勿随意使用本功能。</p>
</blockquote>
<hr noshade size="1" color=009900>
<div align="center" class="p9"><script src="use.asp"></script> <script src="sn.asp"></script><br><script src="copyright.asp"></script></div>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?