📄 special_news.asp
字号:
<%@ Language=VBScript%>
<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<%
request_SpecialID=Request.QueryString("SpecialID")
request_SpecialName=trim(Request.QueryString("SpecialName"))
'Response.Write request_SpecialID
'Response.End
PageShowSize = 10 '每页显示多少个页
MyPageSize = 20 '每页显示多少条新闻
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from BigClass"
rs.Open rs.Source,conn,1,1
dim ArrayBigClassID(10000),ArrayBigClassName(10000)
BigClassCount=rs.RecordCount
for i=1 to BigClassCount
ArrayBigClassID(i)=rs("BigClassID")
ArrayBigClassName(i)=trim(rs("BigClassName"))
rs.MoveNext
next
rs.Close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=request_SpecialName%>_专题信息__<%=redcaff%></title>
<LINK href=news.css rel=stylesheet>
</head>
<body topmargin="0">
<!--#include file=include/top.asp -->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr valign="top" bgcolor="<%=border%>">
<td height="1" width="1"></td>
<td height="1" width="748"></td>
<td height="1" width="1"></td>
</tr>
</table>
<table border="0" width="750" align=center cellspacing="0" cellpadding="0" bgcolor="<%=border%>">
<tr valign="middle">
<td width="1" ></td>
<td bgcolor=#FFFFFF width="15"> </td>
<td bgcolor=#FFFFFF align=left width="736" height="22" ><b>分类栏目</b>
<%for i=1 to BigClassCount
TdString=" | <a class=class href=BigClass.asp?BigClassID=" & ArrayBigClassID(i) & "&BigClassName="& ArrayBigClassName(i) &">" & ArrayBigClassName(i) & "</a>"
Response.Write TdString
Next
%>
</td>
<td width="1" align=left></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="<%=border%>">
<tr valign="top">
<td height="1" width="1" bgcolor="<%=border%>"></td>
<td height="1" width="748" bgcolor="<%=border%>"></td>
<td height="1" width="1" bgcolor="<%=border%>"></td>
</tr>
<tr valign="top">
<td bgcolor="<%=border%>" width="1"></td>
<td width="748" bgcolor="<%=t_m_bg%>"> </td>
<td bgcolor="<%=border%>" width="1"></td>
</tr>
<tr valign="top">
<td height="1" width="1" bgcolor="<%=border%>"></td>
<td height="1" width="748" bgcolor="<%=border%>"></td>
<td height="1" width="1" bgcolor="<%=border%>"></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="<%=border%>">
<tr>
<td>
<table width="748" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" align="center">
<tr>
<td width="15"> </td>
<td width="637" height="40">当前位置:<a class=class href="./" >首页</a>>><a class=class href=Special.asp>专题</a>>><%=request_SpecialName%></td>
<td width="91"> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr valign="top" bgcolor="<%=border%>">
<td height="1" width="1"></td>
<td height="1" width="748"></td>
<td height="1" width="1"></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<%=border%>" width="1"></td>
<td width="160" align="center" valign="top" bgcolor="<%=l_bg%>">
<table border="0" width="100%" cellspacing="1" cellpadding="0" bgcolor="<%=l_main%>">
<tr>
<td width="100%" bgcolor="<%=l_top%>" height="18">
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="<%=l_main%>">
<tr>
<td bgcolor="<%=l_top%>" align="center" ><font class=l_title>本专题浏览排行</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="<%=l_main%>" height="357" valign="top">
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<%
rs.Source="select top "& top_txt &" NewsID,Title,BigClassName,SmallClassName,SpecialID,click from News where (SpecialID=" & request_SpecialID & " and image=0 ) order by click DESC"
rs.Open rs.Source,conn,1,1
while not rs.EOF
%>
<tr>
<td> <img src="images/xpgo.gif" width="4" height="7" border="0"><a class=lift_top href="ReadNews.asp?NewsID=<%=rs("NewsID")%>&BigClassName=<%=rs("BigClassName")%>&SmallClassName=<%=rs("SmallClassName")%>&SpecialID=<%=rs("SpecialID")%>" target="_blank"><%if len(rs("title"))>20 then%><%=left(rs("title"),20)%>...<%else%><%=rs("title")%><%end if%></a> <font color=red><%=rs("click")%></font>
<%
rs.MoveNext
wend
rs.close
%>
</table>
</tr>
</table>
</td>
<td width="1"></td>
<td width="587" align="center" valign="top" bgcolor="<%=m_bg%>">
<table border="0" cellpadding="1" cellspacing="0" width="98%">
<tr>
<td width=100% height="10" valign="middle"></td>
</tr>
<!------------------------------------------------------------------------------------------------------------->
<%
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Source="select * from News where SpecialID=" & request_SpecialID & " order by NewsID DESC "
rs2.Open rs2.Source,conn,1,1
If Not rs2.eof then
rs2.PageSize = MyPageSize
MaxPages = rs2.PageCount
rs2.absolutepage = MyPage
total = rs2.RecordCount
i = 0
do until rs2.Eof or i = rs2.PageSize
if rs2("image")=>1 then
img="<img src='images/img.gif' height='9' border='0'>"
else
img=""
end if
%>
<tr>
<td width="100%" height="20"> <a class=middle href="ReadNews.asp?NewsID=<%=rs2("NewsID")%>&BigClassName=<%=rs2("BigClassName")%>&SmallClassName=<%=rs2("SmallClassName")%>&SpecialID=<%=rs2("SpecialID")%>" target=_blank><img src="images/go.gif" width="10" height="9" border="0">
<%=trim(rs2("Title"))%></a><font class=middle>(<%=trim(rs2("UpdateTime"))%>)[<font color="#ff0000"><%=trim(rs2("click"))%></font>]</font><%=img%></td>
</tr>
<%
rs2.MoveNext
i = i + 1
loop
%>
<tr>
<td width="100%"> </td>
</tr>
<tr>
<td width="100%" align=center>共 <%=total%> 条,当前第 <%=Mypage%>/<%=Maxpages%> 页,每页 <%=MyPageSize%>
条
<%
url="Special_News.asp?SpecialID=" & request_SpecialID & "&SpecialName=" & request_SpecialName
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs2.PageSize)+1
if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "&page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if
if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next
if Mypage+1 <=Pagetpage then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if
if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
else
Response.write "<tr><td valign=top height=80> 本专题暂无信息</td></tr>"
End If
rs2.close
%>
</td>
</tr>
<tr>
<td width="100%" align=center> </td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
<td bgcolor="<%=border%>" width="1"></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr valign="top" bgcolor="<%=border%>">
<td height="1" width="1"></td>
<td height="1" width="748"></td>
<td height="1" width="1"></td>
</tr>
</table>
<!--#include file=include/bottom.asp -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -