📄 sort.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="webconfig.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="include/top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="1" bgcolor="#cccccc"></td>
<td width="220" height="100"><!-- #include file="include/left.asp" --></td>
<td width="1" bgcolor="cccccc"></td>
<td align="center">
<!--#include file="include/search.asp" -->
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="22" align="left" class="centertitle">商品分类</td>
</tr>
<tr>
<td height="1" bgcolor="cccccc"></td>
</tr>
</tbody>
</table>
<%
sql="select * from Net008_productsort where sortlevel='1'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,2
if rs.recordcount<1 then
response.write "<font color=#ff0000>无类别!</font></br>"
response.end
end if
for i=1 to rs.recordcount
%>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td class="lefttitle"><img src="images/img_03.gif" width="12" height="12"><img src="images/dot.gif"><a href=productlist.asp?sortid=<%=rs("sortid")%> class="LeftTypeTitle"><%=rs("sortname")%></a></td>
</tr>
<tr>
<td background="images/dot.gif" height="3"></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
<%
sortid_temp=rs("sortid")
'response.write sortid_temp
'response.end
sql_in="select * from Net008_productsort where sortlevel='2' and left(sortid,3)='"&sortid_temp&"'"
set rs_in=server.createobject("adodb.recordset")
rs_in.open sql_in,conn,1,2
%>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td>
<%
if rs_in.recordcount<1 then
response.write " </br>"
else
for j=1 to rs_in.recordcount
response.write "·"
response.write "<a href=productlist.asp?sortid="&rs_in("sortid")&" class='LeftTypeLinkU'>"
response.write rs_in("sortname")
'计算该类别下的商品件数
sql_number="select * from Net008_productlist where sortid='"&rs_in("sortid")&"'"
set rs_number=server.createobject("adodb.recordset")
rs_number.open sql_number,conn,1,2
response.write "("&rs_number.recordcount&")"
rs_nubmer.close
set rs_number=nothing
'计算该类别下的商品件数---结束
response.write "</a> "
rs_in.MoveNext
If rs_in.EOF Then Exit For
next
end if
%>
</td>
</tr>
<%
rs.MoveNext
If rs.EOF Then Exit For
next
rs.close
set rs=nothing
%>
<tr>
<td> </td>
</tr>
</table></td>
<td width="1" bgcolor="cccccc"></td>
</tr>
</table>
<!-- #include file="include/bottom.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -