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

📄 message_del.asp

📁 WAP网上购物系统源程序,,有兴趣的朋友,一起研究一下..交流经眼
💻 ASP
字号:
<!--#include file=INC/skin.asp-->

<%
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 web_end
sub main
	If const_forum_login_limit=1	Then	'留言登录查看限制
		If session("username")="" Then
			errstr="<li>当前Wap影音状态已经设置为<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>当前Wap影音状态已经设置为<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>当前Wap影音状态已经设置为<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")&"'"">&nbsp;&nbsp;&nbsp;&nbsp;<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='message_show.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 + -