📄 delete.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% response.buffer=false %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信息删除</title>
<link rel="stylesheet" href="../../Css/Style.css">
<script src="../../Js/Delete.js"></script>
</head>
<!-- #include file="../../Conn/conn.asp" -->
<%
sql="insert into tb_Log(Name,Content,IssueDate) values('"&session("Admin")&_
"','进行"&Request.QueryString("name")&"类新闻信息删除','"&Now()&"')"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../../Conn/conn.asp" -->
<%
If Request.QueryString("action")<>"" Then
names=Request.Form("deletes")
If Not Isnumeric(names) Then num=0 Else num=names End If
style=Request.QueryString("action")
If request.form("Submit22")="" Then
sql="select * from tb_News where (ID="&num&" or Title='"&names&_
"') and Style='"&style&"'"
rs.open sql,conn
If Not rs.Eof Or Not rs.Bof Then
Set rs=nothing
conn.close
Set conn=nothing
%>
<!-- #include file="../../Conn/conn.asp" -->
<%
sql="delete * from tb_News where (ID="&num&" or Title='"&names&_
"') and Style='"&style&"'"
rs.open sql,conn
Set rs=nothing
conn.close
Set conn=nothing
%>
<!-- #include file="../../Conn/conn.asp" -->
<%
sql="insert into tb_Log(Name,Content,IssueDate) values('"&_
session("Admin")&"','"&style&"新闻信息"&names&"删除成功','"&Now()&"')"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<script language="javascript">
alert("信息删除成功");
window.close();
opener.location.reload();
</script>
<%Else %>
<script language="javascript">
alert("您要删除的信息不存在");
history.back();
</script>
<%
Set rs=nothing
conn.close
Set conn=nothing
%>
<%End If%>
<%Else %>
<!-- #include file="../../Conn/conn.asp" -->
<%
sql="delete * from tb_News where Style='"&request.QueryString("action")&"'"
rs.open sql,conn
Set rs=nothing
conn.close
Set conn=nothing
%>
<script language="javascript">
alert("信息全部删除成功");
window.close();
opener.location.reload();
</script>
<%
End If
End If
%>
<% names=Request.QueryString("name") %>
<body topmargin="0" leftmargin="0">
<form name="form1" method="post" action="Delete.asp?action=<%=names%>">
<table width="420" height="100" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#f9f9f9" class="wenbenkuang">
<tr bgcolor="#214994">
<td height="20" colspan="2"><div align="center"><font color="#ffffff"><%=names%>删除</font></div></td>
</tr>
<tr>
<td width="95" height="51"><div align="right"><font color="#214994">新闻标题/ID:</font></div></td>
<td width="323"><input name="deletes" type="text" class="wenbenkuang" size="50"> </td>
</tr>
<tr>
<td height="27" colspan="2">
<div align="center">
<input name="Submit2" type="button" class="go-wenbenkuang3" value="删除" onClick="Delete()">
<input name="Submit22" type="submit" class="go-wenbenkuang3" value="删除全部">
<input name="Submit" type="button" class="go-wenbenkuang3" value="返回" onClick="javascript:window.close()">
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -