www.gusucode.com > 枫的记忆个人主页程序源码程序 > downcode.com\fengdejiyizh\admin\manage_news.asp
<link href="admin.css" rel="stylesheet" type="text/css"> <% if session("level")<>"1" then Response.Write("你无权访问此页面!") Response.End end if %> <!--#INCLUDE FILE="conn.asp"--> <% set rs=server.createobject("adodb.recordset") sql="select * from news order by id desc" rs.Open sql,conn,1,3 PageSize=12 %><!--#INCLUDE FILE="page_up_down.asp"--> <body bgcolor="#CDD5DE"> <table width="95%" border="0" cellspacing="1" cellpadding="0" align="center" class="tablebody"> <tr> <td><table width="100%" border="0" cellpadding="5" cellspacing="0"> <tr> <th>文 章 管 理</a></span></th> </tr> </table></td> </tr> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="5"> <tr align="center" bgcolor="#A5B3C2"> <td>编 号</td> <td>名 称</td> <td>类 型</td> <td>来 自</td> <td>操 作</td> </tr> <% if rs.eof then response.write ("<tr><td bgcolor='#F3F5F8' colspan='5'>对不起,没有任何数据!</td></tr>") else do while not rs.eof if processedrecord >=pagesize then exit do end if id=rs("id") n_type=rs("n_type") title=rs("title") n_from=rs("n_from") %> <tr bgcolor="#F3F5F8"> <td width="10%" align="center"><%=id%></td> <td width="35%"><%=title%></td> <td width="15%" align="center"><%=n_type%></td> <td width="15%" align="center"><%=n_from%></td> <td width="25%" align="center"><a href="change_news.asp?id=<%=id%>"><img src="images/mod.gif" width="45" height="20" border="0" align="absmiddle"></a> <a href="del_news.asp?id=<%=id%>"><img src="images/delete.gif" width="45" border="0" height="20" align="absmiddle"></a></td> </tr> <% processedrecord=processedrecord+1 rs.movenext loop end if rs.close set rs=nothing %> </table></td> </table> <table width="75%" border="0" cellspacing="1" cellpadding="1" align="center"> <form action="manage_news.asp" method="post"> <tr height="25"> <td align="right">总记录数:<%=RecordCount%> 每页显示:<%=PageSize%> 总计页数:<%=pagecount%> 当前页数:<%=Page_No%> <%if page_no>1 then%> <a href="?page_no=<%=page_no-1%>">上一页</a> | <%end if%> <a href="?page_no=<%=page_no%>">刷新</a> <%if page_no<pagecount then%> | <a href="?page_no=<%=page_no+1%>">下一页</a> <%end if%> 转到第 <select name="page_no" size="1"> <option value="<%=page_no%>" selected><%=Page_No %></option> <%For i=1 to pagecount%> <option value="<%=i%>"><%=i%></option> <%Next%> </select> 页 <input type="submit" value="GO"> </td> </tr> </form> </table> </body> </html>