📄 class_type.asp
字号:
<!--#include file="head.asp" -->
<%
sub navigation()
response.write " >> "
response.write "文章小类别"
end sub
Dim a125id,keyword,MaxPerPage
MaxPerPage = 15 '分页显示的纪录个数
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim sqlClass
dim RsClass
keyword=request("keyword")
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
founderr=true
Response.Write "<script language=javascript>alert('搜索参数非法');javascript:history.back();</script>"
end if
Title_nav ="文章搜索结果 关键词:"&keyword
a125_big_id=0
SortName="文章大类"
Classname="文章搜索"
sort_1=1
else
a125id=CheckStr(Request.QueryString("a125id"))
If isInt(a125id)=False OR Not IsNumeric(a125id) Then
Response.Redirect "index.asp"
Response.End()
End If
sqlc="select * from a125_type where a125_big_id<>0 and ID="&a125id&""
Set Rsc=conn.execute (sqlc)
if Rsc.eof and rsc.bof then
response.Redirect("index.asp")
end if
'读小类信息
Classname=Rsc("a125_names")
a125_CalssInfo=Rsc("Info")
a125_setting = Rsc("a125_setting")
Names = Rsc("a125_names")
Tuijian = Rsc("Tuijian")
'从小类中读出大类
a125_big_id=Rsc("a125_big_id")
Rsc.close
set Rsc=nothing
sqls="select * from a125_type where ID="&a125_big_id&""
Set Rss=conn.execute (sqls)
'读大类信息
SortName=Rss("a125_names")
a125_SortSetting=Rss("a125_setting")
Title_nav ="<a href=type.asp?a125id="&a125_big_id&">" &SortName & "</a>"& " >> " & Classname
Rss.close
set Rss=nothing
sort_1=3
end if
%>
<table border="0" cellpadding="0" cellspacing="0" width="996" height="50" bgcolor="#FFFFFF">
<tr width="996">
<!--左边内容-->
<td width="216" valign="top" background="images/2/left_bg.gif">
<div align="center">
<%call a125_tianqi()%>
</div>
<div align="center">
<% Call a125_acticletype(15,a125_big_id,SortName) %>
</div>
<div align="center">
<% call a125_Search5() %>
</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 a125_articleInfo(sort_1,8,20,a125_big_id,0) %></TD>
</TR>
</TBODY>
</TABLE>
</div>
</td>
<!--中间内容-->
<td width="780" valign="top">
<!--导航位置-->
<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">您现在的位置:首页 >> <%=Title_nav%></TD>
<TD align=middle height=36 width=11><img src="images/2/index_10.gif" width="11" height="36" alt=""></TD>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="780" height="32">
<tr>
<TD width="780" height="32" style=" color:#990000;font-size:14px;font-weight:bold; PADDING-left: 20px" background="images/2/class_bg.gif"><%=Classname%></TD>
</tr>
</table>
<!--内容区域-->
<table border="0" cellpadding="0" cellspacing="0" width="780" height="160">
<TBODY><tr>
<td width="780">
<!--文章内容开始-->
<%
if a125_setting=3 and request("keyword")="" then
Call a125_OnlyPage(Names,a125_CalssInfo)
else
if request("keyword")<>"" then
sql="select ID,title,Sort2,AddDate,content from info where title like '%"&keyword&"%' or content like '%"&keyword&"%' ORDER BY id DESC"
else
if a125_setting < 3 then
sql="select ID,title,Sort2,AddDate from info where Sort2="&a125id&" ORDER BY id DESC"
end if
end if
%>
<table bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="0">
<TBODY><tr>
<td width="1%" valign="top"> </td>
<td width="99%" valign="top">
<%
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
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
set conn=nothing
%>
<!--分页-->
</td>
</tr>
</TBODY></table>
<!-- 文章内容结束-->
<%end if%>
</td></tr>
</TBODY></table>
</td>
<!--右边内容-->
</tr>
</table>
<%sub showContent%>
<table width="98%" height="25" align="center" cellspacing="2" >
<br>
<%
dim i
i=0
do while not (rs.eof or err)
%>
<tr height="27" >
<td width="17" height="27" background="images/line.gif"><div align="right"><img src="Images/a125_ico.gif" width="12" height="11" align="absmiddle"></div></td>
<td width="650" height="27" background="images/line.gif"><div align="left"><a href="typenews.asp?id=<%response.write rs(0)%>" title="<%=rs("title")%>">
<% if len(rs("title"))>46 then%>
<%=Left(rs("title"),44)%>...
<%else%>
<%response.write rs("title")%>
<%end if%>
</a></div></td>
<td width="89" height="27" background="images/line.gif"><div align="left">[<%=rs("AddDate")%>] </div></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<hr width="90%">
<%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_type.asp?keyword="&request("keyword")&"&a125id="& a125id &"&page=1'> 首页 </a>"
response.write "<a href='class_type.asp?keyword="&request("keyword")&"&a125id="& a125id &"&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_type.asp?keyword="&request("keyword")&"&a125id="& a125id &"&page="+cstr(k+1)+"'> 下一页 </a>"
response.write "<a href='class_type.asp?keyword="&request("keyword")&"&a125id="& a125id &"&page="+cstr(n)+"'> 末页 </a>"
end if
%>
</div></td></tr></table>
<%end sub%>
<!--#include file="foot.asp" -->
<SCRIPT language=javascript>
document.title="<%=Classname%>-<%=SortName%>-<%=a125_title%>";
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -