<% '********************************************************************* ' Name : ShowLastModified ' Desc : Shows the Last Modified Date of a Document ' params : filespec - Name of asp page or section that received error Function ShowLastModified(filespec) Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) ShowLastModified = f.DateLastModified end Function ' create an instance of the Browser Capabilities component dim browserdetect Set browserdetect = Server.CreateObject("MSWC.BrowserType") ' find some properties of the browser being used to view this page dim browser, version, majorver, minorver, platform, frames, tables, cookies, javascript, plat3 browser=browserdetect.Browser version=browserdetect.Version majorver=browserdetect.Majorver minorver=browserdetect.Minorver platform=browserdetect.Platform frames=browserdetect.Frames tables=browserdetect.Tables cookies=browserdetect.Cookies javascript=browserdetect.JavaScript plat3 = lcase(Left(platform,3)) 'alert(plat3) '********************************************************************* '********************************************************************* ' Name : isValidUser ' Desc : returns true or false based on the current user versus the users passed in ' params : strUsers - string of users who are "valid" ' example: ' IF isvalidUser("username1,username2,username3") THEN ' ---code you want to display to authorized users--- ' ELSE ' ---code you want to display to unauthorized users--- ' END IF ' author: JRL function isValidUser(strUsers) isValidUser = false Username = Request.ServerVariables("AUTH_USER") findslash = instr(Username,"\") user = lcase(trim(mid(Username,findslash+1))) k=0 'give access to users that are in list of authorized users checkUsers = split(strUsers,",") for k = 0 to ubound(checkUsers) if user = checkUsers(k) then isValidUser = true end if next end function '********************************************************************* '********************************************************************* ' Name : cleanFormStr ' Desc : doubles apostrophes in strings for use in a SQL statement ' params : myString - the string being cleaned function cleanFormStr(myString) Dim tempStr tempStr=Trim(myString) if inStr(tempStr,"'") then tempStr = Replace(tempStr,"'","''") end if cleanFormStr=tempStr end function '********************************************************************* '********************************************************************* ' Name : checkBit ' Desc : checked a bit value to return true or false ' params : fieldName - the name of the field being checked function checkBit(fieldName) if fieldName <> "" then if (CInt(fieldName) = 1) or (fieldName = true) then checkBit = true else checkBit = false end if else checkBit = false end if end function '********************************************************************* '********************************************************************* ' Name : refServer ' Desc : checks whether the refering server is staging or www ' params : none function refServer() posDot = (InStr(8,Request.ServerVariables("HTTP_REFERER"),".") - 8) refServer = lcase(Mid(Request.ServerVariables("HTTP_REFERER"),8,posDot)) 'this if statement takes care of when someone is browsing using http://example.com/ if refServer = "example" then refServer = "www" else refServer = refServer end if end function '********************************************************************* %>