<!--#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 [jle_gonggao] order by data  desc"
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
%>

<style type="text/css">
<!--
body {
	background-color: #E7EEF5;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><div align="center">
   <table width="88%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">

<tr bgcolor="#B6EBC4">
        <td width="99%" height="26" bgcolor="#C5D5E4">
      <p align="center"><b>网站公告管理&nbsp; <a href="addgonggao.asp"><u><font color="#FF0000">添加新公告</font></u></a></b></td>
     </tr>
      <tr>
        <td width="99%" height="24" valign="top" bgcolor="#EAEFF4">
        <b>记录总数</b>:[共<%=Allrecord%>条公告]
      <table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">

     <%do while not rs.eof%>
   <tr bgcolor="#B6EBC4">

            <td width="6%" height="24"  bgcolor="#D8E1EB">
            <p align="center"><b><font color="#808080"><%=k+1%></font></b></td>
            <td width="62%" height="24" bgcolor="#D8E1EB" style=" bgcolor="#D8E1EB"><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>[<%=rs("data")%>]</td>
            <td width="6%"  height="24" bgcolor="#D8E1EB">
            <a href="editgonggao.asp?id=<%=rs("id")%>"><font color="#FF0000">修改</font></a></td>
            <td width="22%"  height="24" bgcolor="#D8E1EB">
            <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%" height="24" valign="top" bgcolor="#EAEFF4">
		 <table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">

  
   <tr bgcolor="#B6EBC4">

<td height="27" width="151" align="center" bgcolor="#C5D5E4">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td width="181" align="center" bgcolor="#C5D5E4">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td width="237" align="center" bgcolor="#C5D5E4">
现在是第 
                <font color="#CC5200"><%=ThisPage%></font> 页</td>
<td width="200" align="center" bgcolor="#C5D5E4">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1>首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&">尾页</a>&nbsp;"     
end if
%></td></tr></table></td>
      </tr>
  </table>
</div>
<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>