⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigclass.asp

📁 庐江二中
💻 ASP
字号:
<%
'option explicit
dim PageName
PageName="BigClass"%>
<!--#include file="conn.asp" -->
<!--#include file="const.asp"-->
<!--#include file="function.asp" -->
<%
dim request_BigClassName,request_BigClassType
request_BigClassName=Request("BigClassName")
request_BigClassType=Request("BigClassType")

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 rs.RecordCount
		ArraySmallClassType(i)=rs(2)
		ArraySmallClassName(i)=rs(4)
		rs.MoveNext
	next
end if
rs.Close
%>
<!--#include file="top.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%F91"></script></td>
          </table><table width="<%=TableWidth%>" border="0" cellspacing="0" cellpadding="0" height="360">
<tr>
<%=OutTable("left")%>
<td bgcolor="<%=LeftBgColor%>" width="160" align="center" valign="top">
	<%if SmallClassCount>0 then%><!--#include file=SmallClassName.asp--><%end if%>
	<!--#include file=SpecialName.asp-->
	<!--#include file=search.asp-->
	<%if showTxtTop<>"0" then%><script language=javascript src=hottxt.asp?BigClassName=<%=request_BigClassName%>></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 bgcolor="<%=CenterBgColor%>" align="center" valign=top><%
	if request_BigClassType=0 then '如果是单页
		%><script language=javascript src="classnews.asp?BigClassName=<%=request_BigClassName%>"></script><%
	else	
		'如果有小类--开始	----------------------------------------------------------------------------------------------
		if SmallClassCount>0 then
			if BigModel=1 then Response.Write "<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
			dim tr
			tr=0
			for i=1 to SmallClassCount
				dim SmallClassName,SmallClassType
				SmallClassName=ArraySmallClassName(i)
				SmallClassType=ArraySmallClassType(i)
				
				if SmallClassType=1 then	'如果是多条--开始
					tr=tr+1
					dim totalNews,totalontop
					sql="select newsid from News where BigClassName='"&request_BigClassName&"' and SmallClassName='" & SmallClassName &"'"
					rs.open sql,conn,1,1
					totalNews=rs.recordcount
					rs.close
					
					sql="select newsid from News where BigClassName='"&request_BigClassName&"' and SmallClassName='" & SmallClassName &"' and OnTop=1"
					rs.open sql,conn,1,1
					totalontop=rs.recordcount
					rs.close
	
					if BigModel=1 then
						if tr mod 2=1 then Response.Write "<tr>"
						Response.Write "<td width=""50%"" valign=""top"">"
					end if
					%><table cellspacing=0 cellpadding=0 width=98% border=0 align="center"><%
					if BigModel=1 then
						if tr>2 then Response.Write InTable("middle2")
					else
						if tr>1 then Response.Write InTable("middle2")
					end if
					%>
					<tr>
					
            <td height=25 background="<%=CenterTImg%>"  bgcolor="<%=CenterTColor%>" class=MainTitle>&nbsp;<img src="images/cat.gif" width="10" height="10" border="0">&nbsp;<%=SmallClassName%></td>
					<td height=25 background="<%=CenterTImg%>"  bgcolor="<%=CenterTColor%>" align="right">(共<%=totalNews%>条)&nbsp;</td></tr>
					<%=InTable("middle2")%>				
					
          <tr> 
            <td height=100 colspan="2" align=middle valign="top" background="<%=CenterCImg%>" bgcolor="<%=centerccolor%>" style="BORDER-LEFT: <%=CenterTColor%> 1px double; BORDER-BOTTOM: <%=CenterTColor%> 1px double"> 
              <table width="98%" border="0" align="right" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed">
					<tr>
					<td style="WORD-WRAP: break-word"><%
					dim classurl,showontop,msql
					classurl="SmallClass.asp?BigClassName=" & request_BigClassName &"&BigClassType="& request_BigClassType&"&SmallClassName="& SmallClassName &"&SmallClassType="& SmallClassType	
					msql=NoContent &" from News where BigClassName='" & request_BigClassName &"' and SmallClassName='" & SmallClassName &"' and checked=1 "	
					if totalontop=0 then
						sql="select top " & MaxNewsList & msql & " order by updatetime DESC"
						showontop=""
						call ClassTitle		
					end if
					if totalontop>=MaxNewsList then
						sql="select top " & MaxNewsList & msql & " and OnTop=1 order by updatetime DESC"
						showontop="&nbsp;<img src=images/top.gif>"				
						call ClassTitle			
					end if			
					if totalontop>0 and totalontop<MaxNewsList then
						sql="select top " & totalontop & msql & " and OnTop=1 order by updatetime DESC"
						showontop="&nbsp;<img src=images/top.gif>"
						call ClassTitle				
						sql="select top " & MaxNewsList-totalontop & msql & " and OnTop=0 order by updatetime DESC"
						showontop=""				
						call ClassTitle				
					end if
					Response.Write "<tr><td align=""right"" height=30><a class=MainMore href="""&classurl&"""><img src=""images/more9.gif"" border=""0"" alt=""更多文章""></a>"									
					%></td></tr></table>				
					</td></tr></table><br><%				
				end if		'如果是多条--结束
				
				if BigModel=1 then
					Response.Write "</td>"
					if tr mod 2=0 or i=SmallClassCount then Response.Write "</tr>"
				end if
			
			next
			if BigModel=1 then Response.Write "</table>"
			
			if ShowGBook=1 then
			dim cols
			cols=86
			if ShowBigModelRight=1 then cols=61	
			%><script language=javascript src="gbookshow.asp?BigClassName=<%=request_BigClassName%>&BigClassType=<%=request_BigClassType%>&cols=<%=cols%>"></script><%end if
			
			'显示右栏
			if ShowBigModelRight=1 then
				Response.Write InTable("right")%>
				</td>
				<td bgcolor="<%=RightBgColor%>" width="160" align="center" valign="top">
				<script language=javascript src="goodnews.asp?BigClassName=<%=request_BigClassName%>"></script>
				<script language=javascript src="hotimg.asp?BigClassName=<%=request_BigClassName%>"></script>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><tr>
				<td bgcolor="<%=RightCColor%>" background="<%=RightCImg%>"></td></tr></table><%
			end if
		else
			%><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><center><b>尚 无 小 类</b></center><%
		end if
		'如果有小类--结束----------------------------------------------------------------------------------------
	end if
	%>
</td>
<%=OutTable("right")%>
</tr>
</table>

<%
sub ClassTitle
	rs.open sql,conn,1,1
	dim ThisMore
		while not rs.EOF
			Response.Write shownewf
			if BigModel=1 then
				if ShowBigModelRight=1 then
					Response.Write showTitle("MainContentS",26)		'分列有右栏
					'Response.Write showTime
					'Response.Write showImg
					'Response.Write shownew
					Response.Write showclick
					Response.Write showOntop
					Response.Write "<br>"
				else
					Response.Write showTitle("MainContentS",30)		'分列无右栏
					Response.Write showTime
					'Response.Write showImg
					'Response.Write shownew
					Response.Write showclick
					Response.Write showOntop
					Response.Write "<br>"
				end if
			else
				if ShowBigModelRight=1 then
					Response.Write showTitle("MainContentB",42)		'不分列有右栏
					Response.Write showTime
					Response.Write showImg
					'Response.Write shownew
					Response.Write showclick
					Response.Write showOntop
					Response.Write "<br>"
				else
					Response.Write showTitle("MainContentB",60)		'不分列无右栏
					Response.Write showTime
					Response.Write showImg
					Response.Write shownew
					Response.Write showclick
					Response.Write showOntop
					Response.Write "<br>"					
				end if			
			end if
			rs.MoveNext
		wend
	rs.close
end sub

set rs=nothing%>
<!--#include file="copyright.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -