<!--#include file="include/config.asp" -->
<%
call aspsql()
Page=request("page")
If not isNumeric(page) then
response.redirect "main.asp"
response.end
end if
pagecount=page

SubLar=trim(request("LarCode"))
SubMid=trim(request("MidCode"))
action=trim(request("action"))
trcode=trim(request("trcode"))

if action="hot" and page<=1 then
conn.execute ("update bproduc set ClickTimes=ClickTimes-1 where ClickTimes="&conn.execute ("select max(ClickTimes) as maxc from bproduc where online=true")("maxc"))
end if

sqlprod="select * from bproduc where online=true "
if SubLar<>"" then sqlprod = sqlprod + "and LarCode='"&SubLar&"'"
if SubMid<>"" then sqlprod = sqlprod + "and MidCode='"&SubMid&"'"
if len(trcode)>0 then sqlprod=sqlprod+" and trecode='"&trcode&"'  "

if action="tuijian" then 
title="精品推荐"
sqlprod = sqlprod + " and  Remark='1' order by Tjdate desc,AddDate desc,ClickTimes desc"
elseif action="new" then 
title="最新商品"
sqlprod = sqlprod + " order by AddDate desc,LarCode desc,MidCode desc"
elseif action="tejia" then 
title="特价商品"
sqlprod = sqlprod + " and tejia='1' order by AddDate desc,ClickTimes desc"
elseif action="hot" then
title="热门排行"
sqlprod = sqlprod + " order by ClickTimes desc"
else
title=SubLar &"-"& Submid
sqlprod = sqlprod + "order by LarCode,MidCode,AddDate desc"
end if

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<title><%=title%>-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitename%>,<%=title%>">
<meta name="keywords" content="<%=sitename%>,<%=title%>">
<style type=text/css>
.pic1{MARGIN-TOP: -135px;MARGIN-left:0px}
.pic2{padding-top:6px}
</style>
<script language=javascript src=include/pic2.js></script>

</head>
<center>
  <!--#include file="top.asp"-->
 <TABLE width=980 border=0 cellpadding=0 cellspacing=0 align=center bgcolor=#ffffff class="grayline">
  <TR><td bgcolor="FFFBF7"  align="left" valign="top" width="180">
        <!--#include file="tree.asp"-->
  </TD>
  </TR></TABLE>
   <TABLE width=980 border=0 cellpadding=0 cellspacing=0 align=center bgcolor=#ffffff class="grayline">
  <TR><td   align="left" valign="top" height="10">
        
  </TD>
  </TR></TABLE>
<!--#include file="down.asp"--></body></center>

</html>
<%
conn.close
set conn=nothing
%>
