📄 sort.asp
字号:
<!--#include file="top.asp"-->
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<center>
<table border="0" width="760" cellspacing="0" cellpadding="0" height="312">
<tr>
<td width="190" height="312" valign="top" align="left">
<table border="0" width="190" cellspacing="0" cellpadding="0">
<tr>
<td width="190" valign="top" align="left"><!--#include file="left.asp"--></td>
</tr>
</table>
</td>
</center>
<td width="380" valign="top" align="left">
<table border="0" width="380" cellspacing="0" cellpadding="0" height="5">
<%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)
sql="select * from hw where sort_id='"&sort_id&"' order by hw_id DESC"
rs.open sql,conn,3,3
if rs.eof then
response.write "你所选的类别没有商品"
response.end
else
rs.pagesize=3
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(),hw_views(),hw_buys(),hw_content(),hw_pic(),hw_date(),hw_oldcash()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve hw_id(i),hw_name(i),hw_cash(i),hw_views(i),hw_buys(i),hw_content(i),hw_pic(i),hw_date(i),hw_oldcash(i)
hw_id(i)=rs("hw_id")
hw_name(i)=rs("hw_name")
hw_cash(i)=rs("hw_cash")
hw_views(i)=rs("hw_views")
hw_buys(i)=rs("hw_buys")
hw_oldcash(i)=rs("hw_oldcash")
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 width=478 height="18" bgcolor="#FF9A31">
<p align="right">共<font color=red><%=totalpage%></font>页 第<%=page%>页
<font color=666666><%if page-1>0 then%><a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page-1%>">上一页</a><%else%>上一页<%end if%> <%if page+1<=totalpage then%><a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page+1%>">下一页</a><%else%>下一页<%end if%></font></p>
</td>
</tr>
<tr>
<td width=478 bgcolor="#63CFFF">
</td>
</tr>
<tr>
<td width=478 height="5">
</td>
</tr>
<%
for i=1 to ubound(hw_id)
%>
<tr>
<td width="380" bgcolor="#FF9A31" height="18">商品编号:<%=hw_id(i)%>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#63CFFF">
<table border="0" width="100%" cellspacing="1">
<tr>
<td width="23%" bgcolor="#FFFFFF" valign="top" align="center"><img border="0" src="<%=hw_pic(i)%>" width="150" height="150"></td>
<td width="77%" bgcolor="#FFFFFF" valign="top" align="left">商品名称:<%=hw_name(i)%><br>
上架时间:<%=hw_date(i)%>
<br>商品原价:<%=hw_oldcash(i)%>元
<br>商品价格:<font color=red><%=hw_cash(i)%></font>元<br>
浏览次数:<%=hw_views(i)%><br>
成交次数:<%=hw_buys(i)%><br>
商品介绍:<%if len(hw_content(i))>40 then
hw_content(i)=left(hw_content(i),40)
response.write hw_content(i)
response.write "……"
else
response.write hw_content(i)
end if
%><br>
<p align="center"><a href="views.asp?hw_id=<%=hw_id(i)%>">详细资料</a><br>
<a href='javascript:openbag(<%=hw_id(i)%>)'><img border="0" src="images/shop.gif"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="5"></td>
</tr>
<%next%>
<tr>
<td width=478>
<p align="left">共<font color=red><%=totalpage%></font>页 第<%=page%>页
<font color=666666><%if page-1>0 then%><a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page-1%>">上一页</a><%else%><font color=666666>上一页</font><%end if%> <%if page+1<=totalpage then%><a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page+1%>">下一页</a><%else%><font color=666666>下一页</font><%end if%></font></p>
</td>
</tr>
</table>
</td>
<td width="190" valign="top" align="left">
<table border="0" width="190" cellspacing="0" cellpadding="0">
<tr>
<td width="190"><!--#include file="right.asp"--></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -