?? news.asp
字號(hào):
<!--#include file="head.asp"-->
<!--#include file="diao.asp"-->
<TABLE width=760 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF" class=bk>
<TBODY>
<TR>
<TD vAlign=top align=middle width=150
background=images/index_00.gif
height=500>
<!--#include file="left.asp"-->
<!-- #include file="lwconn.asp" -->
</TD>
<TD vAlign=top align=middle height=300 rowSpan=12>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle> <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/sj_dhtp.jpg" >
<tr>
<td width="4%"><img src="images/sj_dh.jpg" width="29" height="28"></td>
<td width="71%"> </td>
<td width="25%"> </td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE>
<br>
<br>
<table width="421" border="0" align="center">
<tr>
<td>
<%set rs=server.createobject("adodb.recordset")
sql ="select * from news order by newsid desc "
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write("<br><div align=center>數(shù)據(jù)庫(kù)中暫無(wú)任何記錄!</div>")
else
if request.querystring("page")="" then
curpage = 1
else
curpage = cint(request.querystring("page"))
end if
'================================修改2處:顯示的記錄數(shù)===============
rs.pagesize=20 '每頁(yè)顯示15條新聞
rs.absolutepage = curpage
pagecount=curpage
response.Write("<table width='100%'>")
n=1
img=2
select case img
case 1
img="<b>·</b>"
case 2
img="<img src=images/pic026.gif>"
case 3
img="<img src=include/003.gif>"
case else
img="<font size='2' color='990000'>■</font>"
end select
do while not rs.eof
display= "<tr><td height='25'> "&img&" <a target='_blank' href=shownews.asp?id="&rs("newsid")&">"&rs("title") &"</a> "
ttime=0
if ttime=1 then
display=display & "<font color=#999999>("&rs("updatetime")&")"
end if
display=display &"</font></td></tr>"
response.Write(display)
rs.movenext
n=n+1
if n>rs.pagesize then exit do
loop
%>
</table>
<% response.Write("<br><div align=center> ")
filename="?"
if PageCount=1 then
response.write "<font color='#000064'>首頁(yè) 上頁(yè)</font> "
else
response.write "<a href="&filename&"page=1><font color='0000BE'>首頁(yè)</font></a> "
response.write "<a href="&filename&"page="&(pagecount-1)&"><font color='0000BE'>上頁(yè)</font></a> "
end if
if rs.PageCount-pagecount<1 then
response.write "<font color='#000064'>下頁(yè) 尾頁(yè)</font>"
else
response.write "<a href="&filename&"page="&(pagecount+1)&"><font color='0000BE'>下頁(yè)</font></a> "
response.write "<a href="&filename&"page="&rs.PageCount&"><font color='0000BE'>尾頁(yè)</font></a>"
end if
response.write "<font color='000064'> 頁(yè)次:<font color=blue>"&pagecount&"</font>/"&rs.PageCount&"頁(yè)</font></div><br> "
'end end*********************
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%> </td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle vAlign=top> <IMG
height=3
src="images/index_li2.gif"></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR></TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR></TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR>
</TR>
</TBODY>
</TABLE>
<!--#include file="footer.asp"-->
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -