<%
sql="select * from pclass where id1="&ph
set rsPath = conn.execute(sql)
if not rsPath.eof then
if rsPath("id2")="0" then
mname=rsPath("name")
menu_title="
"
id1_ph=rsPath("id1")&",0"
else
id1_ph=rsPath("id1")&","&rsPath("id2")
ph_l=split(rsPath("id2"),",")
for i=ubound(ph_l)-1 to 0 step -1
sql_l="select * from pclass where id1="&ph_l(i)
set rs_l= conn.execute(sql_l)
if i=ubound(ph_l)-2 then mname=rs_l("name") end if
if mname="" then mname=rs("name") end if
if not rs_l.eof then
menu_title=menu_title&"
目前位置 :
首頁 > <%=menu_title%>
<%if not rsProdList.eof then%>
<%
rsProdList_c=1
while not rsProdList.eof
ProdId=rsProdList("num")
ProdName=rsProdList("ProdName")
saleword=rsProdList("saleword")
PicMid=trim(rsProdList("PicMid"))
ttimelimit_price=rsProdList("timelimit_price")
if ttimelimit_price&""<>"" then
ttimelimit_Udate=rsProdList("timelimit_Udate")
ttimelimit_Utime=rsProdList("timelimit_Utime")
ttimelimit_Ldate=rsProdList("timelimit_Ldate")
ttimelimit_Ltime=rsProdList("timelimit_Ltime")
if ttimelimit_Udate&""<>"" then ttUdate=replace(ttimelimit_Udate,"/","")
if ttimelimit_Utime&""<>"" then ttUtime=replace(ttimelimit_Utime,":","")
if ttimelimit_Ldate&""<>"" then ttLdate=replace(ttimelimit_Ldate,"/","")
if ttimelimit_Ltime&""<>"" then ttLtime=replace(ttimelimit_Ltime,":","")
ttUdate=ttUdate&ttUtime
ttLdate=ttLdate&ttLtime
newtime=year(now)&right("0"&month(now),2)&right("0"&day(now),2)&right("0"&hour(now),2)&right("0"&minute(now),2)
if int(ttUdate)<=int(newtime) and int(ttLdate)>=int(newtime) then
else
ttimelimit_price=""
end if
end if
if PicMid="" then
PicMid=""
else
PicMid="
"
end if
if session("memberlogin")<>"" then
tmemberlogin=split(session("memberlogin"),"||")
loginnum=tmemberlogin(0) '會員自動編號
loginname=tmemberlogin(1) '會員姓名
account=tmemberlogin(2) '會員帳號
loginlevel=tmemberlogin(3) '會員等級
checkword=tmemberlogin(4) '檢查碼
end if
if loginlevel="1" then
haveprice="網路價:
"&rsProdList("Price2")&""
elseif loginlevel="2" then
haveprice="VIP價:
"&rsProdList("Price3")&""
elseif loginlevel="3" then
haveprice="高級VIP價:
"&rsProdList("Price4")&""
else
haveprice="網路價:
"&rsProdList("Price2")&""
end if
if ttimelimit_price<>"" then
haveprice="搶購價:
"&ttimelimit_price&""
end if
%>
class="last"<%end if%>>
-
-
<%=ProdName%>
<%=haveprice%>
<%if rsProdList_c=3 then%>
<%end if%>
<%
rsProdList_c=rsProdList_c+1
rsProdList.movenext
wend
%>
<%end if%>
<%
for i=1 to 3
if i=1 then
pn="hotitem"
elseif i=2 then
pn="bestitem"
elseif i=3 then
pn="newitem"
end if
if setup_db_type="access2000" then
SQLSubProd = "SELECT top 10 product.*, ItemNum_sum FROM (product left JOIN (select P_module.prodid, sum(P_module.Module_ItemNum) as ItemNum_sum from P_module where Module_status in ('1','2','3') group by prodid ) as C ON C.prodid=product.num) "
SQLSubProd = SQLSubProd & "where (product."&pn&"='1') and ( product.MainClass="&ph&" or instr('||'+product.OldClass+'||','||"&ph&"||')>0 or product.MainClass in ("&id1list&") ) and product.Publish='1' and ItemNum_sum is not NULL "
SQLSubProd = SQLSubProd & "order by product.ClassItem desc "
else
'CHARINDEX 不能用於 text、ntext 和 image 資料類型
'SQLSubProd = "SELECT top 10 product.*, ItemNum_sum FROM (product left JOIN (select P_module.prodid, sum(P_module.Module_ItemNum) as ItemNum_sum from P_module where convert(int,Module_status) between 1 and 2 group by prodid having sum(P_module.Module_ItemNum)>0 ) as C ON C.prodid=product.num) "
SQLSubProd = "SELECT top 10 product.*, ItemNum_sum FROM (product left JOIN (select P_module.prodid, sum(P_module.Module_ItemNum) as ItemNum_sum from P_module group by prodid ) as C ON C.prodid=product.num) "
SQLSubProd = SQLSubProd & "where (product."&pn&"='1') and ( product.MainClass="&ph&" or charindex('||"&ph&"||','||'+product.OldClass+'||')>0 or product.MainClass in ("&id1list&") ) and product.Publish='1' and ItemNum_sum is not NULL "
SQLSubProd = SQLSubProd & "and product.num not in (select num from product where (Udate+' '+Utime>replace(CONVERT(varchar(16),getdate(),120),'-','/') and Udate<>'') or (Ldate+' '+Ltime
'')) "
SQLSubProd = SQLSubProd & "order by product.ClassItem desc "
end if
set rsProdList = Server.CreateObject("ADODB.Recordset")
rsProdList.Open SQLSubProd,conn,1,1
%>
1 then Response.Write "style=""display:none""" end if%>>
<%
p_count=1
while not rsProdList.eof
ProdId=rsProdList("num")
ProdName=rsProdList("ProdName")
saleword=rsProdList("saleword")
PicSml=trim(rsProdList("PicSml"))
ttimelimit_price=rsProdList("timelimit_price")
if ttimelimit_price&""<>"" then
ttimelimit_Udate=rsProdList("timelimit_Udate")
ttimelimit_Utime=rsProdList("timelimit_Utime")
ttimelimit_Ldate=rsProdList("timelimit_Ldate")
ttimelimit_Ltime=rsProdList("timelimit_Ltime")
if ttimelimit_Udate&""<>"" then ttUdate=replace(ttimelimit_Udate,"/","")
if ttimelimit_Utime&""<>"" then ttUtime=replace(ttimelimit_Utime,":","")
if ttimelimit_Ldate&""<>"" then ttLdate=replace(ttimelimit_Ldate,"/","")
if ttimelimit_Ltime&""<>"" then ttLtime=replace(ttimelimit_Ltime,":","")
ttUdate=ttUdate&ttUtime
ttLdate=ttLdate&ttLtime
newtime=year(now)&right("0"&month(now),2)&right("0"&day(now),2)&right("0"&hour(now),2)&right("0"&minute(now),2)
if int(ttUdate)<=int(newtime) and int(ttLdate)>=int(newtime) then
else
ttimelimit_price=""
end if
end if
if PicSml="" then
PicSml=""
else
PicSml="
"
end if
if session("memberlogin")<>"" then
tmemberlogin=split(session("memberlogin"),"||")
loginnum=tmemberlogin(0) '會員自動編號
loginname=tmemberlogin(1) '會員姓名
account=tmemberlogin(2) '會員帳號
loginlevel=tmemberlogin(3) '會員等級
checkword=tmemberlogin(4) '檢查碼
end if
if loginlevel="1" then
haveprice="網路價:
"&rsProdList("Price2")&""
elseif loginlevel="2" then
haveprice="VIP價:
"&rsProdList("Price3")&""
elseif loginlevel="3" then
haveprice="高級VIP價:
"&rsProdList("Price4")&""
else
haveprice="網路價:
"&rsProdList("Price2")&""
end if
if ttimelimit_price<>"" then
haveprice="搶購價:
"&ttimelimit_price&""
end if
%>
>
-
-
<%=ProdName%>
<%=haveprice%>
<%
p_count=p_count+1
rsProdList.movenext
wend
%>
<%next%>