<% main() Sub main() 'インターネットアクセス拒否時に強制許可するフラグ If Request("permit") <> "" Then Session("ECMallPermit") = Request("permit") End If If Not(InternetCheck()) Then Exit Sub End If If Not(VisitorCheck()) Then Exit Sub End If 'Response.Write(GB_VisitorID) 'Exit Sub %> <% If Request("Logout") = "1" Then '管理者ログアウト時の処理 Session("ECMallSysAdmin") = "" GB_SysAdmin = Session("ECMallSysAdmin") Session("ECMallShopAdmin") = "" GB_ShopAdmin = Session("ECMallShopAdmin") End If Dim ItemViewCnt ItemViewCnt = 30 '1ページの表示件数 Dim Page Page = Request("Page") If Page = "" Or Not(IsNumeric(Page)) Then Page = "0" End If Page = CInt(Page) Dim Shoplist Shoplist = Request("Shoplist") If Area = "0" Then 'データ補正 Query = " UPDATE TF商品 SET 地方CD = 0, 都道府県CD = 0 WHERE 地方CD IS NULL " Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) End If Dim Search Search = Request("Search") Dim Order Order = Request("Order") If Order = "" Then Order = "New" End If Dim Query Dim Content Dim Content2 %> <% If SelShop = "" And Mode <> "News" Then 'ショップ指定時は左メニューを表示しない %> <% End If 'ショップ指定時は左メニューを表示しない %>
<% Dim DefFontSize DefFontSize = 14 Dim FontSize Query = "exec SPMカテゴリ取得 null, 1" 'サブカテゴリID=1のみ・・・カテゴリ一覧 Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) Do While Not(Content.BOF Or Content.EOF) If "" & Content.Fields("有効") = "1" Then FontSize = DefFontSize If "" & Content.Fields("文字サイズ") <> "" Then FontSize = FontSize + Content.Fields("文字サイズ") End If %> <% If "" & Content.Fields("カテゴリID") = Cat Then Query = "exec SPMカテゴリ取得 " & Content.Fields("カテゴリID") & ", null" 'サブカテゴリ一覧 Set Content2 = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) Do While Not(Content2.BOF Or Content2.EOF) If "" & Content2.Fields("サブカテゴリ有効") = "1" Then FontSize = DefFontSize If "" & Content2.Fields("サブカテゴリ文字サイズ") <> "" Then FontSize = FontSize + Content2.Fields("サブカテゴリ文字サイズ") End If %> <% End If Content2.MoveNext Loop End If End If Content.MoveNext Loop %>
カテゴリでさがす
<% = ActionButton3Image("CategoryLast", "images/btn02g.png", "images/btn02o.png", 20, "images/spacer.gif", "images/spacer.gif", 160, "images/spacer.gif", "images/spacer.gif", 0, 20, "最後に選択したカテゴリ", "tx1416", "left", "location.href='" & HomeAliasSL & "?CatRet=1&Order=" & Order & "';") %>
<% If "" & Content.Fields("カテゴリID") = Cat And SubCat = "" Then %> <% = ActionButton3Image("Category" & Content.Fields("カテゴリID"), "images/btn02o.png", "images/btn02o.png", 20, "images/spacer.gif", "images/spacer.gif", 160, "images/spacer.gif", "images/spacer.gif", 0, 20, Content.Fields("名称"), "tx" & FontSize & (FontSize + 2), "left", "location.href='" & HomeAliasSL & "?Cat=" & Content.Fields("カテゴリID") & "&Order=" & Order & "';") %> <% Else %> <% = ActionButton3Image("Category" & Content.Fields("カテゴリID"), "images/btn02g.png", "images/btn02o.png", 20, "images/spacer.gif", "images/spacer.gif", 160, "images/spacer.gif", "images/spacer.gif", 0, 20, Content.Fields("名称"), "tx" & FontSize & (FontSize + 2), "left", "location.href='" & HomeAliasSL & "?Cat=" & Content.Fields("カテゴリID") & "&Order=" & Order & "';") %> <% End If %>
<% If "" & Content2.Fields("カテゴリID") = Cat And "" & Content2.Fields("サブカテゴリID") = SubCat Then %> <% = ActionButton3Image("Category" & Content2.Fields("カテゴリID") & "Sub" & Content2.Fields("サブカテゴリID"), "images/btn03o.png", "images/btn03o.png", 30, "images/spacer.gif", "images/spacer.gif", 150, "images/spacer.gif", "images/spacer.gif", 0, 20, Content2.Fields("サブカテゴリ名称"), "tx" & FontSize & (FontSize + 2), "left", "location.href='" & HomeAliasSL & "?Cat=" & Content2.Fields("カテゴリID") & "&SubCat=" & Content2.Fields("サブカテゴリID") & "&Order=" & Order & "';") %> <% Else %> <% = ActionButton3Image("Category" & Content2.Fields("カテゴリID") & "Sub" & Content2.Fields("サブカテゴリID"), "images/btn03g.png", "images/btn03o.png", 30, "images/spacer.gif", "images/spacer.gif", 150, "images/spacer.gif", "images/spacer.gif", 0, 20, Content2.Fields("サブカテゴリ名称"), "tx" & FontSize & (FontSize + 2), "left", "location.href='" & HomeAliasSL & "?Cat=" & Content2.Fields("カテゴリID") & "&SubCat=" & Content2.Fields("サブカテゴリID") & "&Order=" & Order & "';") %> <% End If %>
<% = Spacer(1, 4) %>
<% Query = " SELECT * FROM TM地方 ORDER BY 地方CD " Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) Do While Not(Content.BOF Or Content.EOF) ' If "" & Content.Fields("有効") = "1" Then %> <% If "" & Content.Fields("地方CD") = Area Then Query = " SELECT * FROM TM都道府県 WHERE 地方CD = " & Area & " ORDER BY 都道府県CD " Set Content2 = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) Do While Not(Content2.BOF Or Content2.EOF) ' If "" & Content2.Fields("サブカテゴリ有効") = "1" Then %> <% ' End If Content2.MoveNext Loop End If ' End If Content.MoveNext Loop %>
地域でさがす
<% If "" & Content.Fields("地方CD") = Area And Pref = "" Then %> <% = ActionButton3Image("Area" & Content.Fields("地方CD"), "images/btn02o.png", "images/btn02o.png", 20, "images/spacer.gif", "images/spacer.gif", 160, "images/spacer.gif", "images/spacer.gif", 0, 20, Content.Fields("名称"), "tx1416", "left", "location.href='" & HomeAliasSL & "?Area=" & Content.Fields("地方CD") & "&Order=" & Order & "';") %> <% Else %> <% = ActionButton3Image("Area" & Content.Fields("地方CD"), "images/btn02b.png", "images/btn02o.png", 20, "images/spacer.gif", "images/spacer.gif", 160, "images/spacer.gif", "images/spacer.gif", 0, 20, Content.Fields("名称"), "tx1416", "left", "location.href='" & HomeAliasSL & "?Area=" & Content.Fields("地方CD") & "&Order=" & Order & "';") %> <% End If %>
<% If "" & Content2.Fields("地方CD") = Area And "" & Content2.Fields("都道府県CD") = Pref Then %> <% = ActionButton3Image("Area" & Content2.Fields("地方CD") & "Pref" & Content2.Fields("都道府県CD"), "images/btn03o.png", "images/btn03o.png", 30, "images/spacer.gif", "images/spacer.gif", 150, "images/spacer.gif", "images/spacer.gif", 0, 20, Content2.Fields("名称"), "tx1517", "left", "location.href='" & HomeAliasSL & "?Area=" & Content2.Fields("地方CD") & "&Pref=" & Content2.Fields("都道府県CD") & "&Order=" & Order & "';") %> <% Else %> <% = ActionButton3Image("Area" & Content2.Fields("地方CD") & "Pref" & Content2.Fields("都道府県CD"), "images/btn03b.png", "images/btn03o.png", 30, "images/spacer.gif", "images/spacer.gif", 150, "images/spacer.gif", "images/spacer.gif", 0, 20, Content2.Fields("名称"), "tx1517", "left", "location.href='" & HomeAliasSL & "?Area=" & Content2.Fields("地方CD") & "&Pref=" & Content2.Fields("都道府県CD") & "&Order=" & Order & "';") %> <% End If %>
<% = ActionButton3Image("ShopListBtn", "images/shoplist_pl.png", "images/shoplist_pl_over.png", 4, "images/shoplist_pc.png", "images/shoplist_pc_over.png", 174, "images/shoplist_pr.png", "images/shoplist_pr_over.png", 4, 24, "ショップ一覧", "tx1416", "center", "location.href='" & HomeAliasSL & "?Shoplist=1';") %>
<% = ActionButton3Image("MallTopBtn", "images/shoplist_pl.png", "images/shoplist_pl_over.png", 4, "images/shoplist_pc.png", "images/shoplist_pc_over.png", 174, "images/shoplist_pr.png", "images/shoplist_pr_over.png", 4, 24, "モールTop", "tx1416", "center", "location.href='" & HomeAliasSL & "';") %>
<% If SelShop = "" And Cat = "" And Search = "" Then 'ショップ表示時及び商品一覧表示時は右メニューを表示しない %> <% End If 'ショップ指定時は右メニューを表示しない %>
<% If SelShop <> "" Then 'ショップ画面 %> <% Dim TmpShopPage TmpShopPage = "maintenance.html" Set Content = QueryGetShop(SelShop, SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Not(Content.BOF Or Content.EOF) Then If "" & Content.Fields("既定ドキュメント") <> "" And "" & Content.Fields("Webページ公開") = "1" Then TmpShopPage = "shop/" & Content.Fields("ショップID") & "/" & Content.Fields("既定ドキュメント") End If End If 'Response.Write(TmpShopPage) 'Exit Sub %> <% If Item = "All" Then 'ショップ商品一覧 %>
更新日の新しい順 / 更新日の古い順 / 価格の安い順 / 価格の高い順
<% = HTMLItemList(SelShop, "", "", "", "Cat", "", Order, Page, ItemViewCnt, Request.ServerVariables("SCRIPT_NAME") & "?SelShop=" & SelShop & "&Item=" & Item & "&Order=" & Order, False) %> <% ElseIf Item <> "" Then 'ショップ商品詳細 %> <% Set Content = QueryGetItem(SelShop, Item, "", "", "", Order, SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Not(Content.BOF Or Content.EOF) Then %>
<% If "" & Content.Fields("商品画像") <> "" Then %> <% = InscribedImage(HomeAliasSL & ItemFolderSL & Content.Fields("ショップID") & "/" & Content.Fields("商品画像"), IMGSizeItemView, IMGSizeItemView) %> <% End If %>
<% = Content.Fields("名称") %>
販売価格:<% = ConvIntToMoney(Content.Fields("価格"), False, False) %> 円<% If "" & Content.Fields("消費税フラグ") = "1" Then %>(税込)<% Else %>(税別)<% End If %>
数量 <% = Spacer(3, 1) %> <% = Spacer(3, 1) %> <% = ActionButton3Image("InsertCartBtn", "images/btn01bl.png", "images/btn01bl_o.png", 4, "images/btn01bc.png", "images/btn01bc_o.png", 130, "images/btn01br.png", "images/btn01br_o.png", 4, 24, "買い物かごに入れる", "tx1416w", "center", "location.href='" & HomeAliasSL & "cart_bin.asp?SelShop=" & SelShop & "&Shop=" & Content.Fields("ショップID") & "&Item=" & Item & "&Qty='+form1.Qty.value;") %>
<% = Content.Fields("紹介文") %>
<% Else '取得できなければ強制的に一覧に戻す Response.Redirect("" & HomeAliasSL & "?SelShop=" & SelShop & "&Item=All") End If %> <% ElseIf Mode <> "" Then 'お支払方法・送料についてor特定商取引法に基づく表示 %> <% 'パラメータ取得 Dim Jigyosha Dim Postal Dim Address Dim TEL Dim FAX Dim Henpin Dim FuryoHason Dim OrderLimit Dim Etc Dim Sekininsha Dim ShopAddr Dim TimeTable Dim HaisouFlg(3) Dim HaisouMei(3) Dim Haisou(3) Dim KessaiFlg(3) Dim KessaiMei(3) Dim Kessai(3) Set Content = QueryGetShop(SelShop, SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Not(Content.BOF Or Content.EOF) Then Jigyosha = "" & Content.Fields("事業者名") Postal = "" & Content.Fields("郵便番号") Address = "" & Content.Fields("住所") TEL = "" & Content.Fields("TEL") FAX = "" & Content.Fields("FAX") Sekininsha = "" & Content.Fields("責任者") ShopAddr = "" & Content.Fields("店舗メールアドレス") TimeTable = "" & Content.Fields("営業時間等") Henpin = "" & Content.Fields("返品条件等") FuryoHason = "" & Content.Fields("不良破損") OrderLimit = "" & Content.Fields("注文有効期限") Etc = "" & Content.Fields("その他条件") HaisouFlg(1) = "" & Content.Fields("配送方法公開1") HaisouFlg(2) = "" & Content.Fields("配送方法公開2") HaisouFlg(3) = "" & Content.Fields("配送方法公開3") HaisouMei(1) = "" & Content.Fields("配送方法名称1") HaisouMei(2) = "" & Content.Fields("配送方法名称2") HaisouMei(3) = "" & Content.Fields("配送方法名称3") Haisou(1) = "" & Content.Fields("配送方法1") Haisou(2) = "" & Content.Fields("配送方法2") Haisou(3) = "" & Content.Fields("配送方法3") KessaiFlg(1) = "" & Content.Fields("決済方法公開1") KessaiFlg(2) = "" & Content.Fields("決済方法公開2") KessaiFlg(3) = "" & Content.Fields("決済方法公開3") KessaiMei(1) = "" & Content.Fields("決済方法名称1") KessaiMei(2) = "" & Content.Fields("決済方法名称2") KessaiMei(3) = "" & Content.Fields("決済方法名称3") Kessai(1) = "" & Content.Fields("決済方法1") Kessai(2) = "" & Content.Fields("決済方法2") Kessai(3) = "" & Content.Fields("決済方法3") End If Dim Cnt HaisouFlg(0) = False '0を全体存在フラグとする For Cnt = 1 To UBound(HaisouFlg) If HaisouFlg(Cnt) = "1" And (HaisouMei(Cnt) <> "" Or Haisou(Cnt) <> "") Then HaisouFlg(0) = True '0を全体存在フラグとする Exit For End If Next KessaiFlg(0) = False '0を全体存在フラグとする For Cnt = 1 To UBound(KessaiFlg) If KessaiFlg(Cnt) = "1" And (KessaiMei(Cnt) <> "" Or Kessai(Cnt) <> "") Then KessaiFlg(0) = True '0を全体存在フラグとする Exit For End If Next If 0=1 And Mode = "mailorderlaw" Then %>
特定商取引法に基づく表示
<% End If If KessaiFlg(0) Then %>
お支払方法について
<% Dim KCnt For KCnt = 1 To UBound(KessaiFlg) If KessaiFlg(KCnt) = "1" And (KessaiMei(KCnt) <> "" Or Kessai(KCnt) <> "") Then %> <% End If Next %>
・<% = KessaiMei(KCnt) %>
<% = Kessai(KCnt) %>
<% End If If HaisouFlg(0) Then %>
配送方法・送料について
<% Dim HCnt For HCnt = 1 To UBound(HaisouFlg) If HaisouFlg(HCnt) = "1" And (HaisouMei(HCnt) <> "" Or Haisou(HCnt) <> "") Then %> <% End If Next %>
・<% = HaisouMei(HCnt) %>
<% = Haisou(HCnt) %>
<% End If If Mode = "mailorderlaw" Then '特定商取引法に基づく表示 %>
事業者情報
事業者名 <% = Jigyosha %>
郵便番号 <% = Postal %>
住所 <% = Address %>
TEL <% = TEL %>
FAX <% = FAX %>
責任者氏名 <% = Sekininsha %>
お問合せメールアドレス <% = ShopAddr %>
営業時間・問合せ受付時間・休業日等 <% = TimeTable %>
返品に関わる条件 <% = Henpin %>
不良品・破損時の対応 <% = FuryoHason %>
ご注文の有効期限 <% = OrderLimit %>
その他販売条件 <% = Etc %>
<% End If %> <% Else 'アップロードされたページ %> <% End If %> <% Else '※ ※ ※ ※ ※ ※ ※ ※ ※ ※ 以下モール画面 ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ %> <% '検索窓 %> <% If Cat <> "" Then %> <% End If %>
<% = ActionButton3Image("SearchCategory", "images/btn01bl.png", "images/btn01bl_o.png", 4, "images/btn01bc.png", "images/btn01bc_o.png", 144, "images/btn01br.png", "images/btn01br_o.png", 4, 25, "選択カテゴリから検索", "tx1416w", "center", "form1.submit();") %> <% = ActionButton3Image("SearchAllItem", "images/btn01bl.png", "images/btn01bl_o.png", 4, "images/btn01bc.png", "images/btn01bc_o.png", 130, "images/btn01br.png", "images/btn01br_o.png", 4, 25, "全ての商品から検索", "tx1416w", "center", "form1.Cat.value='';form1.SubCat.value='';form1.submit();") %>
<% If Mode = "News" Then 'NewsTopics %>
はすねすにゅーす
<% ElseIf Search <> "" Then '検索一覧 %>
更新日の新しい順 / 更新日の古い順 / 価格の安い順 / 価格の高い順
<% = HTMLItemList("", "", Cat, SubCat, "Cat", Search, Order, Page, ItemViewCnt, Request.ServerVariables("SCRIPT_NAME") & "?CatRet=" & CatRet & "&Cat=" & Cat & "&SubCat=" & SubCat & "&Order=" & Order, True) %>
<% ElseIf Cat <> "" Then 'モールのカテゴリ商品一覧 %>
更新日の新しい順 / 更新日の古い順 / 価格の安い順 / 価格の高い順
<% Query = "exec SPMカテゴリ取得 " & Cat & "" If SubCat <> "" Then Query = Query & ", " & SubCat & "" Else Query = Query & ", 1" End If Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Not(Content.BOF Or Content.EOF) Then %> [ <% = Content.Fields("名称") %> ] <% If SubCat <> "" Then %> - [ <% = Content.Fields("サブカテゴリ名称") %> ] <% End If %> の商品一覧 <% End If %>
<% = HTMLItemList("", "", Cat, SubCat, "Cat", "", Order, Page, ItemViewCnt, Request.ServerVariables("SCRIPT_NAME") & "?CatRet=" & CatRet & "&Cat=" & Cat & "&SubCat=" & SubCat & "&Order=" & Order, True) %>
<% ElseIf Area <> "" Then 'モールの地域商品一覧 %>
更新日の新しい順 / 更新日の古い順 / 価格の安い順 / 価格の高い順
<% If Pref <> "" Then Query = " SELECT * FROM TM都道府県 WHERE 地方CD = " & Area & " AND 都道府県CD = " & Pref & " " Else Query = " SELECT * FROM TM地方 WHERE 地方CD = " & Area & " " End If Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Not(Content.BOF Or Content.EOF) Then %> [ <% = Content.Fields("名称") %> ] の商品一覧 <% End If %>
<% = HTMLItemList("", "", Area, Pref, "Area", "", Order, Page, ItemViewCnt, Request.ServerVariables("SCRIPT_NAME") & "?Area=" & Area & "&Pref=" & Pref & "&Order=" & Order, True) %>
<% ElseIf Shoplist = "1" Then 'ショップ一覧 %> <% If 0 = 1 Then 'ランダム値を振る方法(全レコードをUPDATEするので重い) Set Content = QueryGetShop("Rnd", SQLServer, DatabaseName, DatabaseUser, DatabasePass) 'ランダムモード Do While Not(Content.BOF Or Content.EOF) If "" & Content.Fields("名称") <> "" Then %> <% End If Content.MoveNext Loop Else '配列化しランダムに取り出す方法 Dim ShopIDAry Dim ShopNameAry '配列化 Redim ShopIDAry(0) Redim ShopNameAry(0) Set Content = QueryGetShop("", SQLServer, DatabaseName, DatabaseUser, DatabasePass) Do While Not(Content.BOF Or Content.EOF) If "" & Content.Fields("名称") <> "" Then Redim PreServe ShopIDAry(UBound(ShopIDAry) + 1) '配列+1 Redim PreServe ShopNameAry(UBound(ShopNameAry) + 1) '配列+1 ShopIDAry(UBound(ShopIDAry)) = Content.Fields("ショップID") ShopNameAry(UBound(ShopNameAry)) = Content.Fields("名称") End If Content.MoveNext Loop Dim ShopAryCnt ShopAryCnt = UBound(ShopIDAry) Do While ShopAryCnt > 0 Randomize RndNo = Int((ShopAryCnt * Rnd) + 1) '1〜最大配列数の数値を生成(Fix関数では正しく処理されない?) %> <% 'RndNo以降の配列を前に詰める Dim ACnt For ACnt = RndNo + 1 to ShopAryCnt ShopIDAry(ACnt - 1) = ShopIDAry(ACnt) ShopNameAry(ACnt - 1) = ShopNameAry(ACnt) Next ShopAryCnt = ShopAryCnt - 1 Loop End If %>
<% = Spacer(1, 4) %>
"><% = Content.Fields("名称") %>
<% = Spacer(1, 4) %>
<% = ShopNameAry(RndNo) %>
<% Else 'モールTop %> <% 'おすすめと新着の両方で利用する Dim TmpImage Dim ItemIDAry Dim ItemNameAry Dim ItemImageAry Dim ItemKakakuAry Dim ItemShohizeiAry Dim ItemShopIDAry Dim ItemShopNameAry Dim ItemAryCnt Dim ICnt 'おすすめ商品を配列化しランダムに取り出す Set Content = QueryGetItem("", "", "", "", "", "Osusume", SQLServer, DatabaseName, DatabaseUser, DatabasePass) 'おすすめ取得モード If Not(Content.BOF Or Content.EOF) Then '配列化 Redim ItemIDAry(0) Redim ItemNameAry(0) Redim ItemImageAry(0) Redim ItemKakakuAry(0) Redim ItemShohizeiAry(0) Redim ItemShopIDAry(0) Redim ItemShopNameAry(0) Do While Not(Content.BOF Or Content.EOF) Redim PreServe ItemIDAry(UBound(ItemIDAry) + 1) '配列+1 Redim PreServe ItemNameAry(UBound(ItemNameAry) + 1) '配列+1 Redim PreServe ItemImageAry(UBound(ItemImageAry) + 1) '配列+1 Redim PreServe ItemKakakuAry(UBound(ItemKakakuAry) + 1) '配列+1 Redim PreServe ItemShohizeiAry(UBound(ItemShohizeiAry) + 1) '配列+1 Redim PreServe ItemShopIDAry(UBound(ItemShopIDAry) + 1) '配列+1 Redim PreServe ItemShopNameAry(UBound(ItemShopNameAry) + 1) '配列+1 ItemIDAry(UBound(ItemIDAry)) = Content.Fields("商品ID") ItemNameAry(UBound(ItemNameAry)) = Content.Fields("名称") ItemImageAry(UBound(ItemImageAry)) = Content.Fields("商品画像") ItemKakakuAry(UBound(ItemKakakuAry)) = Content.Fields("価格") ItemShohizeiAry(UBound(ItemShohizeiAry)) = Content.Fields("消費税フラグ") ItemShopIDAry(UBound(ItemShopIDAry)) = Content.Fields("ショップID") ItemShopNameAry(UBound(ItemShopNameAry)) = Content.Fields("ショップ名称") Content.MoveNext Loop ItemAryCnt = UBound(ItemIDAry) %>
<% = Spacer(6, 36) %> おすすめ商品 <% = Spacer(6, 36) %> <% = Spacer(6, 36) %> <% = Spacer(6, 36) %>
<% = Spacer(6, 6) %> <% Dim OsusumeCnt OsusumeCnt = 0 Do While ItemAryCnt > 0 Randomize RndNo = Int((ItemAryCnt * Rnd) + 1) '1〜最大配列数の数値を生成(Fix関数では正しく処理されない?) TmpImage = "image/spacer.gif" If "" & ItemImageAry(RndNo) <> "" Then TmpImage = HomeAliasSL & ItemFolderSL & ItemShopIDAry(RndNo) & "/" & ItemImageAry(RndNo) End If %> <% OsusumeCnt = OsusumeCnt + 1 If OsusumeCnt >= 3 Then Exit Do End If 'RndNo以降の配列を前に詰める For ICnt = RndNo + 1 to ItemAryCnt ItemIDAry(ICnt - 1) = ItemIDAry(ICnt) ItemNameAry(ICnt - 1) = ItemNameAry(ICnt) ItemImageAry(ICnt - 1) = ItemImageAry(ICnt) ItemKakakuAry(ICnt - 1) = ItemKakakuAry(ICnt) ItemShohizeiAry(ICnt - 1) = ItemShohizeiAry(ICnt) ItemShopIDAry(ICnt - 1) = ItemShopIDAry(ICnt) ItemShopNameAry(ICnt - 1) = ItemShopNameAry(ICnt) Next ItemAryCnt = ItemAryCnt - 1 Loop %>
<% = InscribedImage(TmpImage, 150, 150) %>
<% = ItemNameAry(RndNo) %>
\<% = ConvIntToMoney(ItemKakakuAry(RndNo), False, False) %> (<% If "" & ItemShohizeiAry(RndNo) = "1" Then %>税込<% Else %>税別<% End If %>)
<% = ItemShopNameAry(RndNo) %>
<% = Spacer(6, 6) %>
<% = Spacer(6, 6) %> <% = Spacer(6, 6) %> <% = Spacer(6, 6) %>
<% End If %> <% Dim CellCnt Dim RowCnt Set Content = QueryGetItem("", "", "", "", "", "New", SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Not(Content.BOF Or Content.EOF) Then %> <% '上位12商品を配列化 Redim ItemIDAry(0) Redim ItemNameAry(0) Redim ItemImageAry(0) Redim ItemKakakuAry(0) Redim ItemShohizeiAry(0) Redim ItemShopIDAry(0) Redim ItemShopNameAry(0) Do While Not(Content.BOF Or Content.EOF) Redim PreServe ItemIDAry(UBound(ItemIDAry) + 1) '配列+1 Redim PreServe ItemNameAry(UBound(ItemNameAry) + 1) '配列+1 Redim PreServe ItemImageAry(UBound(ItemImageAry) + 1) '配列+1 Redim PreServe ItemKakakuAry(UBound(ItemKakakuAry) + 1) '配列+1 Redim PreServe ItemShohizeiAry(UBound(ItemShohizeiAry) + 1) '配列+1 Redim PreServe ItemShopIDAry(UBound(ItemShopIDAry) + 1) '配列+1 Redim PreServe ItemShopNameAry(UBound(ItemShopNameAry) + 1) '配列+1 ItemIDAry(UBound(ItemIDAry)) = Content.Fields("商品ID") ItemNameAry(UBound(ItemNameAry)) = Content.Fields("名称") ItemImageAry(UBound(ItemImageAry)) = Content.Fields("商品画像") ItemKakakuAry(UBound(ItemKakakuAry)) = Content.Fields("価格") ItemShohizeiAry(UBound(ItemShohizeiAry)) = Content.Fields("消費税フラグ") ItemShopIDAry(UBound(ItemShopIDAry)) = Content.Fields("ショップID") ItemShopNameAry(UBound(ItemShopNameAry)) = Content.Fields("ショップ名称") If UBound(ItemIDAry) >= 12 Then '最大12商品 Exit Do End If Content.MoveNext Loop ItemAryCnt = UBound(ItemIDAry) Dim ShinchakuCnt ShinchakuCnt = 0 Do While ItemAryCnt > 0 Randomize RndNo = Int((ItemAryCnt * Rnd) + 1) '1〜最大配列数の数値を生成(Fix関数では正しく処理されない?) TmpImage = "image/spacer.gif" If "" & ItemImageAry(RndNo) <> "" Then TmpImage = HomeAliasSL & ItemFolderSL & ItemShopIDAry(RndNo) & "/" & ItemImageAry(RndNo) End If If (ShinchakuCnt + 3) Mod 3 = 0 Then %> <% End If %> <% ShinchakuCnt = ShinchakuCnt + 1 If (ShinchakuCnt + 3) Mod 3 = 0 Then %> <% End If If ShinchakuCnt >= 6 Then Exit Do End If 'RndNo以降の配列を前に詰める For ICnt = RndNo + 1 to ItemAryCnt ItemIDAry(ICnt - 1) = ItemIDAry(ICnt) ItemNameAry(ICnt - 1) = ItemNameAry(ICnt) ItemImageAry(ICnt - 1) = ItemImageAry(ICnt) ItemKakakuAry(ICnt - 1) = ItemKakakuAry(ICnt) ItemShohizeiAry(ICnt - 1) = ItemShohizeiAry(ICnt) ItemShopIDAry(ICnt - 1) = ItemShopIDAry(ICnt) ItemShopNameAry(ICnt - 1) = ItemShopNameAry(ICnt) Next ItemAryCnt = ItemAryCnt - 1 Loop %>
新着商品
<% = InscribedImage(TmpImage, 120, 120) %>
<% = ItemNameAry(RndNo) %>
\<% = ConvIntToMoney(ItemKakakuAry(RndNo), False, False) %> (<% If "" & ItemShohizeiAry(RndNo) = "1" Then %>税込<% Else %>税別<% End If %>)
<% = ItemShopNameAry(RndNo) %>
<% End If %> <% End If %> <% End If %>
<% 'ランダム協賛広告 Dim RndBunnerNo RndBunnerNo = 0 Dim BunnerIDAry Dim BunnerUrlAry Dim BunnerSrcAry ReDim BunnerIDAry(0) ReDim BunnerUrlAry(0) ReDim BunnerSrcAry(0) Query = " SELECT * FROM TMバナー " Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) Do While Not(Content.BOF Or Content.EOF) ReDim PreServe BunnerIDAry(UBound(BunnerIDAry) + 1) '配列+1 ReDim PreServe BunnerUrlAry(UBound(BunnerUrlAry) + 1) '配列+1 ReDim PreServe BunnerSrcAry(UBound(BunnerSrcAry) + 1) '配列+1 BunnerIDAry(UBound(BunnerIDAry)) = Content.Fields("バナーID") BunnerUrlAry(UBound(BunnerUrlAry)) = Content.Fields("リンク先") BunnerSrcAry(UBound(BunnerSrcAry)) = Content.Fields("画像") Content.MoveNext Loop Dim BunnerAryCnt BunnerAryCnt = UBound(BunnerIDAry) Dim BunnerCnt BunnerCnt = 0 Do While BunnerAryCnt > 0 Randomize RndBunnerNo = Int((BunnerAryCnt * Rnd) + 1) '1〜最大配列数の数値を生成(Fix関数では正しく処理されない?) %> <% BunnerCnt = BunnerCnt + 1 If BunnerCnt >= 10 Then Exit Do End If 'RndBunnerNo以降の配列を前に詰める Dim BCnt For BCnt = RndBunnerNo + 1 to BunnerAryCnt BunnerIDAry(BCnt - 1) = BunnerIDAry(BCnt) BunnerUrlAry(BCnt - 1) = BunnerUrlAry(BCnt) BunnerSrcAry(BCnt - 1) = BunnerSrcAry(BCnt) Next BunnerAryCnt = BunnerAryCnt - 1 Loop %>
" border="0" width="234" height="60">
<% End Sub %>