📄 speciallist.asp
字号:
<%PageName="SpecialList"%>
<!--#include file="conn.asp" -->
<!--#include file="const.asp"-->
<!--#include file="function.asp" -->
<%
ifclass=" SpecialName<>'无'"
if not isempty(request("page")) and request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<!--#include file="top2.asp"-->
<table border="0" width="<%=TableWidth%>" cellspacing="0" cellpadding="0" bgcolor="<%=CenterBgcolor%>" height="360">
<tr>
<%=OutTable("left")%>
<td width="160" align="center" valign="top" bgcolor="<%=LeftBgColor%>">
<!--#include file=search.asp-->
<%if showTxtTop<>"0" then%>
<script language=javascript src="hottxt.asp"></script>
<%end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="<%=LeftBColor%>" height="100%">
<tr>
<td bgcolor="<%=LeftCColor%>" background="<%=LeftCImg%>"></td>
</tr>
</table>
</td>
<%=InTable("left")%>
<td align=center valign=top>
<table border="0" cellpadding="1" cellspacing="0" width="99%" align="center" style="TABLE-LAYOUT: fixed">
<td width=95% height="25" align="center" valign="middle" background="<%=CenterTImg%>">
<p><b><img src="images/cat.gif" width="10" height="10" border="0"> </b><font color="#FFFFFF">专
题 列 表</font></p>
</td><tr>
<td width=100% height="10" valign="middle" align="center"> </td>
</tr>
<tr>
<td>
<%
sql="select * from Special order by SpecialID DESC "
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'><br><b>暂 时 没 有 文 章</b></p>"
else
MaxPerPage=MaxList
PageUrl="SpecialList.asp"
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
' showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
' showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
' showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
end if
rs.close
sub showContent
i=0
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="TableLine" bordercolorlight="<%=MainBColor%>" bgcolor="<%=MainCColor%>" style="TABLE-LAYOUT: fixed">
<%trline()%>
<tr>
<%
do while not rs.eof
set rs1=server.createobject("adodb.recordset")
sql="SELECT newsid FROM news where SpecialName='"&rs("SpecialName") &"'"
rs1.Open sql,conn,1,1
SpecialnewsCount=rs1.RecordCount
rs1.close
set rs1=nothing
i=i+1
strMaxLen=40 '限制标题长度
strSubject = HTMLDecode(rs("SpecialName"))
strTrueSubject = GetTrueLength(strSubject, strMaxLen, strSpaceBar)
m_bOverFlow = checkOverFlow(strSubject, strMaxLen)
if m_bOverFlow = True then
strTip = strSubject
else
strTip = ""
end if
%>
<tr>
<td height="20">
<ul><ul><ul><li><a Class="MainContentB" href="Special.asp?SpecialName=<%=rs("SpecialName")%>"><%=strSubject%></a> (共 <%=SpecialnewsCount%> 条)</li></ul></ul>
</ul></td></tr>
<%
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>"><center>
共 <font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>
个专题
<%if CurrentPage<2 then%>
首页 上一页
<%else%>
 <a href="<%=filename%>?page=1">首页</a> <a href="<%=filename%>?page=<%=CurrentPage-1%>">上一页</a>
<%
end if
if n-currentpage<1 then
%>
下一页 末页
<%else%>
<a href="<%=filename%>?page=<%=CurrentPage+1%>">下一页</a>
<a href="<%=filename%>?page=<%=n%>">末页</a>
<%end if%>
页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页
转到:
<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>
<option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select>
</form>
<%end function%>
</td>
</tr>
</table>
</td>
<%=OutTable("right")%>
</tr>
</table>
<%set rs=nothing%>
<!--#include file="copyright.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -