|
[用途] |
<%
'dim anclassid
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='用途'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=4 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
[对象] |
<%
'dim anclassid
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='对象'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=4 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
[花材] |
<%
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='品种'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=3 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
[节日] |
<%
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='节日'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=4 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
[价格] |
<%
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='价格'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=2 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
|
创意花礼: |
更多>> |
|
<%
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='创意花礼'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=2 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
|
商务鲜花: |
更多>> |
|
<%
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclass,anclassid from shop_anclass where anclass='商务'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=2 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
|
美食: |
更多>> |
|
|
蛋糕
<%
'dim anclassid
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclassid from shop_anclass where anclass='蛋糕'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=4 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
其他
<%
'dim anclassid
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclassid from shop_anclass where anclass='其他食品'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=4 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
|
|
礼 品: |
更多>> |
|
|
玩具
<%
'dim anclassid
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclassid from shop_anclass where anclass='礼品'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=3 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
饰品
<%
'dim anclassid
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select anclassid from shop_anclass where anclass='饰品'",conn,1,1
if rs1.bof and rs1.eof then
response.write "分类中没有内容!"
else
anclassid=rs1("anclassid")
rs1.close
set rs1=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclass,nclassid from shop_nclass where anclassid="&anclassid,conn,1,1
do while not rs.eof
%>
<%
i=1
do while i<=3 and not rs.eof
i=i+1
%>
|
<%
rs.movenext
loop
%>
<%
loop
rs.close
set rs=nothing
%>
|
|
|
|
|
 您的位置:
<%
class1=request.querystring("class")
banci=request.querystring("banci")
if banci="" then banci="0" end if
select case class1
case "情人"
response.Redirect "/images/loveday/2009/index.asp"
case "春节"
response.Redirect "/chunjie/index.asp"
case "圣诞"
response.Redirect "/christmas/index.asp"
case "七夕"
response.Redirect "/images/7xi/index/index.asp"
end select
obj=request.querystring("obj")
if nclassid="" then
response.write " 首页"
response.write " > "
response.write class1
if obj="价格" then
response.write " 元以下"
end if
response.write ""
response.write "商品列表"
else
response.write "  "
end if%>
|
|
<%
'----------推荐4商品
top_sqlstr="select top 4 * from shop_books where bestbook=1 and banci="&banci&" and class like '%"&class1&"%' order by adddate desc"
select case obj
case "品种" top_sqlstr="select top 4 * from shop_books where bestbook=1 and banci=0 and bookname like '%"&class1&"%' or class like '%"&class1&"%' order by adddate desc"
case "价格" top_sqlstr="select top 4 * from shop_books where bestbook=1 and huiyuanjia<="&class1&" order by adddate desc"
end select
'response.write top_sqlstr
' response.end
'----------推荐茶叶商品开始
if class1="茶叶" or class1="茶" then
top_sqlstr="select * from shop_books where bestbook=1 and class like '%茶%' and banci=4 order by adddate desc"
end if
'----------推荐茶叶商品结束
set rs5=server.CreateObject("adodb.recordset")
rs5.open top_sqlstr,conn,1,1
if rs5.eof and rs5.bof then
Response.Write " "
Response.Write " "
Response.Write " "
Response.Write " "
Response.Write " 对不起,此类别商品暂无照片! "
end if
do while not rs5.eof
%>
|
|
¥<%=rs5("shichangjia")%>.00 |
|
<%
rs5.movenext
loop
rs5.close
set rs5=nothing
'-----结束4花
%>
|
|
<%response.write class1
if obj="价格" then
response.write "元以下"
end if
%>
商品专栏 |
<%'开始分页
Const MaxPerPage=16
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
sqlstr="select * from shop_books where class like '%"&class1&"%' and banci="&banci&" order by adddate"
select case obj
case "品种" sqlstr="select * from shop_books where bookname like '%"&class1&"%' or class like '%"&class1&"%' and banci=0 order by adddate"
case "价格" sqlstr="select * from shop_books where banci=0 and huiyuanjia<="&class1&" and banci=0 order by shichangjia desc"
end select
if class1="果篮" or class1="水果篮" then
sqlstr="select * from shop_books where banci=5 order by adddate"
end if
if class1="茶叶" or class1="茶" then
sqlstr="select * from shop_books where class like '%茶%' and banci=4 order by adddate"
end if
'response.Write sqlstr
'response.Write banci
if nclassid="" then
set rs=server.CreateObject("adodb.recordset")
rs.open sqlstr,conn,1,1
else
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_books where nclassid="&nclassid&" and banci="&banci&" order by adddate",conn,1,1
end if
'if err.number<>0 then
'response.write "数据库中无数据"
'end if
if rs.eof And rs.bof then
Response.Write " 对不起,此分类暂时还没有商品! "
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"class.asp"
else
if (currentPage-1)*MaxPerPage
<%
do while not rs.eof
%>
<%
n=1
do while n<=4 and not rs.eof
n=n+1
%>
<%response.write "  "
%>
|
<%
rs.movenext
loop
%>
<% i=i+1
if i>=4 then exit do
'rs.movenext
loop
%>
|
<%
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
Response.Write ""
End Function
%>
|
|
|