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

📄 speakdel.asp

📁 聊天室源码呵呵你好用~~~~~~2.0版本
💻 ASP
字号:
<%@ 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")<9 then
 Response.write "<b>[操作失败]</b><p>您没有管理留言簿的权限!"
 Response.end
end if
n=Request.QueryString("n")
t=Request.QueryString("t")
lyfile = server.mappath("speakdata_v200.asp")
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(lyfile,1,False)
dim delly()
do while not thisfile.AtEndOfStream
 thisline = thisfile.readline
 Redim preserve delly(countly)
 delly(countly) = thisline
 countly = countly + 1
loop
thisfile.Close
cz=0
for i=1 to countly-1 step 11
 if delly(i+3)=n and delly(i+5)=t then
  cz=1
  ll=int(i/11)+1
  lln=n
  llto=delly(i+1)
  exit for
 end if
next
if cz=0 then
 Response.Write "<br><br><br><p align=center>找不到要删除的留言,不能删除</p>"
 Response.Write "<p align=center><a href=Javascript:history.go(-1)>点击此处返回</a></p>"
 Response.end
end if
dim new_index()
newjs=1
Set outfile = fs.CreateTextFile(lyfile)
outfile.WriteLine delly(0)
for i=1 to countly-1 step 11
 if NOT(delly(i+3)=n and delly(i+5)=t) then
  Redim Preserve new_index(newjs),new_index(newjs+1),new_index(newjs+2)
  new_index(newjs)=delly(i)
  new_index(newjs+1)=delly(i+1)
  new_index(newjs+2)=delly(i+3)
  newjs=newjs+3
  outfile.WriteLine delly(i)
  outfile.WriteLine delly(i+1)
  outfile.WriteLine delly(i+2)
  outfile.WriteLine delly(i+3)
  outfile.WriteLine delly(i+4)
  outfile.WriteLine delly(i+5)
  outfile.WriteLine delly(i+6)
  outfile.WriteLine delly(i+7)
  outfile.WriteLine delly(i+8)
  outfile.WriteLine delly(i+9)
  outfile.WriteLine delly(i+10)
 end if
next
outfile.close
Application.Lock
if newjs=1 then
Application("a_c_ly_num")=0
else
Application("a_c_ly_num")=UBound(new_index)
end if
Application("a_c_ly_index")=new_index
Application.Unlock
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
lydelete=sj2 & " " & Session("a_c_user_name") & "(" & Request.ServerVariables("REMOTE_ADDR") & ") 删除第 " & ll & " 条 " & lln & " 给 " & llto & " 的留言!"
dim log()
logfile=server.mappath("logdata.asp")
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 lydelete
if countlog>500 then countlog=500
for i=1 to countlog-1
 outfile.WriteLine log(i)
next
outfile.Close
set fs=nothing%><html><title>删除留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td {  font-family: "宋体"; font-size: 9pt}
.p9 {  font-family: "宋体"; font-size: 9pt; line-height: 150%}
.p12 {  font-family: "宋体"; font-size: 12pt; line-height: 150%}
.p150 {  line-height: 150%}
a:hover {  color: #FF0000; text-decoration: none}
a:link {  color: #0000FF; text-decoration: none}
a:active {  color: #000000; text-decoration: none}
a:visited {  color: #0000FF; text-decoration: none}
-->
</style>
<body bgcolor="#FFFFFF">
<b>[删除留言完成]</b> 
<p>您刚才的操作已经记入“聊务公开”栏,供聊友监督:</p>
<blockquote> 
<p class="p9"><font color="FF0000"><%=lydelete%></font></p>
<p><a href="javascript:history.go(-1)">【返回】</a></p>
</blockquote>
</body>
</html>

⌨️ 快捷键说明

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