% nof_rootDir="../" nof_scriptDir="scripts" nof_debug=false nof_sitePath = GetSitePath(nof_rootDir) function GetSitePath(RootDir) Dim relPath relPath = split(RootDir, "/") forwardSteps = UBound(relPath) - 1 if forwardSteps = 0 and relPath(0) = "." then forwardSteps = -1 GetSitePath = Server.MapPath(".") for idx=0 to forwardSteps GetSitePath = Left(GetSitePath, inStrRev(GetSitePath, "\") - 1) next GetSitePath = GetSitePath & "\" end function %> <% function FileExists(ByVal file, ByVal sitePath, ByVal scriptDir) dim fso, filePath on error resume next Set fso = Server.CreateObject("Scripting.FileSystemObject") filePath = sitePath & scriptDir & "\" & file FileExists = fso.FileExists(filePath) set fso = nothing end function %>
![]() |
||||
|
<%
if FileExists("rememberValues.js", nof_sitePath, nof_scriptDir) then
%>
<%
Response.Write ""
else
if nof_debug then
Response.Write "Could not include the file `" & nof_sitePath & nof_scriptDir & "\" & "rememberValues.js`."
else
Response.Write " An error occured. Please contact the site administrator. " Response.Write "Error code: 103 " end if end if %> |
||||