📄 top.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<title><%=webname%>--商品排行榜</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp" -->
<table width="770" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#EDECEC">
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<table width="748" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="27" background="images/bjtop.gif">
<div align="right">
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from sh_sort order by anclassidorder",conn,1,1
if rs.eof and rs.bof then
response.write "目前还没有分类"
else%>
<select name="anclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
<option selected>--请选择商品分类--</option>
<option value=top.asp?id=0>查讯总体排行</option>
<%do while not rs.eof%>
<option value="top.asp?id=<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
<%rs.movenext
loop
end if
rs.close
set rs=nothing
%>
</select>
</div>
</td>
</tr>
</table>
<table width="748" border="0" align="center" cellpadding="1" cellspacing="1">
<tr background="images/bjtop.gif">
<td width="101" valign=bottom height="30"> </td>
<td width="18" height="30"> </td>
<td width="323" height="30"><b><font color="#FF9900">销售排行榜</font></b></td>
<td width="12" height="30"> </td>
<td width="306" height="30"><b><font color="#FF9900">热点商品排行榜</font></b></td>
</tr>
<tr valign="top">
<td height="225" colspan="5" bgcolor="#FFFFFF">
<%dim anclassid
anclassid=request.QueryString("id")
set rs=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
if anclassid=0 or anclassid="" then
rs.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from sh_chanpin order by chengjiaocount desc",conn,1,1
rs2.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from sh_chanpin order by liulancount desc",conn,1,1
else
rs.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from sh_chanpin where anclassid="&anclassid&" order by chengjiaocount desc",conn,1,1
rs2.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from sh_chanpin where anclassid="&anclassid&" order by liulancount desc",conn,1,1
end if
if rs.eof and rs.bof then
response.write "<div align=center>目前还没有任何商品</div>"
'response.End
else
dim i
i=0
%>
<table width="100%" border="0" cellpadding="1" cellspacing="2">
<tr>
<td width="16%" 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">
<div align="center"><img src="images/top/top<%=i%>.gif"></div>
</td>
</tr>
</table>
<%
if i>=3 then exit do
rs.movenext
loop%>
</td>
<td width="44%" valign="top">
<%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" style="padding-left:20px">
<table width="103%" border="0" cellspacing="0" cellpadding="0" height="17">
<tr>
<td width="56%"><a href="list.asp?id=<%=rs("bookid")%>" target=_blank><font color="#999999">查看详细信息</font></a>
</td>
<td width="44%" style="padding-left:20px">
<%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级 align=top>"
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding-left:6px" height="22">
<%response.write "<a href=list.asp?id="&rs("bookid")&" target=_blank>"
if len(trim(rs("bookname")))>24 then
response.write left(trim(rs("bookname")),24)&"..."
else
response.write trim(rs("bookname"))
end if
response.write "</a>"
%>
</td>
</tr><tr>
<td > <a href="javascript:;" onClick="javascript:window.open('shopcart.asp?id=<%=rs("bookid")%>&action=add','gouwu','width=600,height=600,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/goumai.gif" width="40" height="18" border=0></a> <a href="javascript:;" onClick="javascript:window.open('favorites.asp?id=<%=rs("bookid")%>&action=add','shouchang','width=600,height=600,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/Favorites.gif" width="40" height="18" border=0></a></td>
</tr>
<tr>
<td height="2" background="images/bj_x1.gif"></td>
</tr>
</table>
</td>
</tr>
</table>
<%
if i=3 then exit do
rs.movenext
loop%>
</td>
<td width="40%" valign="top">
<%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" style="padding-left:20px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="57%"><a href="list.asp?id=<%=rs2("bookid")%>" target=_blank><font color="#999999">查看详细信息</font></a>
</td>
<td width="43%" style="padding-left:20px">
<%if rs2("pingjizong")>0 and rs2("pingji")>0 then
xx=rs2("pingjizong")\rs2("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级 align=absbottom>"
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding-left:6px" height="22">
<%response.write "<a href=list.asp?id="&rs2("bookid")&" target=_blank>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -