📄 sort.asp
字号:
<!--#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
dim order
if request("order")<>"" then
order=request("order")
else
order="time"
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 width=181 align="center" valign="top"><!--#include file="log.asp"-->
<!--#include file="insearch.asp"-->
<!--#include file="insort.asp"--></td>
<td 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 align="center">
<%
set ad=server.CreateObject("adodb.recordset")
sql="select * from logo where sort="&request("sort_id")
ad.open sql,conn,1,1
do while not ad.eof
%>
<tr>
<td align="center">
<a href="<%=ad("url")%>"target="_blank"><img src="<%=ad("banner")%>" width="575" height="118" border="0"></a></td>
</tr>
<%
ad.movenext
loop
ad.close
%></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
if order="time" then
sql="select * from hw where sort_id="+cstr(sort_id)+" order by hw_id desc"
elseif order="price1" then
sql="select * from hw where sort_id="+cstr(sort_id)+" order by hw_cash desc , hw_id desc"
elseif order="price2" then
sql="select * from hw where sort_id="+cstr(sort_id)+" order by hw_cash asc , hw_id desc"
end if
rs.open sql,conn,3,3
if rs.eof then
response.write "Sorry ,there are no products in this sort!"
response.end
else
rs.pagesize=16
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize
%>
<tr>
<td height="2">
<div align="center">
<table width="575" border="0" bgcolor="#F7F7F7">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C8C8C8; border-bottom: 1px solid #C8C8C8" bgcolor="#F7F7F7" height="25"><div align="left">Sort: <b><%=sort_name%></b>, Total:<b><%=totalrec%></b> ,These are <%=(page-1)*16+1%>-<%if page+1<=totalpage then%><%=page*16%><%else%><%=totalrec%><%end if%></div></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%i=0
do while not rs.eof and (i<rs.pagesize)
i=i+1
%>
<td width="25%" height="134" align="left" bgcolor="#FFFFFF">
<div align="center">
<table width="150" border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align="center" width="150" height="100">
<a target="_blank" href="views.asp?hw_id=<%=rs("hw_id")%>">
<img border="0" src="<%=rs("hw_pic")%>" width="90" height="90" style="border: 1px solid #C0C0C0"></a></td>
</tr> <tr>
<td valign="bottom" align="center" height="20"><b><%=rs("hw_name")%></b></td>
</tr>
<tr>
<td align="center">Market Price:<s><%=rs("pifa")%></s>RMB</td>
</tr>
<tr>
<td align="center">Member Price:<font color="#D03430"><%=rs("hw_cash")%></font>RMB</td>
</tr>
<tr>
<td align="center">Points:<%=rs("isbn")%></td>
</tr>
<tr>
<td valign="top" align="center">
<a target="_blank" href="views.asp?hw_id=<%=rs("hw_id")%>"><img border="0" src="img/xiang.gif"></a>
<a href='javascript:openbag(<%=rs("hw_id")%>)'><img border="0" src="img/buy.gif"></a></td>
</tr>
</table>
</div>
</td>
<%
if (i mod 4=0) and i>=4 then
%>
</tr>
<tr>
<%
end if
rs.movenext
loop
rs.close
%>
</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:<%=page%>/Total:<%=totalpage%> <%if page-1>0 then%><a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page-1%>&order=<%=order%>">Last</a>
<%else%>
Last <%end if%>
<%if page+1<=totalpage then%>
<a href="sort.asp?sort_id=<%=sort_id%>&page=<%=page+1%>&order=<%=order%>">Next</a>
<%else%>
Next
<%end if
end if%>
</font></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -