%
' Last Updated 19 May 2006
' Jonathan Maxwell
Sub CheckSecurityLevel(intSecurityLevel,intMinSecurityLevel, intMMCustomerID)
' Checks if current page security level is correct for user
if (isNumeric(intSecurityLevel) = false or intSecurityLevel = "" or isNull(intSecurityLevel)) or (isNumeric(intMMCustomerID) = false or intMMCustomerID = "" or isNull(intMMCustomerID)) then
response.write ""
end if
if CInt(intMinSecurityLevel) < CInt(intSecurityLevel) then
response.write ""
else
response.write "document.location.href='admin.asp'"
end if
response.End()
end if
End Sub
Function CheckReferers(RefererList, PreviousReferer)
' Test of good vs bad referer lists
dim i
RefererList = split(RefererList,",")
' Get only referrer url
if PreviousReferer <> "" then
PreviousReferer = replace(lcase(PreviousReferer),"http://", "")
PreviousReferer = left(PreviousReferer,instr(PreviousReferer,"/")-1)
end if
' Check all acceptable referrers in list
for i = 0 to ubound(RefererList)
if lcase(RefererList(i)) = lcase(PreviousReferer) then
CheckReferers = true
exit function
end if
next
CheckReferers = false
End Function
%>