📄 orders.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<html>
<head>
<title><%=webname%>--商品排行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="include/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true">
<!--#include file="include/header.asp" -->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td BGCOLOR=<%=bgclr2%>> <div align="right"><%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from category order by categoryorder",conn,1,1
if rs.eof and rs.bof then
response.write "目前还没有分类"
else%> <select name="categoryid" onchange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
<option selected>--请选择商品分类--</option> <option value=orders.asp?id=0>查询总体排行</option>
<%do while not rs.eof%> <option value="orders.asp?id=<%=rs("categoryid")%>"><%=trim(rs("category"))%></option>
<%rs.movenext
loop
end if
rs.close
set rs=nothing
%> </select> </div></td></tr> </table>
<TABLE WIDTH="760" BORDER="0" ALIGN="center" CELLPADDING="1" CELLSPACING="1" BGCOLOR=<%=bgclr1%>>
<TR> <TD WIDTH="20%" VALIGN=bottom><IMG SRC="images/paihang/pic_sortsorder.gif" WIDTH="49" HEIGHT="25" HSPACE="3" ALIGN="middle"></TD><TD WIDTH="18"> </TD><TD WIDTH="323"><B><FONT SIZE="3"><B><FONT COLOR="#FFFFFF"><IMG SRC="images/paihang/pic_topatt.gif" WIDTH="293" HEIGHT="34"></FONT></B></FONT><FONT COLOR="#FFFFFF" SIZE="3">
</FONT> </B> </TD><TD WIDTH="12"> </TD><TD WIDTH="300"><FONT SIZE="3"><B><FONT COLOR="#FFFFFF" SIZE="3"><IMG SRC="images/paihang/pic_top.gif" WIDTH="285" HEIGHT="34"></FONT></B></FONT></TD></TR>
<TR VALIGN="top"> <TD HEIGHT="225" COLSPAN="5" BGCOLOR="#FFFFFF">
<%
Dim categoryid,graph2
categoryid=request.QueryString("id")
set rs=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
if categoryid=0 or categoryid="" then
rs.open "select top 20 id,makein,introduce,name,rank,ranknum from product order by viewnum desc",conn,1,1
rs2.open "select top 20 id,makein,introduce,name,rank,ranknum from product order by solded desc",conn,1,1
else
rs.open "select top 20 id,makein,introduce,name,rank,ranknum from product where categoryid="&categoryid&" order by viewnum desc",conn,1,1
rs2.open "select top 20 id,makein,introduce,name,rank,ranknum from product where categoryid="&categoryid&" order by solded desc",conn,1,1
end if
if rs.eof and rs.bof then
response.write "目前还没有任何这类商品"
response.End()
end if
dim i
i=0
%><TABLE WIDTH="100%" BORDER="0" CELLPADDING="1" CELLSPACING="1" BGCOLOR="#f7fbff">
<TR> <TD WIDTH="20%" HEIGHT="105" VALIGN="top"> <%do while not rs.eof
i=i+1%> <TABLE WIDTH="80%" HEIGHT="68" BORDER="0" CELLPADDING="3" CELLSPACING="3">
<TR> <TD HEIGHT="58"><IMG SRC="images/paihang/top<%=i%>.gif" WIDTH="150" HEIGHT="50"></TD></TR>
</TABLE><%
if i>=3 then exit do
rs.movenext
loop%></TD><TD WIDTH="40%" VALIGN="top" BGCOLOR="#f7fbff">
<%i=0
rs.movefirst
do while not rs.eof
i=i+1%><TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="2">
<TR> <TD VALIGN="top"> <TABLE WIDTH="288" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR> <TD HEIGHT="21" BACKGROUND="images/paihang/dh.gif" STYLE="padding-left:20px"><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR> <TD WIDTH="57%"><IMG SRC="images/paihang/pl.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom">
<A HREF=product.asp?id=<%=rs("id")%> TARGET=_blank><IMG SRC="images/paihang/other.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom" BORDER=0></A></TD><TD WIDTH="43%" STYLE="padding-left:20px"><%if rs("ranknum")>0 and rs("rank")>0 then
other=rs("ranknum")\rs("rank")
else
other=0
end if
response.write "<img src=images/rank/"&other&".gif alt=评论星级 align=top>"
%></TD></TR> </TABLE></TD></TR> <TR> <TD BACKGROUND="images/paihang/b.gif" STYLE="padding-left:6px" HEIGHT="40"><%response.write "<a href=product.asp?id="&rs("id")&" target=_blank>"
if len(trim(rs("name")))>24 then
response.write left(trim(rs("name")),24)&"..."
else
response.write trim(rs("name"))
end if
response.write "</a>"
%> <BR> 名称:<%=trim(rs("makein"))%>
简介:<%=trim(rs("introduce"))%></TD></TR> <TR> <TD HEIGHT="2" BACKGROUND="images/paihang/dd.gif"></TD></TR>
</TABLE></TD></TR> </TABLE><%
if i=3 then exit do
rs.movenext
loop%></TD><TD WIDTH="40%" VALIGN="top" BGCOLOR="#f7fbff">
<%i=0
rs2.movefirst
do while not rs2.eof
i=i+1%><TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="2">
<TR> <TD VALIGN="top"><TABLE WIDTH="288" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR> <TD HEIGHT="21" BACKGROUND="images/paihang/dh.gif" STYLE="padding-left:20px"><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR> <TD WIDTH="57%"><IMG SRC="images/paihang/pl.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom">
<A HREF=product.asp?id=<%=rs2("id")%> TARGET=_blank><IMG SRC="images/paihang/other.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom" BORDER=0></A></TD><TD WIDTH="43%" STYLE="padding-left:20px">
<%if rs2("ranknum")>0 and rs2("rank")>0 then
other=rs2("ranknum")\rs2("rank")
else
other=0
end if
response.write "<img src=images/rank/"&other&".gif alt=评论星级 align=absbottom>"
%> </TD></TR> </TABLE></TD></TR> <TR> <TD BACKGROUND="images/paihang/b.gif" STYLE="padding-left:6px" HEIGHT="40">
<%response.write "<a href=product.asp?id="&rs2("id")&" target=_blank>"
if len(trim(rs2("name")))>24 then
response.write left(trim(rs2("name")),24)&"..."
else
response.write trim(rs2("name"))
end if
response.write "</a>"
%> <BR> 名称:<%=trim(rs2("makein"))%>
简介:<%=trim(rs2("introduce"))%> </TD></TR> <TR> <TD HEIGHT="2" BACKGROUND="images/paihang/dd.gif"></TD></TR>
</TABLE></TD></TR> </TABLE><%if i>=3 then exit do
rs2.movenext
loop%></TD></TR> </TABLE><TABLE WIDTH="100%" BORDER="0" CELLPADDING="1" CELLSPACING="1" BGCOLOR="#f7fbff">
<TR> <TD WIDTH="20%" HEIGHT="65" VALIGN="top"> <%if rs.recordcount>=4 then
rs.absoluteposition=4
i=3
do while not rs.eof
i=i+1%> <TABLE WIDTH="80%" HEIGHT="55" BORDER="0" CELLPADDING="3" CELLSPACING="2">
<TR> <TD HEIGHT="55"><IMG SRC="images/paihang/top<%=i%>.gif" WIDTH="150" HEIGHT="50"></TD></TR>
</TABLE><%
if i>=20 then exit do
rs.movenext
loop
end if%> </TD><TD WIDTH="40%" VALIGN="top" BGCOLOR="#f7fbff">
<%i=4
if rs.recordcount>=4 then
rs.absoluteposition=4
do while not rs.eof
i=i+1%> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="2">
<TR> <TD><TABLE WIDTH=288 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD HEIGHT="21" BACKGROUND="images/paihang_01.gif" STYLE="padding-left:20px"><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR> <TD WIDTH="59%" HEIGHT="18"><IMG SRC="images/paihang/pl.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom">
<A HREF=product.asp?id=<%=rs("id")%> TARGET=_blank><IMG SRC="images/paihang/other.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom" BORDER=0></A></TD><TD WIDTH="43%" STYLE="padding-left:20px">
<%if rs("ranknum")>0 and rs("rank")>0 then
other=rs("ranknum")\rs("rank")
else
other=0
end if
response.write "<img src=images/rank/"&other&".gif alt=评论星级 align=top>"
%> </TD></TR> </TABLE></TD></TR> <TR> <TD BACKGROUND="images/paihang_02.gif" STYLE="padding-left:6px" HEIGHT="28">
<%response.write "<a href=product.asp?id="&rs("id")&" target=_blank>"
if len(trim(rs("name")))>24 then
response.write left(trim(rs("name")),24)&"..."
else
response.write trim(rs("name"))
end if
response.write "</a>"
%> </TD></TR> <TR> <TD> <IMG SRC="images/paihang_04.gif" WIDTH=288 HEIGHT=3 ALT=""></TD></TR>
</TABLE></TD></TR> </TABLE><%
if i>20 then exit do
rs.movenext
loop
end if%> </TD><TD WIDTH="40%" VALIGN="top" BGCOLOR="#f7fbff">
<%i=4
if rs.recordcount>=4 then
rs2.absoluteposition=4
do while not rs2.eof
i=i+1%> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="2">
<TR> <TD><TABLE WIDTH=288 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD HEIGHT="21" BACKGROUND="images/paihang_01.gif" STYLE="padding-left:20px"><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR> <TD WIDTH="59%" HEIGHT="18"><IMG SRC="images/paihang/pl.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom">
<A HREF=product.asp?id=<%=rs2("id")%> TARGET=_blank><IMG SRC="images/paihang/other.gif" WIDTH="30" HEIGHT="15" ALIGN="absbottom" BORDER=0></A></TD><TD WIDTH="43%" STYLE="padding-left:20px">
<%Dim other
if rs2("ranknum")>0 and rs2("rank")>0 then
other=rs2("ranknum")\rs2("rank")
else
other=0
end if
response.write "<img src=images/rank/"&other&".gif alt=评论星级 align=top>"
%> </TD></TR> </TABLE></TD></TR> <TR> <TD BACKGROUND="images/paihang_02.gif" STYLE="padding-left:6px" HEIGHT="28">
<%response.write "<a href=product.asp?id="&rs2("id")&" target=_blank>"
if len(trim(rs2("name")))>24 then
response.write left(trim(rs2("name")),24)&"..."
else
response.write trim(rs2("name"))
end if
response.write "</a>"
%> </TD></TR> <TR> <TD> <IMG SRC="images/paihang_04.gif" WIDTH=288 HEIGHT=3 ALT=""></TD></TR>
</TABLE></TD></TR> </TABLE><%if i>20 then exit do
rs2.movenext
loop
end if
rs.close
rs2.close
set rs=nothing
set rs2=nothing
%> </TD></TR> </TABLE></TD></TR> </TABLE><!--#include file="include/footer.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -