<% response.end ' response.write(REQUEST.ServerVariables("HTTP_USER_AGENT")) ' response.end() public function Redirect302(pagina) 'Response.Status = "301 Moved Permanenty" 'Response.AddHeader "Location" , pagina Response.Redirect pagina Response.End end function ' url = "/home" & Session("PerfilClienteAgora") & ".asp" url = "https://www.agorainvestimentos.com.br/" & Session("PerfilClienteAgora") & ".asp" Response.Redirect url Response.End if not oFileSys.FileExists(Server.MapPath(url)) then url = "/ferramentas/default.asp" end if if (Session("MOBILE") <> "1" ) then Function in_array(element, arr) For i=0 To Ubound(arr) If Trim(arr(i)) = Trim(element) Then in_array = True Exit Function Else in_array = False End If Next End Function Dim gv_mobile_browser, gv__SERVER(), gv_mobile_ua, gv_mobile_agents gv_mobile_browser = "0" Session("VALIDA_MOBILE") = "1" If InStr(LCase(REQUEST.ServerVariables("HTTP_USER_AGENT")),"/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i" )>=1 then gv_mobile_browser = gv_mobile_browser + 1 end if If InStr(LCase(REQUEST.ServerVariables("HTTP_ACCEPT")), "application/vnd.wap.xhtml+xml") >= 1 or ((IsNull(REQUEST.ServerVariables("HTTP_X_WAP_PROFILE"))) or (IsNull(REQUEST.ServerVariables("HTTP_PROFILE")) )) then gv_mobile_browser = gv_mobile_browser + 1 end if gv_mobile_ua = LCase(Mid(REQUEST.ServerVariables("HTTP_USER_AGENT"),1,4) ) gv_mobile_agents = array("w3c","acs-","alav","alca","amoi","audi","avan","benq","bird","blac","blaz","brew","cell","cldc","cmd-","dang","doco","eric","hipt","inno","ipaq","java","jigs","kddi","keji","leno","lg-c","lg-d","lg-g","lge-","maui","maxo","midp","mits","mmef","mobi","mot-","moto","mwbp","nec-","newt","noki","oper","palm","pana","pant","phil","play","port","prox","qwap","sage","sams","sany","sch-","sec-","send","seri","sgh-","shar","sie-","siem","smal","smar","sony","sph-","symb","t-mo","teli","tim-","tosh","tsm-","upg1","upsi","vk-v","voda","wap-","wapa","wapi","wapp","wapr","webc","winw","winw","xda","xda-") If in_array(gv_mobile_ua,gv_mobile_agents) then gv_mobile_browser = gv_mobile_browser + 1 end if 'Se desktop If (InStr ( LCase ( REQUEST.ServerVariables("HTTP_USER_AGENT")) , "windows") >0 ) then gv_mobile_browser = 0 end if If(InStr(LCase( REQUEST.ServerVariables("ALL_HTTP")),"operamini") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"symbianos") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"android") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"ipod") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"iphone") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"danger hiptop") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if 'windows ce If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"dows ce") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If(InStr(LCase(REQUEST.ServerVariables("ALL_HTTP")),"palm") >0) then gv_mobile_browser = gv_mobile_browser + 1 end if If (gv_mobile_browser>0) then Session("MOBILE") = 1 Redirect302("/default_m.asp") 'Response.Write "" Else Session("MOBILE") = 1 'Redirect302("/Default.asp") Redirect302(url) 'Response.Write "" end if else Redirect302(url) end if %>