📄 manlydel.asp
字号:
<%@ codepage ="936" %>
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
Sub Msg (v)
Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
Response.Write "<script Language=JavaScript>alert('" & v & "');window.close();</script></body></html>"
Response.End
End Sub
nickname=Session("hxf_u_nickname")
grade=Int(Session("hxf_u_grade"))
userip=Request.ServerVariables("REMOTE_ADDR")
if nickname="" then Msg "不在聊天室中,不能删除留言。"
If grade <> 12 Then
qx = Split(Application("wsaxhxf_c_grade" & grade), "{]")
If qx(14) <> "1" Then Msg "你没有删除留言的权限。"
Else
f3 = LCase(Trim(Request.QueryString("log")))
End If
id=Request.QueryString("id")
If id = "" Then Msg "必须指定留言 ID 。"
If Not IsNumeric(id) Then Msg "指定留言 ID 不得为空。"
id = Int(id)
If id < 0 Then Msg "必须指定留言 ID 。"
f2 = Trim(Request.QueryString("why"))
If f2 = "" Then Msg "必须填写删除留言的理由。"
If Len(f2) > 50 Then f2 = Left(f2, 50)
f2 = Replace(f2, Chr(13) & Chr(10), "")
f2 = Server.HTMLEncode(f2)
f2 = Replace(f2, "\", "\\")
f2 = Replace(f2, "/", "\/")
f2 = Replace(f2, "'", "\'")
f2 = Replace(f2, Chr(34), "\" & Chr(34))
f2 = Replace(f2, "'", "''")
If f3 <> "no" Then f3 = "yes"
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
t=s & ":" & f & ":" & m
sj=n & "-" & y & "-" & r & " " & t
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql="SELECT id,fromwho,towho,writetime,title FROM gbook WHERE id=" & id
rs.open sql,conn,1,1
if rs.Eof and rs.Bof then
rs.close
set rs=nothing
set conn=nothing
Msg "指定留言 ID 不存在。"
end if
showid=rs("id")
showfromwho=rs("fromwho")
showtowho=rs("towho")
showwrite=rs("writetime")
showtitle=rs("title")
rs.close
set rs=nothing
sql="DELETE FROM gbook WHERE id=" & id
conn.Execute(sql)
If f3 = "yes" Then
sql = "INSERT INTO logs (type, logtime, name, ip, opertion) VALUES ('0', '" & sj & "', '" & nickname & "', '" & userip & "', '删除ID为 <font color=red>" & showid & "</font> 的留言!<br><font color=009900>[" & showwrite & "]</font>书写人: <font color=red>" & showfromwho & "</font> 接收者:<font color=red>" & showtowho & "</font> 留言标题:<font color=red>" & showtitle & "</font><br><font color=green>【原因:" & f2 & "】</font>')"
conn.Execute sql
End if
conn.close
set conn=nothing
delok = "■ 操作完成 ■\n\n删除ID为 " & showid & " 的留言!"
Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
Response.Write "<script Language=JavaScript>alert('" & delok & "');window.close();</script></body></html>"
Response.End
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -