<html> <head> <title>page</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" href="css/css.css" type="text/css"> <script language="javascript"> var winH=window.screen.height -58; var winW=window.screen.width -10; </script>
</head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<%
Set Conn=Server.CreateObject("ADODB.Connection") Conn.Open Application("Conn")
sql="select * from ART"
pgsz=10 '//------------------這里是分頁記錄條數--------------- set rs=server.CreateObject ("adodb.recordset") RS.open sql,Conn,1,1
If rs.RecordCount =0 then response.write "<P align=center class=font><br><font size=2 color=red>No record</font></P>" response.end else rs.PageSize =cint(pgsz) if rs.RecordCount/pgsz=int(rs.RecordCount/pgsz) then total=rs.RecordCount/pgsz else total=int(rs.RecordCount/pgsz)+1 end if scrollaction=Request("scrollaction")
if request("pageno")<>"" then pageno=request("pageno") else pageno=pageno end if
if request("pageno_go")<>"" then pageno=request("pageno_go") end if
if pageno="" then pageno=1 else pageno=pageno+1 pageno=pageno-1 end if if scrollaction="上一页" then pageno=pageno-1 end if if scrollaction="下一页" then pageno=pageno+1 end if if pageno<1 then pageno=1 end if rs.AbsolutePage =pageno position=rs.PageSize *pageno pagebegin=position-rs.PageSize +1 if position<rs.RecordCount then pagend=position else pagend=rs.RecordCount end if %> <form method="get" action="news.asp"> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="52%" height="16"><div align="right">共计<font color=#0000ff><%=rs.RecordCount %></font>篇文章 | 显示﹕<font color=#0000ff><%=pagebegin%>-<%=pagend%></font>条 | 第<font color=#0000ff><%=pageno%></font>/<font color=#0000ff><%=total%></font>页 </div></td> <td width="4%"><div align="left"></div></td> <td width="44%"><font size="2"> </font> <font size="2"> </font> </td> </tr> </table> <table width="577" border="0" cellspacing="0" cellpadding="0" height="37" align="center" class="Mtable"> <tr bgcolor="#CCCCCC"> <td width="90" height="18"><div align="center"><font size="2">修改/删除</font></div></td> <td width="79"><div align="center"><font size="2">主题</font></div></td> <td width="79"><div align="center"><font size="2">文章来源</font></div></td> <td width="96"><div align="center"><font size="2">文章作者</font></div></td> <td width="134"><div align="center"><font color="#000000" size="2">最近编辑时间</font></div></td> <td width="85"><div align="center"><font size="2">预览文件</font></div></td> <% do while not (rs is nothing) rowcount=rs.PageSize do while not rs.EOF and rowcount>0 %> <tr width="450" onmouseover=javascript:bgColor='#EEEEEE' onmouseout=javascript:bgColor='#FFFFFF' style='cursor:default'> <td width=90 ><div align="center"> <font size="2"> <input type="button" name="button3" value="修改" onClick="self.location='news/modify_art.asp?pid=<%=rs("pid")%>'" class="button"> <input type="button" name="button" value="删除" onclick="javascript:if (confirm('是否真的删除这篇新闻文章?')){window.location.href='news.asp?pid=<%=rs("pid")%>&del=ok'}" class="button"> </font></div></td> <td width=79> <div align="center"><font size="2" face="Times New Roman, Times, serif"><%=rs("TITLE")%></font></div></td> <td width=79> <div align="center"><font size="2"><%=rs("ARTFROM")%></font></div></td> <td width=96> <div align="center"><font size="2"><%=rs("ARTWRITER")%></font></div></td> <td width=134> <div align="center"><font size="2"><%=rs("LASTEDITTIME")%></font></div></td> <td width=85> <div align="center"><font size="2"> <input type="button" name="button32" value="预览" onClick=javascript:window.open('news/preview_art.asp?pid=<%=rs("pid")%>','help','top=0,left=0,toolbar=no,resizable=no,menubar=no,scrollbars=yes, location=no,status=no,width='+winW+',height='+winH+'') class="button"> </td> </tr> <% rowcount=rowcount-1 rs.movenext loop set rs=rs.NextRecordset loop
conn.Close set rs=nothing set conn=nothing %> </table> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="15"><input type="hidden" name="bm" value="<%=request("bm")%>"> <input type="hidden" name="dq" value="<%=request("dq")%>"></td> </tr> </table> <div align="center"> <% Response.Write "<div align=center>" Response.Write "<input type=hidden name=pageno value="&pageno&">" Response.Write "<input type=hidden name=zt value="&zt&">" Response.Write "<input type=hidden name=tj value="&tj&">" nr=replace(nr,"""","") Response.Write "<input type=hidden name=nr value="&nr&">" if pageno>1 then Response.Write "<input type=submit name=scrollaction value=上一页 class=button>" end if if rowcount=0 and pageno<>total then Response.Write " <input type=submit name=scrollaction value=下一页 class=button>" end if if total>1 then %> <font size="2">第</font> <select name="pageno_goto" onChange="MM_jumpMenu('self',this,0)"> <%for j=1 to total if j=clng(pageno) then %> <option value="news.asp?pageno_go=<%=j%>&zt=<%=zt%>&tj=<%=tj%>&nr=<%=nr%>&px=<%=px%>&px_mode=<%=px_mode%>" selected><%=j%></option> <%else%> <option value="news.asp?pageno_go=<%=j%>&zt=<%=zt%>&tj=<%=tj%>&nr=<%=nr%>&px=<%=px%>&px_mode=<%=px_mode%>"><%=j%></option> <%end if next%> </select> <font size="2">页</font> <%end if end if %> </form> <% response.write "</div>" set rs=nothing set conn=nothing %>
</body> </html>
|