📄 sort.asp
字号:
<!--#include file="top.asp"-->
<%If Not(isNumeric(sort_id)) or sort_id="" or sort_id=0 Then
response.write "<script language=javascript>alert('Url处理出错!');history.go(-1);</script>"
response.End
End If%>
<div align="center"><table width=980 border=0 cellpadding=0 cellspacing=0 bgcolor="#FFFFFF">
<tr><td width=181 align="center" valign="top">
<!--#include file="log.asp"--><!--#include file="insort.asp"--><!--#include file="inpinpai.asp"--><!--#include file="inph.asp"--></td><td width="5"></td>
<td valign="top" align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td height="110" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="790" id="table7">
<tr><td colspan="5" height="2"></td></tr>
<tr><td width="131" valign="top" align="right" background="Img/index_h7.gif">
<table border="0" cellpadding="0" cellspacing="0" width="131" id="table8">
<tr><td><img border="0" src="Skin/<%=venshop_skin%>/index_h6.gif"></td></tr><tr><td height="100" align="center"><%set rs=server.createobject("adodb.recordset")
sql="select top 1 * from venshop_hw where sort_id="&sort_id&" order by hw_buys desc,hw_id desc"
rs.open sql,conn,1,1
if not rs.eof then%>
<a href=<%=web%>/views.asp?hw_id=<%=rs("hw_id")%> target=_blank>
<img border="0" src="<%pic=split(rs("hw_pic"),"*")%><%=pic(1)%>" onerror="this.src='img/noimage.jpg'" height="100"></a>
<%end if
rs.close
set rs=nothing%></td></tr>
</table>
</td><td width="261" valign="top" background="Img/index_h10.gif">
<table border="0" cellpadding="0" cellspacing="0" width="261" id="table9">
<tr><td><img border="0" src="Img/index_h9.gif" width="261" height="12"></td></tr><tr><td height="135" valign="top"><script language="JavaScript" src="new.asp?pagec=7&order=hot&sort_id=<%=sort_id%>"></script></td></tr>
</table>
</td><td valign="top" width="6" align="center" rowspan="2"> </td>
<td valign="top" width="131" align="center" background="Img/index_h7.gif">
<table border="0" cellpadding="0" cellspacing="0" width="131" id="table10">
<tr><td><img border="0" src="Skin/<%=venshop_skin%>/index_h12.gif"></td></tr><tr><td height="100" align="center"><%set rs=server.createobject("adodb.recordset")
sql="select top 1 * from venshop_hw where sort_id="&sort_id&" and tjsort=1 order by hw_id desc"
rs.open sql,conn,1,1
if not rs.eof then%>
<a href=<%=web%>/views.asp?hw_id=<%=rs("hw_id")%> target=_blank>
<img border="0" src="<%pic=split(rs("hw_pic"),"*")%><%=pic(1)%>" onerror="this.src='img/noimage.jpg'" height="100"></a>
<%end if
rs.close
set rs=nothing%></td></tr>
</table>
</td><td valign="top" width="261" align="center" background="Img/index_h10.gif">
<table border="0" cellpadding="0" cellspacing="0" width="261" id="table11">
<tr><td><img border="0" src="Img/index_h9.gif" width="261" height="12"></td></tr><tr><td height="135" valign="top"><script language="JavaScript" src="new.asp?pagec=7&tjsort=1&sort_id=<%=sort_id%>"></script></td></tr>
</table>
</td></tr>
<tr><td width="131" valign="bottom" align="right" background="Img/index_h7.gif"><img border="0" src="Img/index_h8.gif" width="131" height="11"></td>
<td width="261" valign="bottom" background="Img/index_h10.gif"><img border="0" src="Img/index_h11.gif" width="261" height="12"></td>
<td valign="bottom" width="131" align="center" background="Img/index_h7.gif"><img border="0" src="Img/index_h8.gif" width="131" height="11"></td>
<td valign="bottom" width="261" align="center" background="Img/index_h10.gif"><img border="0" src="Img/index_h11.gif" width="261" height="12"></td>
</tr></table>
</td></tr>
<%set rs=server.createobject("adodb.recordset")
sql="select * from venshop_logo where sort="&sort_id&""
rs.open sql,conn,1,1
do while not rs.eof%><tr><td align="center"><p style="margin: 2px"><a href="<%=rs("url")%>"target="_blank"><img src="<%=rs("banner")%>" border="0"></a></td></tr><%rs.movenext
loop
rs.close
set rs=nothing%>
<%page=request("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
if request("order")<>"" then
order=request("order")
end if
if order="time" then
orderx="hw_id desc"
elseif order="hot" then
orderx="hw_buys desc,hw_id desc"
elseif order="price1" then
orderx="trim(hw_price2) asc"
elseif order="price1" then
orderx="trim(hw_price2) desc"
else
orderx="hw_xu desc"
end if
set rs=server.createobject("adodb.recordset")
sql="select * from venshop_hw where hw_kucun>0 and sort_id="&sort_id&" order by "&orderx&""
rs.open sql,conn,1,1
if rs.eof then%><tr><td align="center" height="30">你所选的类别没有商品</td></tr>
<%else
rs.pagesize=lookpage
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize%>
<tr><td height="23" class="sort">
<font color="#FF0000"><b><%=sort_name%></b></font> 共<%=totalrec%>件商品,
这是第<%=(page-1)*rs.pagesize+1%>-<%if page+1<=totalpage then%><%=page*rs.pagesize%><%else%><%=totalrec%><%end if%>件
</td></tr>
<tr><td width="100%" align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%if lookt="image" then
i=0
do while not rs.eof and (i<rs.pagesize)
i=i+1%><tr><td width="25%" height="30" align="center"><!--#include file="insimage.asp"--></td></tr><%rs.movenext
loop
else%><tr><%i=0
do while not rs.eof and (i<rs.pagesize)
i=i+1%><td width="25%" height="30" align="center"><!--#include file="ins.asp"--></td><%if (i mod lookhang=0) and i>=lookhang then%></tr><tr>
<%end if
rs.movenext
loop%></tr><%end if%></table></td></tr>
<form action=<%=filename%>?sort_id=<%=sort_id%>&order=<%=order%> method=post>
<tr><td height="2" class="sortb"></td></tr>
<tr><td height="23" class="sortb">
<p style="line-height: 150%; margin: 5px">第<%=page%>页/共<%=totalpage%>页
<%if page-1>0 then%><a href="<%=filename%>?sort_id=<%=sort_id%>&page=<%=page-1%>&order=<%=order%>">上一页</a><%else%>上一页<%end if%>
<%if page+1<=totalpage then%> <a href="<%=filename%>?sort_id=<%=sort_id%>&page=<%=page+1%>&order=<%=order%>">下一页</a><%else%>下一页<%end if%>
页面跳转:<input type="text" name="page" value="<%=page+1%>" size="1" style="text-align: center" class=input><input type="submit" value="GO" class=input><br>
选择页数:<%for i=1 to totalpage
if i=page then%>
<font color="#FF0000"><b><%=i%></b></font>
<%else%>
<a href="<%=filename%>?page=<%=i%>&sort_id=<%=sort_id%>&order=<%=order%>"><%=i%></a>
<%end if
next%>
</td>
</tr></form><%end if
rs.close
set rs=nothing%></table></td></tr></table></div><!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -