📄 sort.asp
字号:
<tr>
<td><%if request("Nsort_id")="" then
sql="select top 10 * from hw where sort_id="&request("sort_id")
sql=sql&" order by hw_views desc"
else
sql="select top 10 * from hw where Nsort_id="&request("Nsort_id")&" order by hw_views desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write ("没有此类商品")
else
i=0
do while not rs.eof
response.write ("<li><A href=views.asp?hw_id="&rs("hw_id")&">"&rs("hw_name")&" </A></li>")
i=i+1
if i>=15 then exit do
rs.movenext
loop
end if
rs.close
%></td>
</tr>
</table> <!--end include-->
</TD>
<TD width=5> </TD>
<TD vAlign=top width=606>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=557>
<TBODY>
<TR>
<TD>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=459>
<TBODY>
<TR>
<TD colSpan=3>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="570">
<TBODY>
<TR>
<TD rowSpan=2 width=468><div align="center"><iframe src="admin/Ad.asp" width=570 height=120 border=0 frameborder=0 framespacing=0 marginheight=0 marginwidth=0 noResize scrolling=no vspace="0"></iframe></div></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD colSpan=3>
<table border=0 cellpadding=0 cellspacing=0 width=570>
<tbody>
<tr>
<td><img height=35 src="images/pics2/wp_sbox_01.gif"
width=5></td>
<td background=images/pics2/wp_sbox_02.gif width=596>
<form action="search.asp" method="post" name="form" id="form">
<table width="550" border=0 align=left cellpadding=0 cellspacing=0>
<tbody>
<tr>
<td width=95><font color=#666666><img
height=20 src="images/pics2/wp_sbox_search_pp2.gif"
width=94></font></td>
<td width="84" align=right>
<div align="center">
<input type="text" name="hw_name" size="20" class=input>
</div>
</td>
<td width="85" align=right>
<%
sql = "select * from sort"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else%>
<select name="sort_id" size="1">
<option selected value="">所有</option>
<% dim selclass
selclass=rs("sort_id")
do while not rs.eof
%>
<option value="<%=trim(rs("sort_id"))%>"><%=trim(rs("sort_name"))%></option>
<%rs.movenext
loop
end if
rs.close
%>
</select>
</td>
<td width=62>
<div align="center">
<input type="image" border="0" name="imageField" src="IMAGES/pics2/wp_sbox_bt_search.gif" width="51" height="19">
</div>
</td>
<td width=30>
<div align="right"><img src="IMAGES/pics2/icon_money.gif" width="19" height="13"></div>
</td>
<td width=42 valign="middle">
<div align="center">原价</div>
</td>
<td width=15>
<div align="right"><img src="IMAGES/pics2/icon_unisex.gif" width="14" height="13"></div>
</td>
<td width=60>
<div align="center">会员价</div>
</td>
<td width=15>
<div align="right"><img src="IMAGES/pics2/icon_heart.gif" width="14" height="12"></div>
</td>
<td width=60>
<div align="center">贵宾价</div>
</td>
</tr>
</tbody>
</table>
</form>
</td>
<td><img height=35 src="images/pics2/wp_sbox_03.gif"
width=5></td>
</tr>
</tbody>
</table>
</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD height=6></TD>
</TR>
</TBODY>
</TABLE>
<table width="576" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="2" width="14%" valign="top" background="images/pics2/top_bg.gif"> </td>
<td height="2" width="60%" background="images/pics2/top_bg.gif" valign="middle">
</td>
<td height="2" width="4%" align="right" valign="top"><img src="images/pics2/join.gif" width="56" height="41"></td>
<td height="2" width="10%" align="right" valign="top"><a href="ding1.asp"><img src="images/pics2/avarta_bu.gif" width="128" height="41" border="0"></a></td>
<td height="2" width="12%" align="right" valign="top"><a href="ding2.asp"><img src="images/pics2/item_bu.gif" width="125" height="41" border="0"></a></td>
</tr>
<tr>
<TD height=6></TD>
</tr>
</table>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=537>
<TBODY>
<TR>
<TD width="606"><img height=24
src="IMAGES/pics2/commoditysortgif.gif" width=576></TD>
</TR>
<TR>
<TD height="67"> <TABLE width=575 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<%set rs=server.createobject("adodb.recordset")
sort_id=trim(request("sort_id"))
if sort_id=empty then
response.redirect "index.asp"
end if
page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
if Nsort_id<>0 then
sql="select * from hw where Nsort_id="+cstr(Nsort_id)+" and sort_id="+cstr(sort_id)+" order by hw_id desc"
elseif sort_id<>0 then
sql="select * from hw where sort_id="+cstr(sort_id)+" order by hw_id desc"
else
sql="select * from hw order by hw_id desc"
end if
rs.open sql,conn,3,3
if rs.eof then
response.write "你所选的类别没有商品"
response.end
else
rs.pagesize=5
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize
i=0
dim hw_id(),hw_name(),hw_cash(),pifa(),daili(),hw_views(),hw_buys(),hw_content(),hw_pic(),hw_date()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve hw_id(i),hw_name(i),hw_cash(i),pifa(i),daili(i),hw_views(i),hw_buys(i),hw_content(i),hw_pic(i),hw_date(i)
hw_id(i)=rs("hw_id")
hw_name(i)=rs("hw_name")
hw_cash(i)=rs("hw_cash")
pifa(i)=rs("pifa")
daili(i)=rs("daili")
hw_views(i)=rs("hw_views")
hw_buys(i)=rs("hw_buys")
hw_content(i)=rs("hw_content")
hw_pic(i)=rs("hw_pic")
hw_date(i)=rs("hw_date")
rs.movenext
loop
end if
rs.close
%>
<TR>
<TD> <TABLE class=board_field height=31 cellSpacing=0
cellPadding=0 width="100%"
background=images/pics2/bg_top.gif border=0>
<TBODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -