📄 guide_list.asp
字号:
<!--#include file="head.asp" -->
<%
sub navigation()
response.write " >> "
response.write ""&Title&""
end sub
%>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="996" height="50" bgcolor="#FFFFFF">
<tr>
<!--左边内容-->
<td width="216" valign="top" background="images/2/left_bg.gif">
<div align="center">
<%call zf11_tianqi()%>
</div>
<div align="center">
<% call zf11_Search5() %>
</div>
<div align="center">
<% call zf11_login5()%>
</div>
<div align="center">
<TABLE cellSpacing=0 cellPadding=0 width=212 border=0>
<TBODY>
<TR>
<TD align=middle height=30><img src="images/2/index_80.gif" width="206" height="30" alt=""></TD>
</TR>
<TR>
<TD align=middle height=200><% Call zf11_articleInfo(1,8,20,0,0) %></TD>
</TR>
</TBODY>
</TABLE>
</div>
</td>
<td width="780" valign="top">
<div align="center">
<%
ClassID=CheckStr(Request.QueryString("ClassID"))
If isInt(ClassID)=False OR Not IsNumeric(ClassID) Then
Response.Redirect "index.asp"
Response.End()
End If
'栏目统计------------
set RsH=server.createobject("adodb.recordset")
hit="update zf11_guide set hit=hit+1 where ID="&ClassID&""
RsH.open hit,conn,1,3
sqlc="select * from zf11_guide where ID="&ClassID&""
Set Rsc2=conn.execute (sqlc)
if Rsc2.eof and Rsc2.bof then
response.Redirect("index.asp")
end if
'读小类信息
Classname=("names")
zf11_CalssInfo=Rsc2("Info")
'从小类中读出大类
B_ID=Rsc2("B_ID")
sqls="select * from zf11_guide where ID="&B_ID&""
Set Rss=conn.execute (sqls)
'读大类信息
SortName=Rss("names")
zf11_SortSetting=Rss("Setting")
Title ="<a href=Sort.asp?SortID="&B_ID&">" &SortName & "</a>"& " >> " & Classname
MaxPerPage = 15 '分页显示的纪录个数
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
%>
<table border="0" cellpadding="0" cellspacing="0" width="780" height="25" style="border-bottom:2px #ff9900 solid;">
<tr>
<TD align=middle height=36 width=9><img src="images/2/index_06.gif" width="9" height="36" alt=""></TD>
<TD width="30" height="36" background="images/2/index_08.gif"><DIV align=center><IMG height=17 src="images/bottom4.gif" width=18></DIV></TD>
<TD width="730" height="25" background="images/2/index_08.gif">您现在的位置:首页 >><%=Classname%></TD>
<TD align=middle height=36 width=11><img src="images/2/index_10.gif" width="11" height="36" alt=""></TD>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="780" height="160">
<tr>
<td width="100%">
<!--文章内容开始-->
<%
Dim ClassID
dim sqlClass
dim RsClass
sqlClass="select * from zf11_guide where B_id<>0 and ID="&ClassID&" "
Set RsClass=conn.execute (sqlClass)
Setting = RsClass("setting")
Names = RsClass("Names")
Tuijian = RSClass("Tuijian")
if RsClass("setting")=3 then
Call zf11_OnlyPage(RsClass("Names"),RsClass("Info"))
end if
%>
<% if Setting < 3 then %>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<table bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" valign="top"> </td>
<td width="99%" valign="top">
<%
sql="select * from zf11_g_news where Sort2="&ClassID&" ORDER BY id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
If trim(Request("Page"))<>"" and IsNumeric(Request("Page")) then
CurrentPage= CLng(request("Page"))
If CurrentPage< 1 then
CurrentPage= 1
ElseIf CurrentPage> rs.PageCount then
CurrentPage = rs.PageCount
End If
Else
CurrentPage= 1
End If
if rs.eof then
response.write "<p align='center'>还没有添加信息...</p>"
else
totalPut=rs.recordcount '记录总数
if CurrentPage=1 then
showpages()
showContent
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark '移动到开始显示的记录位置
showpages()
showContent
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
set conn=nothing
sub showContent
%>
<TABLE width="98%" height="25" align="center" cellspacing="2" >
<%
dim i
i=0
do while not (rs.eof or err)
%>
<tr height="25" >
<td width="17" height="25" background="images/line.gif"><div align="right"><img src="Images/zf11_ico.gif" width="12" height="11" align="absmiddle"></div></td>
<td width="476" height="25" background="images/line.gif"><div align="left"><a href="guide_news.asp?id=<%response.write rs(0)%>" title="<%=rs("title")%>">
<% if len(rs("title"))>17 then%>
<%=Left(rs("title"),17)%>...
<%else%>
<%response.write rs("title")%>
<%end if%>
</a></div></td>
<td width="89" height="25" background="images/line.gif"><div align="left">[<%=rs("date")%>] </div></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</TABLE>
<hr width="90%">
<%end sub%>
<%
end if
%>
<%sub showpages()%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28">
<div align="center">
<%
dim n,k
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
%>
共有<%=rs.recordcount%>个记录
每页<%=Page_count%>个记录
<%
k=currentPage
if k=1 then
response.write " 首页 "& vbCrLf
response.write " 上一页 "& vbCrLf
end if
if k<>1 then
response.write "<a href='Class.asp?ClassID="& ClassID &"&page=1'> 首页 </a>"
response.write "<a href='Class.asp?ClassID="& ClassID &"&page="+cstr(k-1)+"'> 上一页 </a>"
end if
if k=n then
response.write " 下一页 "& vbCrLf
response.write " 末页 "& vbCrLf
end if
if k<>n then
response.write "<a href='Class.asp?ClassID="& ClassID &"&page="+cstr(k+1)+"'> 下一页 </a>"
response.write "<a href='Class.asp?ClassID="& ClassID &"&page="+cstr(n)+"'> 末页 </a>"
end if
end sub
%>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!-- 文章内容结束-->
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<!--#include file="foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -