Function GetSBInfo(Flag)
Dim Brs,Sys,I,N,Tmp,Str
Sys = "Unknown"
Brs = "Unknown"
Str = Request.ServerVariables("HTTP_USER_AGENT")
Tmp = LCase(Str)
'If inStr(Tmp,"http://") > 0 Then
' Brs = "Spider"
' Sys = "Spider"
'Else
I = inStr(Tmp,"msie")
If I > 0 Then
N = inStr(I,Tmp,";")
If N > 0 Then
Brs = Mid(Str,I,N-i)
I = inStr(N+1,Tmp,";")
If I > 0 Then
Sys = Trim(Mid(Str,N + 1,I-N-1))
End If
End If
Else
I = inStr(Tmp,"opera")
If I > 0 Then
N = inStr(i,Tmp," ")
If N > 0 Then Brs = Replace(Mid(Str,i,n-i),"/"," ")
I = inStr(Tmp,"(")
N = inStr(Tmp,";")
If N > I and I > 0 Then
Sys = Mid(Str,I+1,N-I-1)
End If
ElseIf inStr(Tmp,"safari") > 0 Then
I = inStr(Tmp,"version")
If I > 0 Then
If inStr(i,Tmp," ")-I-7 > 0 Then Brs = "Safari " & Replace(Mid(Tmp,I + 7,inStr(I,Tmp," ")-I-7),"/","")
Else
I = inStr(Tmp,"chrome")
If I > 0 Then
If inStr(I,Tmp," ") > I Then
Brs = Replace(Mid(Tmp,I,inStr(I,Tmp," ")-I),"/"," ")
End If
End If
End If
ElseIf inStr(Tmp,"wap") > 0 Then
Brs = "Wap"
Sys = "Wap"
Else
If inStr(Tmp,";")>0 then
Dim T
N = split(Str,";")
I = inStr(Tmp,"firefox")
If I > 0 and Ubound(N) >=2 Then
Sys = Trim(N(2))
Brs = Replace(Mid(Str,I,20),"/"," ")
Else
If Ubound(N) >=2 Then
N(2) = Trim(replace(N(2),")",""))
Brs = Replace(N(2),"/"," ")
End If
If Ubound(N) >=1 Then
N(1) = Trim(N(1))
Sys = N(1)
End If
End If
End If
End If
End If
'End If
If Brs = "Unknown" and inStr(Tmp,"http://") > 0 Then Brs = "Spider"
If Sys <> "" Then
If inStr(Tmp,"windows nt 5.0") Then
Sys = "Windows 2000"
Elseif inStr(Tmp,"windows nt 5.1") Then
Sys = "Windows XP"
Elseif inStr(Tmp,"windows nt 5.2") Then
Sys = "Windows 2003"
Elseif inStr(Tmp,"windows nt 6.0") Then
Sys = "Windows Vista"
Elseif inStr(Tmp,"windows nt 6.1") Then
Sys = "Windows 7"
Elseif inStr(Tmp,"windows nt 6.2") Then
Sys = "Windows 8"
Elseif inStr(Tmp,"windows vista") Then
Sys = "Windows Vista"
Elseif inStr(Tmp,"windows 4.10") Then
Sys = "Windows 98"
Elseif inStr(Tmp,"windows 98") Then
Sys = "Windows 98"
Elseif inStr(Tmp,"windows me") Then
Sys = "Windows Me"
Elseif inStr(Tmp,"ipad") Then
Sys = "iPad"
Elseif inStr(Tmp,"windows 3.") Then
Sys = "Windows 3.1"
elseif inStr(Tmp,"android") Then
I = inStr(Tmp,"android")
N = inStr(I,Tmp,";")
If N > 0 Then
Sys = Mid(Str,I,N-i)
Sys = Replace(Replace(Sys,"_","."),";","")
Else
Sys = "Android"
End If
Elseif inStr(Tmp,"iphone") Then
Sys = "iPhone"
elseif inStr(Tmp,"mac os x") Then
I = inStr(Tmp,"mac os")
N = inStr(I,Tmp,";")
If N > 0 Then
Sys = Mid(Str,I,N-i)
Sys = Replace(Replace(Sys,"_","."),";","")
Else
Sys = "Mac OS"
End If
End If
End If
If Flag = 1 Then
GetSBInfo = Brs
Else
GetSBInfo = Sys
End If
End Function
Function CheckSystem
If Request.QueryString("homesel") = "1" Then
CheckSystem = 0
Response.Cookies(DEF_MasterCookies & "homesel") = "1"
Response.Cookies(DEF_MasterCookies & "homesel").Expires = DateAdd("d",DEF_Now,30)
Response.Cookies(DEF_MasterCookies & "homesel").Domain = DEF_AbsolutHome
Exit Function
End If
If Request.Cookies(DEF_MasterCookies & "homesel") = "1" then
CheckSystem = 0
Exit Function
End If
dim sys
sys = GetSBInfo(0)
If sys = "iPad" or sys = "iPhone" or left(sys,7) = "Android" Then
CheckSystem = 1
Else
CheckSystem = 0
End If
End Function