📄 closedb.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--include file="opendb.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
id=request.QueryString("index")
strsql="select Username from forum where id=" Í
rst.cursortype=3
rst.open strsql
if rst.recordcount>0 then
author=rst("Username")
end if
%>
<%
if session("Username")<>author and session("username")<>"admin" then%>
<script language="vbscript">
msgbox"只有管理员或帖子的所有这才可以删除该贴子",48,"无权限删除该贴子"
window.localtion="index.asp"
</script>
<%else%>
<%
strsql="delete from forum where id='"+id"'"
my_conn.execute strsql
%>
<%end if%>
<script language="vbscript">
msgbox"贴子已删除",48,"删除成功"
window.location="index.asp"
</script>
</body>
</html>
<!--include file="closedb.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -