⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listgonggao.asp

📁 个人网站系统,本人基于第三方源码进行更改!
💻 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>网站公告管理&nbsp; <a href="addgonggao.asp"><u><font color="#FF0000">添加新公告</font></u></a></b></td>
      </tr>
      <tr>
        <td width="99%" valign="top" height="24">
        <b>记录总数</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">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td width="181" align="center" bgcolor="#FEEEBC">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td width="237" align="center" bgcolor="#FEEEBC">
现在是第 
                <font color="#CC5200"><%=ThisPage%></font> 页</td>
<td width="200" align="center" bgcolor="#FEEEBC">
<%
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
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -