📄 sort.asp
字号:
<%
'=========================================
'
' 凡人网络购物系统V4.0免费版
' FreeDown.Net info@freedown.net
' www.freedown.net
' 版权所有·免费版仅供研究测试只用
' 商业使用请购买正版
'
'=========================================
%>
<!--#include file="top.asp"-->
<%
dim sort_id, sort_name, Nsort_id, Nsort_name
dim totalPut
dim CurrentPage, TotalPages
if request("sort_id")<>"" then
sort_id=request("sort_id")
else
sort_id=0
end if
if request("sort_id")="" then
sort_id=1
end if
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
'rs.close
'else
' Nsort_id=0
' Nsort_name="分类"
' end if
sql="select * from sort where sort_ID="&cstr(sort_id)
rs.open sql,conn,1,1
if not rs.eof then
sort_name=rs("sort_name")
end if
rs.close
%>
<table width=778 border=0 align="center" cellpadding=0 cellspacing=0>
<tbody>
<tr>
<td colspan=4 height=3></td>
</tr>
<tr>
<td width="180" valign="top">
<!--#include file="log.asp"-->
<!--#include file="insearch.asp"-->
<!--#include file="insort.asp"-->
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" align="center"> </td>
</tr>
<tr>
<td width="100%" align="center" height="120" bgcolor="#F5EFE7"><SCRIPT LANGUAGE="JavaScript1.1" SRC="http://duduad2.kisswin.com/main/adview.php?user=24|159&border=0&db=dudukisswin&log=yes"></SCRIPT></td>
</tr>
</table>
</center>
</div></td>
<td width=13 height=150> </td>
<td width=575 height=150 valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom: 6" height="338">
<tr bgcolor="#FFFFFF">
<td height="338" colspan="2" align="center" valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom: 6">
<tr>
<td height="100" colspan="2" bgcolor="#FFFFFF">
<div align="center"></div>
<table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td> <%set ad=server.CreateObject("adodb.recordset")
sql="select * from logo "
ad.open sql,conn,1,1
if ad.eof or ad.bof then
response.write "暂且没有广告"
end if
%>
<a href="<%=ad("url1")%>"target="_blank"><img src="<%=ad("banner1")%>" width="575" height="118" border="0"></a></td>
</tr>
<%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=10
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 height="2" style="border-bottom:#cccccc 1px solid" bgcolor="f7f7f7">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8%"> </td>
<td height="25" valign="middle"><b><%=sort_name%></b>>>
<%
' set ts = server.createobject("adodb.recordset")
if trim(request("sort_id"))<>"" then
sort_id=trim(request("sort_id"))
sql="select * from Nsort where sort_id="&cstr(sort_id)
rs.open sql,conn,1,1
if rs.bof or rs.eof then
response.Write "无相关小类"
'response.End
end if
%>
<% if not rs.bof or rs.eof then
do while not rs.eof or rs.bof
nsort_id=rs("nsort_id")
nsort_name=rs("nsort_name")
%>
<a href="nsort.asp?sort_id=<%=sort_id%>&nsort_id=<%=Nsort_id%>"><%=Nsort_name%></a>
<%rs.movenext
loop
end if
end if
rs.close%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<div align="center"> </div>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width=2> </td>
<td width="515" >
<%
for i=1 to ubound(hw_id)
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="25%" rowspan="5" bgcolor="#FFFFFF" align="left">
<a target="_blank" href="views.asp?hw_id=<%=hw_id(i)%>"><img border="0" src="<%=hw_pic(i)%>" width="120" height="85"></a>
<div align="right"></div>
<div align="right"></div>
<div align="right"></div>
</td>
<td height="25" bgcolor="#FFFFFF" width="75%"> </td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF" width="75%">
<a target="_blank" href="views.asp?hw_id=<%=hw_id(i)%>"><u><%=hw_name(i)%></u></a></td>
</tr>
<tr>
<td height="28" style="line-height:20px" bgcolor="#FFFFFF" width="75%"><%=hw_content(i)%></td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF" width="75%">市场价格:<s><%=pifa(i)%></s>元 本站会员价:<%=hw_cash(i)%>元 VIP价:¥<%=daili(i)%>元<br><a href='javascript:openbag(<%=hw_id(i)%>)'>定购<img border="0" src="img/order.gif" align="middle"></a></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF" width="75%"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1"></td>
</tr>
</table>
<%next%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="20">
<div align="center"></div>
</td>
</tr>
<tr>
<td width=478 height="23">
<p align="right">第<%=page%>页/共<%=totalpage%>页 <%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>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -