?? listgonggao.asp
字號:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<link href="inc_style.css" rel="stylesheet" type="text/css">
<%
dim sql,rs,biaoti,neirong,Allrecord,Pagesize,Allpage,ThisPage,k
if request("page")="" then
ThisPage=1
else
ThisPage=request("page")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [gonggao] order by id"
rs.open sql,conn,1,1
rs.Pagesize=10
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
<p align="center"><img border="0" src="img/list_bo.gif" width="600" height="12"></p>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#CCCCCC" width="77%" height="26">
<tr>
<td width="99%" height="26" bgcolor="#FEEEBC">
<p align="center"><b>網(wǎng)站公告管理 <a href="addgonggao.asp"><u><font color="#FF0000">添加新公告</font></u></a></b></td>
</tr>
<tr>
<td width="99%" valign="top" height="24">
<b>記錄總數(shù)</b>:[共<%=Allrecord%>條公告]<table border="0" cellspacing="1" width="100%" height="24">
<%do while not rs.eof%>
<tr>
<td width="6%" height="24" style="border-bottom-style: solid; border-bottom-width: 1" bgcolor="#FFF9EE">
<p align="center"><b><font color="#808080"><%=k+1%></font></b></td>
<td width="62%" height="24" style="border-bottom-style: solid; border-bottom-width: 1" bgcolor="#FFF9EE"><A href="javascript:win=open('../gonggao.asp?id=<%=rs("id")%>','offer','width=560,height=450,status=no,menubar=yes,scrollbars=yes,top=0,left=0'); win.focus()"><FONT color=#000000><%=rs("biaoti")%></FONT></A></td>
<td width="6%" style="border-bottom-style: solid; border-bottom-width: 1" height="24" bgcolor="#FFF9EE">
<a href="editgonggao.asp?id=<%=rs("id")%>"><font color="#FF0000">修改</font></a></td>
<td width="22%" style="border-bottom-style: solid; border-bottom-width: 1" height="24" bgcolor="#FFF9EE">
<a onclick='{if(confirm("您確定刪除嗎?此操作將不能恢復!")){return true;}return false;}' href="delgonggao.asp?id=<%=rs("id")%>">
<font color="#FF0000">刪除</font></a></td>
</tr>
<%
k=k+1
rs.movenext
if k>=Pagesize then exit do
loop
%>
</table>
</td>
</tr>
<tr>
<td width="99%" valign="top" height="24">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="27">
<tr>
<td height="27" width="151" align="center" bgcolor="#FEEEBC">
共有 <font color="#CC5200"><%=Allrecord%></font> 條記錄</td>
<td width="181" align="center" bgcolor="#FEEEBC">
共 <font color="#CC5200"><%=Allpage%></font> 頁</td>
<td width="237" align="center" bgcolor="#FEEEBC">
現(xiàn)在是第
<font color="#CC5200"><%=ThisPage%></font> 頁</td>
<td width="200" align="center" bgcolor="#FEEEBC">
<%
if ThisPage<2 then
response.write "<font color=""#808080"">首頁</font> "
response.write "<font color=""#808080"">上一頁</font> "
else
response.write "<a href=?page=1>首頁</a> "
response.write "<a href=?page="&ThisPage-1&">上一頁</a> "
end if
if Allpage-ThisPage<1 then
response.write "<font color=""#808080"">下一頁</font> "
response.write "<font color=""#808080"">尾頁</font> "
else
response.write "<a href=?page="&(ThisPage+1)&">下一頁</a> "
response.write "<a href=?page="&Allpage&">尾頁</a> "
end if
%></td></tr></table></td>
</tr>
</table>
</div>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -