📄 gonggao_gl.asp
字号:
<!--#include file=conn.asp-->
<!--#include file=checkuser.asp-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>吻宇考试管理系统</title>
<style type="text/css">
<!--
body {
background-color: #EFF8FE;
}
body,td,th {
font-size: 12px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
<script language="vbscript">
sub del(id)
if confirm("你真的要删除此条公告吗~?") then
window.location.href"gonggao_del.asp?id="&id
end if
end sub
</script>
</head>
<body>
<table width="0" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#67B0ED">
<tr>
<td colspan="3" bgcolor="#EFF8FE"><div align="center">公告管理</div></td>
</tr>
<tr>
<td width="379" bgcolor="#EFF8FE"><div align="center">公告主题</div></td>
<td width="33" bgcolor="#EFF8FE"><div align="center">修改</div></td>
<td width="29" bgcolor="#EFF8FE"><div align="center">删除</div></td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from gonggao order by id DESC"
rs.open sql,conn,1,1
pagesize=20
page=clng(request.querystring("page"))
if page<1 then
page=1
elseif page>rs.pagecount then
page=pagecount
end if
if not rs.eof then
rs.movefirst
rs.absolutepage=page
for i=1 to pagesize
id=rs("id")
title=rs("title")
%>
<tr>
<td bgcolor="#EFF8FE"><div align="left"><%=title%></div></td>
<td bgcolor="#EFF8FE"><div align="center"><a href="gonggao_xg.asp?id=<%=id%>">修改</a></div></td>
<td bgcolor="#EFF8FE"><div align="center"><a href="#" onclick="call del(<%=id%>)">删除</a></div></td>
</tr>
<%RS.MOVENEXT
if rs.eof then
exit for
end if
next
else
response.write"对不起~!暂时没有数据~!"
end if
%>
<tr>
<td colspan="3" bgcolor="#EFF8FE"><table width="455">
<tr>
<td width="260">总公告数:<%=rs.recordcount%> 总页数:<%=rs.pagecount%> 当前页面:<%=page%>/<%=rs.pagecount%></td>
<td width="183">|<a href="gonggao_gl.asp">首页</a>|<a href="gonggao_gl.asp?<%=page-1%>">上一页</a>|<a href="gonggao_gl.asp?<%=page+1%>">下一页</a>|<a href="gonggao_gl.asp?<%=rs.pagecount%>">最后一页</a></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -