<% web_robots="all" '用來告訴搜索機器人哪些頁面需要索引,哪些頁面不需要索引 web_designer="Rita Kao Orange" web_date="30-November-2010 16:00:00" web_description="德昌富鴻 - 富士多媒體線上購物" web_keywords="德昌富鴻 富士多媒體 線上購物 3C 音響 家電 LCD 螢幕 電視 數位 影音商城 投影機" web_title="德昌富鴻 - 富士多媒體線上購物 - 投影機、液晶電視" web_link="" web_css="" '本頁必要參數判斷(所有數字參數也先轉為文字格式) prodid=strfilter2(request("prodid"),"int")&"" nid=strfilter2(request("nid"),"int")&"" if strfilter2(request("num"),"int")&""<>"" then prodid=strfilter2(request("num"),"int")&"" '給後台相容用的 if prodid="" then response.redirect "/index.asp" response.end end if '基本資料載入 connection 'SQLProd = "SELECT 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) where product.num = "&prodid&" and product.Publish='1' " SQLProd = "SELECT product.* FROM product where product.num = "&prodid&" and product.Publish='1' and product.num not in (select num from product where (Udate+' '+Utime>replace(CONVERT(varchar(16),getdate(),120),'-','/') and Udate<>'') or (Ldate+' '+Ltime''))" set rsProdList= conn.execute(SQLProd) 'Response.Write SQLProd 'set rsProdList = Server.CreateObject("ADODB.Recordset") 'rsProdList.Open SQLProd,conn,3,2 if rsProdList is nothing or rsProdList.eof then 'response.write "此產品已下架!!" response.redirect "/index.asp" response.end else id1= rsProdList("MainClass") ph=id1 tProdSrc=rsProdList("ProdSrc") tProdType=rsProdList("ProdType") tBar_code_type=rsProdList("Bar_code_type") tBar_code=rsProdList("Bar_code") tProdName=rsProdList("ProdName") tsaleword=rsProdList("saleword") tMain_content=rsProdList("Main_content") tContent=rsProdList("Content") tModul=rsProdList("Modul") tHowToUse=rsProdList("HowToUse") tmaximum_sale=rsProdList("maximum_sale") '最大可購買數量設定 tUnitN=rsProdList("UnitN") tItemNum=rsProdList("ItemNum") thaveprice=rsProdList("haveprice") tnoprice=rsProdList("noprice") 'tCostPrice=rsProdList("CostPrice") tPrice1=rsProdList("Price1") tPrice2=rsProdList("Price2") tPrice3=rsProdList("Price3") tPrice4=rsProdList("Price4") if rsProdList("price_1") <>"" then tprice_1=Replace(rsProdList("price_1")," ","") else tprice_1="" end if if rsProdList("price_2") <>"" then tprice_2=Replace(rsProdList("price_2")," ","") else tprice_2="" end if if rsProdList("price_3") <>"" then tprice_3=Replace(rsProdList("price_3")," ","") else tprice_3="" end if if rsProdList("price_4") <>"" then tprice_4=Replace(rsProdList("price_4")," ","") else tprice_4="" end if if rsProdList("price_5") <>"" then tprice_5=Replace(rsProdList("price_5")," ","") else tprice_5="" end if if rsProdList("price_6") <>"" then tprice_6=Replace(rsProdList("price_6")," ","") else tprice_6="" end if tPoint1=rsProdList("Point1") tPoint_Cash1=rsProdList("Point_Cash1") tPoint_Cash2=rsProdList("Point_Cash2") tM1_Month=rsProdList("M1_Month") tM1_Price=rsProdList("M1_Price") tM2_Month=rsProdList("M2_Month") tM2_Price=rsProdList("M2_Price") tM3_Month=rsProdList("M3_Month") tM3_Price=rsProdList("M3_Price") tM4_Month=rsProdList("M4_Month") tM4_Price=rsProdList("M4_Price") if tPrice2<>0 and tCostPrice<>0 then tprofit=(tPrice2-tCostPrice)*100/tPrice2 else tprofit=0 end if tPicBig=rsProdList("PicBig") tPicMid=rsProdList("PicMid") tPicSml=rsProdList("PicSml") tPicLarge=rsProdList("PicLarge") oPicBig=array(rsProdList("PicBig_1"),rsProdList("PicBig_2"),rsProdList("PicBig_3"),rsProdList("PicBig_4")) 'tPicBig_1=rsProdList("PicBig_1") 'tPicBig_2=rsProdList("PicBig_2") 'tPicBig_3=rsProdList("PicBig_3") 'tPicBig_4=rsProdList("PicBig_4") 'tbenifit=rsProdList("benifit") 'tbenifitp=rsProdList("benifitp") tProdurl=rsProdList("Produrl") tLCon=rsProdList("LCon") tgov_ad_num=rsProdList("gov_ad_num") tservice_center=rsProdList("service_center") tpsinfo=rsProdList("psinfo") tPublish=rsProdList("Publish") tLdate=rsProdList("Ldate") tUdate=rsProdList("Udate") tLtime=rsProdList("Ltime") tUtime=rsProdList("Utime") web_description=rsProdList("p_description") '關鍵字 tkeyword=rsProdList("keyword") tkeyword=replace(tkeyword&"",", ",",") reDim kword(10) if tkeyword<>"" then keyword_array=split(tkeyword,",") for i=0 to Ubound(keyword_array) kword(i)=keyword_array(i) if keyword_array(i)<>"" then metakeyword=metakeyword&","&keyword_array(i) 'SEO用 next end if speciallogo=rsProdList("speciallogo") tClassItem=rsProdList("ClassItem") '注目商品 '屬性區 tnewitem=rsProdList("newitem") '最新商品 thotitem=rsProdList("hotitem") '熱門商品 tsalesitem=rsProdList("salesitem") '特價商品 tbestitem=rsProdList("bestitem") '人氣商品 tfisrtitem=rsProdList("fisrtitem") '會員首購 tlimititem=rsProdList("limititem") '網路限定商品 tnewsaleitem=rsProdList("newsaleitem") '新品特惠 toutletitem=rsProdList("outletitem") '出清商品 '花車區( ttimelimititem=rsProdList("timelimititem") '限時商品 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 tclickno=rsProdList("clickno") 'if tnewitem="yes" then tnewcheck="checked" 'if thotitem="yes" then thotcheck="checked" 'if tsalesitem="yes" then tsalescheck="checked" 'if thaveprice="yes" then thavepricecheck="checked" 'if thaveprice="no" or thaveprice="" then thaveprice2check="checked" 'rsProdList("clickno")=rsProdList("clickno")+1 'rsProdList.update sqlu="UPDATE [product] SET [clickno]="&tclickno+1&" where num="&prodid conn.execute(sqlu) if thaveprice="yes" then if session("memberlogin") = empty or session("memberlogin")="" then haveprice=FormatNumber(tPrice2,0) else haveprice=FormatNumber(tPrice3,0) end if else haveprice=""&tnoprice&"" end if if tpriceshow="" then tpriceshow=haveprice if thaveprice="no" then tpriceshow=tnoprice if tPicBig<>"" then picshow="" end if for gg=0 to 3 if oPicBig(gg)<>"" then opicshow=opicshow&" " end if next if opicshow<>"" then opicshow=" "&opicshow end if 'SEO優化 web_title=web_title&" - "&tProdName web_keywords=web_keywords&","&tProdName&metakeyword '樣式規格 'maxbuynum=9 '最大可購買數量設定 firstnum=0 prod_style_type=rsProdList("prod_style_type") style_name_1=rsProdList("style_name_1") style_data_1=rsProdList("style_data_1") style_name_2=rsProdList("style_name_2") style_data_2=rsProdList("style_data_2") style_name_3=rsProdList("style_name_3") style_data_3=rsProdList("style_data_3") SQL = "Select * From p_module where ProdID="&sqlfilter2(ProdID)&" order by module_type,module_num" set rsModule = conn.execute(SQL) if prod_style_type=1 then p_count=rsModule("Module_ItemNum") module_num=rsModule("module_num") '編號 module_ItemNum=rsModule("module_ItemNum") if module_ItemNum&""="" then module_ItemNum="0" module_ItemNum_safe=rsModule("module_ItemNum_safe") if module_ItemNum_safe&""="" then module_ItemNum_safe="0" module_status=rsModule("module_status") if clng(module_ItemNum) > clng(tmaximum_sale) then module_setNum=tmaximum_sale else module_setNum=module_ItemNum else while not rsModule.eof if rsModule("module_type")<>"" then module_num=rsModule("module_num") '編號 module_type=rsModule("module_type") '樣式代號 module_sno=rsModule("module_sno") '料號 module_pic=rsModule("module_pic") module_info=rsModule("module_info") module_ItemNum=rsModule("module_ItemNum") if module_ItemNum&""="" then module_ItemNum="0" module_ItemNum_safe=rsModule("module_ItemNum_safe") if module_ItemNum_safe&""="" then module_ItemNum_safe="0" module_status=rsModule("module_status") Module_sale_show="" discheck="" displaycolor="" module_setNum=module_ItemNum if clng(module_ItemNum) > clng(tmaximum_sale) then module_setNum=tmaximum_sale else module_setNum=module_ItemNum if module_status="0" then module_status_show=" (尚未開賣)" displaycolor="style=""COLOR: #555555""" discheck="disabled" module_setNum=0 elseif module_status="1" then module_status_show="" displaycolor="" p_count=p_count+rsModule("Module_ItemNum") '總庫存量 elseif module_status="2" then module_status_show=" (限量:"&module_ItemNum&")" displaycolor="style=""COLOR: #ff0000""" p_count=p_count+rsModule("Module_ItemNum") '總庫存量 elseif module_status="3" then module_status_show=" (缺貨待補)" displaycolor="style=""COLOR: #555555""" discheck="disabled" module_setNum=0 elseif module_status="4" then module_status_show=" (已停售)" displaycolor="style=""COLOR: #555555""" discheck="disabled" module_setNum=0 end if if firstnum="" then firstnum=module_setNum '樣式代號,最大購買數量 if module_ItemNum<>0 then Modulearray=Modulearray&"" else Modulearray=Modulearray&"" end if end if rsModule.movenext wend end if if Modulearray<>"" then Modulearray="" end if end if web_link="" %>
<% if nid="" then sql_nid="select * from pclass where id1="&ph set rs_nid = conn.execute(sql_nid) if rs_nid("id2")<>0 then n_nid=split(rs_nid("id2"),",") sql_nid2="select * from pclass where id1="&n_nid(ubound(n_nid)-1) set rs_nid2 = conn.execute(sql_nid2) nid=rs_nid2("range")/2 else nid=rs_nid("range")/2 end if end if %>
<% sql="select * from pclass where id1="&ph set rs = conn.execute(sql) if not rs.eof then if rs("id2")="0" then mname=rs("name") menu_title=""&rs("name")&"" id1_ph=rs("id1")&",0" else id1_ph=rs("id1")&","&rs("id2") ph_l=split(rs("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 if i=ubound(ph_l)-1 then menu_title=menu_title&""&rs_l("name")&" > " else menu_title=menu_title&""&rs_l("name")&" > " end if end if next menu_title=menu_title&""&rs("name")&"" end if end if %>
ZOOM 推文到facebook 推文到Plurk
<%if ttimelimit_price<>"" then%>

<%=right("0"&month(ttimelimit_Udate),2)&"/"&right("0"&day(ttimelimit_Udate),2)%>(<%=WeekdayName(DatePart("w",ttimelimit_Udate))%>) <%=ttimelimit_Utime%>

<%=right("0"&month(ttimelimit_Ldate),2)&"/"&right("0"&day(ttimelimit_Ldate),2)%>(<%=WeekdayName(DatePart("w",ttimelimit_Ldate))%>) <%=ttimelimit_Ltime%>

<%end if%>

<%=tsaleword%>

<%=tProdName%>

<%=tMain_content%>
<% 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 tPrice=tPrice2 haveprice="
  • 貨號:"&tProdType&"
  • 建議價:$"&tPrice1&"
  • 網路價:$"&tPrice2&"
  • " tprices1=tprice_1 tprices2=tprice_4 elseif loginlevel="2" then tPrice=tPrice3 haveprice="
  • 貨號:"&tProdType&"
  • 建議價:$"&tPrice1&"
  • 網路價:$"&tPrice2&"
  • VIP 價:$"&tPrice3&"
  • " tprices1=tprice_2 tprices2=tprice_5 elseif loginlevel="3" then tPrice=tPrice4 haveprice="
  • 貨號:"&tProdType&"
  • 建議價:$"&tPrice1&"
  • 網路價:$"&tPrice2&"
  • VIP 價:$"&tPrice3&"
  • 高級VIP價:$"&tPrice4&"
  • " tprices1=tprice_3 tprices2=tprice_6 else tPrice=tPrice2 haveprice="
  • 貨號:"&tProdType&"
  • 建議價:$"&tPrice1&"
  • 網路價:$"&tPrice2&"
  • " tprices1=tprice_1 tprices2=tprice_4 end if if ttimelimit_price<>"" then tPrice=ttimelimit_price haveprice=replace(haveprice," class=""vip""","") haveprice=haveprice&"
  • 貨號:"&tProdType&"
  • 搶購價:$"&ttimelimit_price&"
  • " end if %>
      <%=haveprice%> <%if tprices1&""<>"" or tprices2&""<>"" then%>
    • 分期價: <% tprices1=","&tprices1&"," tprices2=","&tprices2&"," m_value=array(0,3,31,6,61,12,121,18,181,24,30) k_count=1 for i=1 to 10 if m_value(i)=3 then banks=ubound(b3bank)+1 elseif m_value(i)=31 then banks=ubound(b31bank)+1 elseif m_value(i)=6 then banks=ubound(b6bank)+1 elseif m_value(i)=61 then banks=ubound(b61bank)+1 elseif m_value(i)=12 then banks=ubound(b12bank)+1 elseif m_value(i)=121 then banks=ubound(b121bank)+1 elseif m_value(i)=18 then banks=ubound(b18bank)+1 elseif m_value(i)=181 then banks=ubound(b181bank)+1 elseif m_value(i)=24 then banks=ubound(b24bank)+1 elseif m_value(i)=30 then banks=ubound(b30bank)+1 end if if instr(tprices1,","&m_value(i)&",")>0 or instr(tprices2,","&m_value(i)&",")>0 then if instr(tprices1,","&m_value(i)&",")>0 and instr(tprices2,","&m_value(i)&",")>0 then banks=banks+ubound(abank)+1 chbank="ab" elseif instr(tprices1,","&m_value(i)&",")>0 and instr(tprices2,","&m_value(i)&",")<=0 then banks=ubound(abank)+1 chbank="a" elseif instr(tprices1,","&m_value(i)&",")<=0 and instr(tprices2,","&m_value(i)&",")>0 then banks=banks chbank="b" elseif instr(tprices1,","&m_value(i)&",")<=0 and instr(tprices2,","&m_value(i)&",")<=0 then banks=0 chbank="" end if if m_value(i)=31 then %> <% elseif m_value(i)=61 then %> <% elseif m_value(i)=121 then %> <% elseif m_value(i)=181 then %> <% else %> <% end if k_count=k_count+1 end if next %>
      " width="138"><%=left(m_value(i),len(m_value(i))-1)%>期3% " width="88">每期<%=int(int(tPrice*1.03+0.5)/int(left(m_value(i),len(m_value(i))-1))+0.5)%> " width="88">接受<%=banks%>家銀行
      " width="138"><%=left(m_value(i),len(m_value(i))-1)%>期3.5% " width="88">每期<%=int(int(tPrice*1.035+0.5)/int(left(m_value(i),len(m_value(i))-1))+0.5)%> " width="88">接受<%=banks%>家銀行
      " width="138"><%=left(m_value(i),len(m_value(i))-1)%>期6% " width="88">每期<%=int(int(tPrice*1.06+0.5)/int(left(m_value(i),len(m_value(i))-1))+0.5)%> " width="88">接受<%=banks%>家銀行
      " width="138"><%=left(m_value(i),len(m_value(i))-1)%>期7.5% " width="88">每期<%=int(int(tPrice*1.075+0.5)/int(left(m_value(i),len(m_value(i))-1))+0.5)%> " width="88">接受<%=banks%>家銀行
      " width="138"><%=m_value(i)%>期0利率 " width="88">每期<%=int(tPrice/m_value(i)+0.5)%> " width="88">接受<%=banks%>家銀行
    • <%end if%> <% if p_count<>0 then if prod_style_type=1 then %>
    • 數量: <% if module_status=2 then Response.Write "(限量:"&module_ItemNum&")" end if %>
    • <%else%>
    • 規格:<%=Modulearray%> 數量:
    • <% end if end if %>
    • 加價購: 看加價購清單
    • 付款方式: <% txt="" if instr(tM1_Month,"ATM,")>0 then txt=txt&" ATM轉帳ATM轉帳" end if if instr(tM1_Month,"CARD,")>0 or tprices1&""<>"" or tprices2&""<>"" then txt=txt&" 信用卡信用卡" end if if instr(tM1_Month,"store, 7-11, lifeet, okstore")>0 then txt=txt&"
                    超商繳費不取貨" end if Response.Write txt %>
    • 交貨方式:自行取貨 / 物流配送 (購物滿1999元免運費)
    <% if tUdate&""<>"" then cUdate=replace(tUdate,"/","")&replace(tUtime,":","") cLdate=replace(tLdate,"/","")&replace(tLtime,":","") cnow=year(date())&right("0"&month(date()),2)&right("0"&day(date()),2)&replace(FormatDateTime(now(),4),":","") if cnow>=cUdate and cnow<=cLdate then showp="y" else showp="n" end if else showp="y" end if 'Response.Write cUdate&"-"&cLdate&"-"&cnow %> <% if prod_style_type=1 then if p_count=0 or module_status ="3" or module_status ="4" then Response.Write "" elseif showp="n" or module_status ="0" then Response.Write "" elseif module_status ="1" or module_status ="2" or showp="y" then Response.Write "  " end if else if p_count=0 then Response.Write "" elseif showp="n" then Response.Write "" elseif showp="y" then Response.Write "  " end if end if %> 加入追蹤
    • 商品說明
    • 商品規格
    • 保固與運送
    • 其他說明
    <%="

    商品說明

    "&tContent&"

    "%>
    top
    <% showSQL = "SELECT d.*,r.* FROM prodsales_Rule r,prodsales_addbuy_data d where d.addbuy_rule=r.num and rule_name='加價購' and rule_Udate+' '+rule_Utime <= getdate() and rule_Ldate+' '+rule_Ltime >= getdate() and r.publish='1' and d.publish='1' and (d.addbuy_object is null or d.addbuy_object='' or charindex(',"&prodid&",',','+d.addbuy_object+',')>0) order by addbuy_rule asc,addbuyitem asc" set showProd_addbuy = conn.execute(showSQL) if not showProd_addbuy.eof then addbuy_id=showProd_addbuy("num") %>

    加購專區

    <% c_count=1 ShowProd=1 while not showProd_addbuy.eof if showProd_addbuy("rule_class")=0 or showProd_addbuy("addbuy_object")=prodid then '花車規則為全館或指定商品編號為此商品就顯示 chkSQL = "SELECT top 1 * FROM product where num="&strfilter2(showProd_addbuy("addbuyitem"),"int")&" and Publish='1'" '確定商品編號是否存在 set ChkProd_Num = conn.execute(chkSQL) if not ChkProd_Num.eof then if ShowProd=1 then addbuy_item=showProd_addbuy("addbuyitem") '給購物車用的加價購商品編號集合(以,隔開) if ShowProd>1 then addbuy_item=addbuy_item&","&showProd_addbuy("addbuyitem") addbuy_ProdID=ChkProd_Num("num") addbuy_PicSml=ChkProd_Num("PicSml") addbuy_ProdName=ChkProd_Num("ProdName") addbuy_saleword=ChkProd_Num("saleword") addbuy_Main_content=ChkProd_Num("Main_content") addbuy_Price1=showProd_addbuy("addbuy_price") addbuy_max=showProd_addbuy("addbuy_max") '確定花車商品數量不為零 addp_count=0 addSQL = "Select * From p_module where ProdID="&ChkProd_Num("num")&" order by module_type,module_num" set addrsModule = conn.execute(addSQL) if ChkProd_Num("prod_style_type")=1 then addp_Module_num=addrsModule("Module_num") addp_Module_info=addrsModule("Module_info") addp_count=addrsModule("Module_ItemNum") %> >

    <%=addbuy_ProdName%>

    加購價:<%=addbuy_Price1%>

    數量: <%if addp_count=0 then%> 已售完 <%else%> 加購: " /> <%end if%>
    <% ShowProd=ShowProd+1 c_count=c_count+1 else while not addrsModule.eof if addrsModule("module_type")<>"" then addp_Module_num=addrsModule("Module_num") '樣式編號 addp_Module_info=addrsModule("Module_info") '規格 addp_count=addrsModule("Module_ItemNum") '總庫存量 %> >

    <%=addbuy_ProdName&"-"&addp_Module_info%>

    加購價:<%=addbuy_Price1%>

    數量: <%if addp_count=0 then%> 已售完 <%else%> 加購: " /> <%end if%>
    <% ShowProd=ShowProd+1 c_count=c_count+1 end if addrsModule.movenext wend end if end if end if 'c_count=c_count+1 showProd_addbuy.movenext wend %>
    <%end if%>
    <%if p_count=0 or showp="n" then%> 已售完 <%else%> 我要購買 放入購物車 <%end if%> 加入追蹤