📄 smallclass.asp
字号:
<%
option explicit
dim PageName
PageName="SmallClass"%>
<!--#include file="conn.asp" -->
<!--#include file="const.asp"-->
<!--#include file="function.asp" -->
<%
dim currentPage
if not isempty(request("page")) and request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim request_BigClassName,request_BigClassType,request_SmallClassName,request_SmallClassType
request_BigClassName=Request("BigClassName")
request_BigClassType=Request("BigClassType")
request_SmallClassName=Request("SmallClassName")
request_SmallClassType=Request("SmallClassType")
sql="select * from SmallClass Where BigClassName='" & request_BigClassName &"' order by SmallClassID"
rs.open sql,conn,1,1
dim SmallClassCount
SmallClassCount=rs.RecordCount
if SmallClassCount>0 then
dim ArraySmallClassName(50),ArraySmallClassType(50)
for i=1 to SmallClassCount
ArraySmallClassType(i)=rs(2)
ArraySmallClassName(i)=rs(4)
rs.MoveNext
next
end if
rs.Close
%>
<!--#include file="top2.asp"-->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" valign=middle>
<td align="center"><script src="ad.asp?add=%BA%E1%B7%F92"></script></td>
</table><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="SmallClassName.asp"-->
<!--#include file="SpecialName.asp"-->
<!--#include file="search.asp"-->
<%if showTxtTop<>"0" then%>
<script language=javascript src="hottxt.asp?BigClassName=<%=request_BigClassName%>&SmallClassName=<%=request_SmallClassName%>"></script>
<%end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td bgcolor="<%=LeftCColor%>" background="<%=LeftCImg%>"></td>
</tr>
</table>
</td>
<%=InTable("left")%>
<td height="25" align=center valign=top bgcolor="<%=CenterBgColor%>">
<table border="0" cellpadding="0" cellspacing="0" width="99%" align="center" style="TABLE-LAYOUT: fixed">
<td height="25" align=center background="<%=CenterTImg%>" bgcolor="<%=CenterBgColor%>">
<%
if request_SmallClassType=0 then%>
<script language=javascript src="ClassNews.asp?BigClassName=<%=request_BigClassName%>&SmallClassName=<%=request_SmallClassName%>"></script>
<%
else
%>
<img src="images/cat.gif" width="10" height="10" border="0"> <%=request_SmallClassName%><%=trline()%> <tr>
<td width="100%">
<%
sql="select "&NoContent&" from News where bigclassname='"&request_BigClassName&"' and SmallClassName='" & request_SmallClassName &"' and checked=1 order by updatetime DESC"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'><br><b>尚 无 文 章</b></p><br>"
else
dim MaxPerPage,PageUrl,totalPut
MaxPerPage=MaxList
PageUrl="SmallClass.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
%>
</td>
</tr>
</table>
<%
if ShowGBook=1 then
dim cols
cols=86
if ShowSmallModelRight=1 then cols=61
%>
<script language=javascript src="gbookshow.asp?BigClassName=<%=request_BigClassName%>&BigClassType=<%=request_BigClassType%>&SmallClassName=<%=request_SmallClassName%>&SmallClassType=<%=request_SmallClassType%>&cols=<%=cols%>"></script>
<%end if%>
<br>
</td>
<%if ShowSmallModelRight=1 then%>
<%=InTable("right")%>
<!--显示右栏-->
<td bgcolor="<%=RightBgColor%>" width="160" align="center" valign="top">
<script language=javascript src="goodnews.asp?BigClassName=<%=request_BigClassName%>&SmallClassName=<%=request_SmallClassName%>"></script>
<script language=javascript src="hotimg.asp?BigClassName=<%=request_BigClassName%>&SmallClassName=<%=request_SmallClassName%>"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td bgcolor="<%=RightCColor%>" background="<%=RightCImg%>"></td>
</tr>
</table>
</td>
<%end if
end if
response.write OutTable("right")%>
</tr>
</table>
<%
sub showContent
i=0
response.write "<table border=""0"" width=""98%"" cellspacing=""0"" cellpadding=""0"" bgcolor="&MainCColor&" style=""TABLE-LAYOUT: fixed"" align=""center"">"&_
"<tr>"&_
"<td width=""100%"" style=""WORD-WRAP: break-word"">"
do while not rs.eof
i=i+1
response.write Shownewf
if ShowSmallModelRight=1 then
response.write ShowTitle("MainContentB",42)
else
response.write ShowTitle("MainContentB",60)
end if
response.write ShowTime
response.write ShowImg
'response.write Shownew
response.write Showclick
response.write "<br>"
if rs("goodnews")=1 then Response.Write " <font color='"&AlertFColor&"'>荐</font>"
if i>=MaxPerPage then exit do
rs.movenext
loop
response.write "</td></tr></table>"
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
dim url
url="BigClassName=" & request_BigClassName & "&SmallClassName=" & request_SmallClassName &"&SmallClassType=1"
response.write "<form method=Post action="""&filename&"?"&url&"""><center>"&_
"共 <font color="&AlertFColor&"><b>"&totalnumber&"</b></font> 条"
if CurrentPage<2 then
response.write " 首页 上一页 "
else
response.write " <a href="""&filename&"?page=1&"&url&""">首页</a> <a href="""&filename&"?page="&CurrentPage-1&"&"&url&""">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 末页"
else
response.write "<a href="""&filename&"?page="&CurrentPage+1&"&"&url&""">下一页</a>"
response.write " <a href="""&filename&"?page="&n&"&"&url&""">末页</a>"
end if
response.write " 页次:<strong><font color="&AlertFColor&">"&CurrentPage&"/"&n&"</font></strong>页"
response.write "转到:"
response.write "<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
response.write "</select></form>"
end function
set rs=nothing%>
<!--#include file="copyright.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -