📄 smallclass.asp
字号:
<%@ Language=VBScript%>
<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<!--#include file="admin/char.inc"-->
<!--#include file=include/function.asp-->
<%
typeid=request("typeid")
request_BigClassID=Request.QueryString("BigClassID")
request_SmallClassID=Request.QueryString ("SmallClassID")
if typeid="" or request_bigclassid="" or request_smallclassid="" then
Response.Write "<script>alert('未指定参数');history.back()</script>"
response.end
else
if not IsNumeric(request_SmallClassID) or not IsNumeric(request_bigclassid) or not IsNumeric(typeid) then
response.write "<script>alert('非法参数');history.back()</script>"
response.end
else
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from BigClass where bigclassid=" & request_BigClassID &" order by BigClassorder"
rs.Open rs.Source,conn,1,1
bigclassname=rs("bigclassname")
rs.close
set rs=nothing
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from smallClass where smallclassid=" & request_smallClassID &" order by smallClassorder"
rs.Open rs.Source,conn,1,1
smallclassname=rs("smallclassname")
rs.close
set rs=nothing
PageShowSize = 10 '每页显示多少个页
MyPageSize = 20 '每页显示多少条新闻
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
end if
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from BigClass where typeid="&typeid&" order by BigClassorder"
rs.Open rs.Source,conn,1,1
dim ArrayBigClassID(10000),ArrayBigClassName(10000)
BigClassCount=rs.RecordCount
for i=1 to BigClassCount
ArrayBigClassID(i)=rs("BigClassID")
ArrayBigClassName(i)=trim(rs("BigClassName"))
rs.MoveNext
next
set rs2=server.CreateObject("ADODB.RecordSet") '专题
rs2.Source="select Top "& top_sp &" * from Special order by SpecialID DESC "
rs2.Open rs2.Source,conn,1,1
set rs4=server.CreateObject("Adodb.RecordSet")
rs4.source="select * from SmallClass Where BigClassid=" & request_BigClassid &" order by SmallClassorder"
rs4.open rs4.source,conn,1,1
SmallClassCount=rs4.RecordCount
dim ArraySmallClassID(10000),ArraySmallClassName(10000)
for i=1 to SmallClassCount
ArraySmallClassID(i)=rs4("SmallClassID")
ArraySmallClassName(i)=trim(rs4("SmallClassName"))
rs4.MoveNext
next
rs4.Close
set rs4=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=SmallClassName%>__<%=BigClassName%>__<%=jjgn%></title>
<LINK href=news.css rel=stylesheet>
<style type="text/css">
<!--
.zbk1 {
border: 1px solid #CCCCCC;
}
.zbk2 {
border-top: 1px none #CCCCCC;
border-right: 1px solid #CCCCCC;
border-bottom: 1px solid #CCCCCC;
border-left: 1px solid #CCCCCC;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style3 {font-weight: bold}
-->
</style>
</head>
<body>
<!--#include file=include/top.asp -->
<!--#include file=include/top2.asp -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="zbk2">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8" colspan="2"></td>
</tr>
<tr align="center" valign="top">
<td width="200"><table width="95%" align="center" cellpadding="3" cellspacing="0" bgcolor="white" class="zbk1" style="border: 1px solid #cccccc">
<tr>
<td align="center" valign="middle" class="6"><img src="img/type_left_01.gif" width="180" height="29"></td>
</tr>
<tr>
<td width="30%" height="23" align="center" valign="top"><table width="92%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><%
dim mode
typeid=checkstr(request("typeid"))
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from type where typeid="&typeid&" order by typeorder"
rs.Open rs.Source,conn,1,1
mode=rs("mode")
rs.close
set rs=nothing
if mode=5 then
set rs=conn.execute("SELECT * FROM bigclass where typeid="&typeid&" order by bigclassorder")
if not rs.EOF then
do while not rs.eof
%>
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2">
<tr>
<td colspan="2" class="6"><img src="img/arrow00.gif" width="9" height="11">
<%if not Rs.eof then%>
<a href="bigclassdeta.asp?typeid=<%=typeid%>&bigclassid=<%=Rs("bigclassid")%>"><font color="#000000"><%=Rs("bigclassname")%></font></a> </td>
</tr>
<%set nrs=conn.execute("SELECT * FROM smallclass where bigclassid="&cstr(rs("bigclassid"))&" order by smallclassorder")%>
<%do while not nrs.eof%>
<tr>
<td width=100% align=center valign="middle"><%if not nRs.eof then%>
<a href="SmallClass.asp?typeid=<%=typeid%>&BigClassID=<%=nrs("bigclassid")%>&smallclassid=<%=nrs("smallclassid")%>"><%=nRs("smallclassname")%></a> </td>
<%nrs.movenext
end if %>
</tr>
<%loop
nRs.Close
set nRs=nothing
%>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<%=border%>" width="105%" id="AutoNumber2" height="11">
<tr>
<td height=1 align=center></td>
</tr>
</table>
<%rs.movenext
end if
loop
rs.close
%>
<%else%>
<table cellpadding=3 cellspacing=0 width=100% border=0 style="border-collapse: collapse">
<tr>
<td height="22"><font color="#000000">暂无大类</font> </td>
</tr>
</table>
<%end if%>
<%else%>
<% typeid=checkstr(request("typeid"))
set rs=conn.execute("SELECT * FROM bigclass where typeid="&typeid&" order by bigclassorder")
do while not rs.eof
%>
<table width="100%" border="0" cellpadding="3" cellspacing="0" id="AutoNumber2" style="border-collapse: collapse">
<tr>
<td height=22 colspan="2"><img src="img/arrow00.gif" width="9" height="11">
<%if not Rs.eof then%>
<a class=middle href="bigclassdeta.asp?typeid=<%=typeid%>&bigclassid=<%=Rs("bigclassid")%>"><font color="#000000"><%=Rs("bigclassname")%></font></a></td>
</tr>
<%set nrs=conn.execute("SELECT * FROM smallclass where bigclassid="&cstr(rs("bigclassid"))&" order by smallclassorder")%>
<%do while not nrs.eof%>
<tr>
<td width=50% align=center valign="middle"><%if not nRs.eof then%>
<a class=class href="SmallClass.asp?typeid=<%=typeid%>&BigClassID=<%=nrs("bigclassid")%>&smallclassid=<%=nrs("smallclassid")%>"><%=nRs("smallclassname")%></a> </td>
<%nrs.movenext
end if %>
<td width=50% align=center valign="middle"><%if not nRs.eof then%>
<a class=class href="SmallClass.asp?typeid=<%=typeid%>&BigClassID=<%=nrs("bigclassid")%>&smallclassid=<%=nrs("smallclassid")%>"><%=nRs("smallclassname")%></a> </td>
<%nRs.movenext
end if%>
</tr>
<%loop
nRs.Close
set nRs=nothing
%>
</table>
<%rs.movenext
end if
loop
rs.close
%>
<%end if%>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -