📄 delmessage.asp
字号:
<!--#include file=../INC/txlconst.asp-->
<!--#include file=../INC/txlfun.asp-->
<!--
<pre>
┌─ 自由领域ASP+WAP同学录系统 ─────────────────┐
│ │
│ 感谢你使用 自由领域ASP+WAP同学录系统(测试版) │
│ 使用本免费源码您必须遵守以下规定 │
│ 不得公开发表代码 不得用做商业用途,不得向其他使用者收费。 │
│ │
│ 使用时,请保留此段信息,谢谢配合 │
│ │
│ 2004/12/19 │
│ │
└──────────────── http://99167.jahee.com ───┘
</per>
-->
<%
Dim const_txl_HomeUrl,id
Dim tmpstr
const_txl_HomeUrl="../"
id=Request.QueryString("id")
call OpenDatabase
call online
call txl_SiteHead(const_txlname&"-班级留言-删除操作")
Call main()
Response.Flush()
call CloseDatabase
call SiteBottom
sub main
If const_forum_login_limit=1 Then '留言登录查看限制
If session("username")="" Then
errstr="<li>当前同学录状态已经设置为<font color=red>班级留言只有登录之后才能看到</font>!</li>"
errstr=errstr&"<li>你现在还没有登录或者会话超时,点<a href='../user/login.asp'>这里登录</a>!</li>"
errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
Call printerror("查看班级留言出错!",errstr,779)
Exit Sub
End If
ElseIf const_forum_login_limit=2 Then
If session("username")="" Then
errstr="<li>当前同学录状态已经设置为<font color=red>班级留言只有班级成员和嘉宾有查看权限</font>!</li>"
errstr=errstr&"<li>你现在还没有登录或者会话超时,点<a href='../user/login.asp'>这里登录</a>!</li>"
errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
Call printerror("查看班级留言出错!",errstr,779)
Exit Sub
End If
If not (session("usertype")=3 or session("usertype")=4) Then
errstr="<li>当前同学录状态已经设置为<font color=red>班级留言只有班级成员和嘉宾有查看权限</font>!</li>"
errstr=errstr&"<li>你目前的身份没有该权限!</li>"
errstr=errstr&"<li>如果还有疑问请与管理员联系!</li>"
Call printerror("查看班级留言出错!",errstr,779)
Exit Sub
End If
End If
dim rs,flag
flag=false
If id="" or (not isnumeric(id)) Then
Call printerror ("删除班级留言出错!","<li>请不要传递非法的参数</li>",779)
exit sub
End if
set rs=conn.execute ("select studentid from forum where id="&id)
If rs.eof then
Call printerror ("删除班级留言出错!","<li>不存在标号为<font color=red>"&id&"</font>的留言!</li>",779)
exit sub
End IF
If rs("studentid")=Session("username") Then flag=true
rs.close
set rs=nothing
IF session("adminname")<>"" Then flag=true
If not flag Then
Call printerror ("删除班级留言出错!","<li>此功能只有管理员和留言发布者有权限!</li>",779)
exit sub
End If
If Request("queren")<>"true" Then
Response.write "<div align=center><br><font color=red>本操作正在删除班级留言,且不可恢复。你确实要进行该操作吗?<br>请点击下面的“确定”按钮继续执行操作,点击“取消”来撤消本次操作。</font><br><br>"
Response.write "<input type=button value='确定' onclick=""javascript:window.location.href='?action=del&id="&id&"&queren=true&url="&Request.ServerVariables("HTTP_REFERER")&"'""> <input type=button value='取消' onclick='javascript:history.back()'><br><br></div>"
Else
conn.Execute ("delete from forum where ID="&id)
tmpstr="<li>已经成功删除标号为"&id&"的留言!</li>"
tmpstr=tmpstr&"<li>回<a href='showmessage.asp'>班级留言首页</a>!</li>"
tmpstr=tmpstr&"<li>回<a href='"&Request("url")&"'>刚删除页面</a>!</li>"
Call printsuc("删除班级留言成功!",tmpstr,779)
End IF
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -