📄 admin_massage.asp
字号:
<!--#include file="conn_db.asp"-->
</script>
<link rel="stylesheet" href="style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<%if session("newsyhm")="" then%>
<script language="javascript">
alert("还没有登陆!");
window.location="cm86login.asp";
</script>
<%end if
' 按所选择的文章ID号删除文章
if not IsEmpty(Request.Form("del")) then ' 如果选择了文章
if not IsEmpty(Request.Form("delete")) then ' 如果单击了删除按钮
' 根据所选文章的ID号执行删除操作
db.Execute "delete from article where ID = " & Request.Form("del")
end if
end if
%>
<html><head>
<title>删除公告</title>
</head><body>
<h4 align="center">删除公告</h4>
<center>
<FORM ACTION="" METHOD=POST>
<table width="464" border="1" bordercolor="#000000" style="border-collapse: collapse" cellpadding="0" cellspacing="0">
<tr align="center">
<td width="37" bgcolor="#C0C0C0">选择</td>
<td width="37" bgcolor="#C0C0C0">序号</td>
<td width="224" bgcolor="#C0C0C0">标题</td>
<td width="80" bgcolor="#C0C0C0">作者</td>
<td width="74" bgcolor="#C0C0C0">发言时间</td>
</tr>
<%
dim sql,rs
sql="select * from article where layer=1 order by submit_date desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,db,1
if not rs.bof and not rs.eof then
dim page_size
dim page_no
dim page_total
page_size=6
if Request("page_no")="" then
page_no=1
else
page_no=Request("page_no")
end if
session("page_no")=page_no
rs.pagesize=page_size
page_total=rs.pagecount
rs.absolutepage=page_no
dim i,j
i=0
j=page_size
do while not rs.eof and j>0
i=i+1
j=j-1
%>
<tr align="center">
<td width="37"><input type=radio name=del value=<%=rs("ID")%>><td width="37">
<%=(page_no-1)*page_size+i%> <td width="224"><a href="hit_num.asp?id=<%=rs("id")%>"><%=rs("title")%></a> </td>
<td width="80"><%=rs("name")%> </td>
<td width="74"><%=rs("submit_date")%> </td>
</tr>
<%
rs.movenext
loop
end if
%>
</table>
<p align="center">
[本页是第<%=page_no%>/<%=page_total%>页]
<% if int(page_no)>1 then %>
[<a href="sdbbsindex.asp?page_no=<%=cstr(int(page_no)-1)%>">上一页</a>]
<% end if%>
<% if int(page_no)<int(page_total) then %>
[<a href="admin.asp?page_no=<%=cstr(int(page_no)+1)%>">下一页</a>]
<%end if%><input type=submit name="Delete" value="删除"></p>
</FORM>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center">Copyright 2006-2008 http://cm86.vicp.net All Rights Reserved </p>
<p align="center"><font color="#E3E9F1" size="6" face="华文行楷">CM 新 闻 发 布 系 统 V 1。0</font> </p>
<p> </p>
</center>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -