lsCurrentUrl else lsRootUrl = left( lsCurrentUrl, liFirstSlash - 1 ) end if ' Chop 4th level domain off if I have to. if liFirstDot <> liFoolPosition then lsRootUrl = right( lsRootUrl, len( lsRootUrl ) - liFirstDot ) liRootFoolPosition = inStr( lsRootUrl, ".fool." ) ' We only have a 3 level domain. else liRootFoolPosition = liFoolPosition end if ' How many domains? ' Get 3rd level domain. lsThirdLevelDomain = lcase( left( lsRootUrl, liRootFoolPosition ) ) ' Eliminate third and fourth level domain if necessary. lsCurrentUrl = right( lsCurrentUrl, len( lsCurrentUrl ) - liFoolPosition + 1 ) ' If we've actually got a URL. if lsCurrentUrl <> "" then lbForceRegistration = false ' Loop through subdirs to check directory hierarchy. do ' Is this a protected directory? if ( inStr( gsProtectedUrls, lsCurrentUrl ) > 0 ) and _ ((inStr(lsThirdLevelDomain,"boards.") = 0) and (inStr(lsThirdLevelDomain,"my.") = 0) and _ (inStr(lsThirdLevelDomain,"quote.") = 0)) then lbForceRegistration = true ' Double check to be sure Slash position isn't the root. elseif inStr( lsCurrentUrl, "/" ) = inStrRev( lsCurrentUrl, "/" ) then liSlashPosition = 0 ' Go a directory higher. else liSlashPosition = inStrRev( lsCurrentUrl, "/" ) lsCurrentUrl = left( lsCurrentUrl, liSlashPosition - 1 ) end if ' Protected directory? loop until liSlashPosition = 0 or lbForceRegistration ' Protected or at the root dir? ForcedRegistrationUrl = lbForceRegistration ' No URL. else ForcedRegistrationUrl = false end if ' Got a URL? ' Exclude this file from permission processing. else ForcedRegistrationUrl = false end if ' Check exclude/force variables. ' Errors? if err.number <> 0 then Call LogError ( "login", "Error with forced registration", err.Description, false, false, "", "", _ cstr( 1000 * Timer - giTimerStart ) ) end if ' Errors? end function ' ForcedRegistrationUrl. '-------------------------------------------------------------------------------------------------- ' This include sets some global variables for the browser tye and version gbNetscapeBrowser = false gbIEBrowser = false gbOtherBrowser = false if ( instr( gsBrowser, "mozilla" ) <> 0 ) and ( instr( gsBrowser, "compatible" ) = 0 ) then 'it's a real mozilla browser, not just a compatible one gbNetscapeBrowser = true if ( instr( gsBrowser, "mozilla/4" ) <> 0 ) or ( instr( gsBrowser, "mozilla/5" ) <> 0 ) Then gbNetscape4or5 = true else gbNetscape4or5 = false end if if instr( gsBrowser, "gecko" ) <> 0 then gbNetscape6 = true 'catches NS6, NS7, Moz end if elseif ( instr( gsBrowser, "msie" ) <> 0 ) then ' it's an ie broswer gbIEBrowser = true 'check what version it is if ( instr( gsBrowser, "msie 4" ) <> 0 ) or ( instr( gsBrowser, "msie 5" ) <> 0 ) or ( instr( gsBrowser, "msie 6" ) <> 0 ) or ( instr( gsBrowser, "msie 7" ) <> 0 ) Then gbIE4or5 = true else gbIE4or5 = false end if ' AOL's IE3 doesn't support styles, so separate it out if ( instr( gsBrowser, "msie 3" ) <> 0 ) and ( instr( gsBrowser, "aol" ) = 0 ) Then gbIE3 = true else gbIE3 = false end if else gbOtherBrowser = true end if 'is it a browser for the MAC or PC? if ( instr( gsBrowser, "mac" ) <> 0 ) Then gbMacOS = true else gbMacOS = false end if ' does the the browser version support styles? if gbIE4or5 or gbIE3 or gbNetscape4or5 then gbBROWSER_SUPPORTS_STYLES = true else gbBROWSER_SUPPORTS_STYLES = false end if ' important: keeps globals off of certain secure pages. if not bNoCss then ' Brand Split. ' UK if gsBrand = "uk" then sIeStyleSheet = "070315/ukmf" ' link in some style sheets for use in the top nav depending on the browser type. Exclude from Boards if (instr(gsSite, "boards") = 0) and (instr(gsSite, "admin") = 0) then Response.WriteBlock(6) Response.Write(gsCSS_DIR) Response.WriteBlock(7) Response.Write(gsCSS_DIR) Response.WriteBlock(8) Response.Write(gsCSS_DIR) Response.WriteBlock(9) end if ' US else sUsmfStyleSheet = "20071107/Screen" if instr(gsSite, "boards") = 0 then Response.WriteBlock(10) Response.Write(gsCSS_DIR) Response.Write(sUsmfStyleSheet) Response.WriteBlock(11) end if end if end if '-------------------------------------------------------------------------------------------------- ' NoSubAllowed ' This prevents publisher from doing replacements in this file. ' ' Purpose: ' Returns true if the string is a whole positive number. '-------------------------------------------------------------------------------------------------- function IsPositiveInteger( lsNumber ) ' Returns true if the string is a whole positive number. ' First check for null to avoid errors in other comparisons. if isnull( lsNumber ) then IsPositiveInteger = false ' Check if it's numeric, blank or contains characters that will cause SQL trouble ' then return false. elseif cbool( lsNumber = "" ) or not isnumeric( lsNumber ) or _ instr( lsNumber, "." ) <> 0 or instr( lsNumber, "-" ) <> 0 or _ instr( lsNumber, "$" ) <> 0 or instr( lsNumber, "&" ) <> 0 or _ instr( lsNumber, "+" ) <> 0 then IsPositiveInteger = false ' Looks good, return true. else IsPositiveInteger = true end if end function ' IsPositiveInteger '-------------------------------------------------------------------------------------------------- 'nosuballowed 'Purpose: This function gets and writes out the TopNav markup from .Net. '-------------------------------------------------------------------------------------------------- Sub DrawTopNav( byval lsTab, byval lsArea, byval lsFeature, byval lsFourthLevel, byval lsQueryString ) ' Turn on errors if we have to. if gbOnErrorResumeNext then on error resume next end if ' C