📄 class.asp
字号:
<!--#include file="ku_top.asp" -->
<%
sub navigation()
response.write " >> "
response.write ""&Title&""
end sub
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="800" height="50" bgcolor="#ffffff">
<tr>
<td width="218" valign="top">
<div align="center">
<table border="0" width="208" id="table2" bgcolor="#ebebeb" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>热 门 文 章</b></td>
</tr>
<tr>
<td><% call xbqq_articleInfo(1,10,26,0,0) %></td>
</tr>
<tr>
<td height="0"><hr></td>
</tr>
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>信 息 搜 索</b></td>
</tr>
<tr>
<td height="23"><% xbqq_Search %></td>
</tr>
<tr>
<td height="0"><br></td>
</tr>
</table>
</div>
</td>
<td width="590" valign="top">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="160">
<tr>
<td width="100%">
<!--文章内容开始-->
<%
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 Sort set hit=hit+1 where ID="&ClassID&""
RsH.open hit,conn,1,3
sqlc="select * from Sort where ID="&ClassID&""
Set Rsc=conn.execute (sqlc)
if Rsc.eof and rsc.bof then
response.Redirect("index.asp")
end if
'读小类信息
Classname=Rsc("names")
Gaobei_CalssInfo=Rsc("Info")
'从小类中读出大类
B_ID=Rsc("B_ID")
sqls="select * from Sort where ID="&B_ID&""
Set Rss=conn.execute (sqls)
'读大类信息
SortName=Rss("names")
Gaobei_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
%>
<%
if Gaobei_SortSetting=4 then
Call Gaobei_OnlyPage(Classname,Gaobei_CalssInfo)
else
Dim ClassID
dim sqlClass
dim RsClass
sqlClass="select * from Sort 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 Gaobei_OnlyPage(RsClass("Names"),RsClass("Info"))
end if
if RsClass("setting")=1 and RSClass("Tuijian")=true then
%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="xbqq_img/kind1.gif">
<TBODY>
<TR>
<TD width="100%" height=28 style='FILTER: PADDING-TOP: 2px'> <img border="0" src="xbqq_img/ico1.gif" width="11" height="9"> <span style='letter-spacing: 3px'><%=Classname%><font color="#FFFFFF">推荐图文信息</font></span></TD>
</TR>
</TBODY>
</TABLE>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<TABLE style="border: 1px solid #2C87E9" bgcolor="#FFFFFF" cellSpacing=5 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR vAlign=top>
<%
'ClassID = request ("ClassID")
set Rstop=server.createobject("adodb.recordset")
sql="select top 4 * from Info where Ispic=1 and Pw_Good=True and Sort2="&ClassID&" ORDER BY id DESC"
Rstop.open sql,conn,1,1
if Rstop.eof or Rstop.bof then
%>
<TD height=131 align=middle>
<div align="center">无图片信息列表</div>
</TD>
<%
end if
do while not Rstop.eof
%>
<TD height=131 align=middle>
<% Call Gaobei_ShowPic(Rstop("Pic"),Rstop(0),Rstop("Title"),18)%>
</TD>
<%
Rstop.movenext
loop
%>
</TR>
</TBODY>
</TABLE>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<% end if %>
<% if Setting < 3 then %>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="28" background="xbqq_img/kind1.gif">
<tr>
<td style='FILTER: PADDING-TOP: 2px'> <img border="0" src="xbqq_img/ico1.gif" width="11" height="9"> <span style='letter-spacing: 3px'><%=Classname%></span></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<table style="border: 1px solid #2C87E9" bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="33%" valign="top">
<%
set RsPic=server.createobject("adodb.recordset")
sql="select top 5 * from Info where Sort2="&ClassID&" and Ispic=1 ORDER BY id DESC"
RsPic.open sql,conn,1,1
if RsPic.eof or RsPic.bof then
Call NoPic("暂无图片信息")
end if
do while not RsPic.eof
Call Gaobei_ShowPic(RsPic("Pic"),RsPic(0),RsPic("Title"),18)
RsPic.movenext
loop
%>
</td>
<td width="67%" valign="top">
<%
sql="select * from info 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
showContent
showpages()
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark '移动到开始显示的记录位置
showContent
showpages()
else
showContent
currentPage=1
end if
end if
rs.close
end if
set rs=nothing
set conn=nothing
sub showContent
%>
<TABLE width="100%" align="center" cellspacing="2" >
<%
dim i
i=0
do while not (rs.eof or err)
%>
<tr height="25">
<td width="27"><div align="right"><img src="Images/xbqq_skin/Gaobei_ico.gif" width="12" height="11" align="absmiddle"></div></td>
<td width="342"><div align="left"><a href="ViewInfo.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><%=rs("date")%> </div></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</TABLE>
<%end sub%>
<%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
%>
</div></td>
</tr>
</table>
<%
end sub
%></td>
</tr>
</table>
<%
end if
'Sort_多项
End if
%>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!-- 文章内容结束-->
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<!--#include file="xbqq_foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -