closedb.asp

来自「网易论坛 发表新贴子」· ASP 代码 · 共 38 行

ASP
38
字号
<%@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=" &Iacute;
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 + =
减小字号Ctrl + -
显示快捷键?