% 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 %> <% Dim ItemViewCnt ItemViewCnt = GB_ItemViewCnt '1ページの表示件数 Dim Page Page = Request("Page") If Page = "" Or Not(IsNumeric(Page)) Then Page = "0" End If Page = CInt(Page) Dim Order Order = Request("Order") If Order = "" Then Order = "New" End If Dim Query Dim Content Dim Content2 'クローラ・ロボットを除外 Dim TmpAgent TmpAgent = LCase(Request.ServerVariables("HTTP_USER_AGENT")) If InStr(TmpAgent, LCase("Googlebot")) < 1 And _ InStr(TmpAgent, LCase("crawler")) < 1 And _ InStr(TmpAgent, LCase("feedfetcher")) < 1 And _ InStr(TmpAgent, LCase("360spider")) < 1 And _ InStr(TmpAgent, LCase("java/1.7.0")) < 1 And _ InStr(TmpAgent, LCase("Googlebot-Image")) < 1 And _ InStr(TmpAgent, LCase("YPBot")) < 1 And _ InStr(TmpAgent, LCase("Yahoo! Slurp")) < 1 And _ InStr(TmpAgent, LCase("bingbot")) < 1 And _ InStr(TmpAgent, LCase("bitlybot")) < 1 And _ InStr(TmpAgent, LCase("Yeti")) < 1 And _ InStr(TmpAgent, LCase("Baiduspider")) < 1 And _ InStr(TmpAgent, LCase("Steeler")) < 1 And _ InStr(TmpAgent, LCase("ichiro")) < 1 And _ InStr(TmpAgent, LCase("hotpage.fr")) < 1 And _ InStr(TmpAgent, LCase("ia_archiver")) < 1 And _ InStr(TmpAgent, LCase("YandexBot")) < 1 And _ InStr(TmpAgent, LCase("msnbot")) < 1 And _ InStr(TmpAgent, LCase("zenback bot")) < 1 And _ InStr(TmpAgent, LCase("Y!J-BRI")) < 1 And _ InStr(TmpAgent, LCase("TurnitinBot")) < 1 And _ InStr(TmpAgent, LCase("Google Desktop")) < 1 And _ InStr(TmpAgent, LCase("BaiduMobaider")) < 1 And _ InStr(TmpAgent, LCase("Seznam screenshot-generator")) < 1 And _ InStr(TmpAgent, LCase("SiteBot")) < 1 And _ InStr(TmpAgent, LCase("Purebot")) < 1 And _ InStr(TmpAgent, LCase("emBot-GalaBuzz/Nutch")) < 1 And _ InStr(TmpAgent, LCase("Search17Bot")) < 1 And _ InStr(TmpAgent, LCase("Tumblr")) < 1 And _ InStr(TmpAgent, LCase("DotBot")) < 1 And _ InStr(TmpAgent, LCase("masscan")) < 1 And _ InStr(TmpAgent, LCase("AhrefsBot")) < 1 And _ InStr(TmpAgent, LCase("Exabot")) < 1 And _ InStr(TmpAgent, LCase("MJ12bot")) < 1 And _ InStr(TmpAgent, LCase("Riddler")) < 1 And _ InStr(TmpAgent, LCase("Twitterbot")) < 1 And _ InStr(TmpAgent, LCase("EtaoSpider")) < 1 And _ InStr(TmpAgent, LCase("EasouSpider")) < 1 And _ InStr(TmpAgent, LCase("YisouSpider")) < 1 And _ InStr(TmpAgent, LCase("Nmap Scripting Engine")) < 1 And _ InStr(TmpAgent, LCase("Python-urllib")) < 1 And _ InStr(TmpAgent, LCase("FunWebProducts")) < 1 And _ InStr(TmpAgent, LCase("Chilkat")) < 1 Then '当日の初回アクセスのみ記録 Query = "" Query = Query & " SELECT * FROM TFショップビジター履歴 " Query = Query & " WHERE ショップID = " & SelShop & " " Query = Query & " AND ビジターYMD = '" & VisitorIDSplit(GB_VisitorID, "YMD") & "' " Query = Query & " AND ビジターID = " & VisitorIDSplit(GB_VisitorID, "ID") & " " Query = Query & " AND アクセス日時 >= '" & Year(Now) & "/" & Month(Now) & "/" & Day(Now) & " 0:0:0' " Query = Query & " AND アクセス日時 <= '" & Year(Now) & "/" & Month(Now) & "/" & Day(Now) & " 23:59:59.99' " If "" & GB_PracticeCD <> "" Then 'ローカルモードは演習単位で記録 Query = Query & " AND 演習CD = " & GB_PracticeCD & " " End If Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) If Content.BOF Or Content.EOF Then Query = "" Query = Query & " INSERT INTO TFショップビジター履歴 (ショップID, ビジターYMD, ビジターID, アクセス日時, IPアドレス, 利用ブラウザ, 学校CD, ログインID, 演習CD) " Query = Query & " VALUES (" & SelShop & ", '" & VisitorIDSplit(GB_VisitorID, "YMD") & "', " & VisitorIDSplit(GB_VisitorID, "ID") & ", GETDATE(), '" & Request.ServerVariables("REMOTE_ADDR") & "', '" & Request.ServerVariables("HTTP_USER_AGENT") & "', '" & GB_HostName & "', '" & GB_UserID & "' " If "" & GB_PracticeCD <> "" Then Query = Query & " , " & GB_PracticeCD & " " Else Query = Query & " , null " End If Query = Query & " ) " Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass) End If End If %>