<% Sub myWrite(line) Response.write(line) end sub Sub myWriteLn(line) Response.write(line) Response.write("
") end sub Sub CreateHeader(refresh) myWrite "" myWrite "" if refresh > 0 then myWrite "" end if myWrite "" myWrite "" end sub Sub CreateFooter() End Sub Sub PageTitle(title, logo) if showLogo then if logo = "" then myWrite "" else myWrite "" end if end if if title <> "" then myWrite "

" & title & "

" end if end sub Sub PageDefaultMenu() myWrite "" myWrite "" if Request.QueryString("n") <> "0" then myWrite "" myWrite "" if Request.QueryString("n") = "1" then if isProcessTagsEnabled then myWrite "" end if else myWrite "" end if myWrite "" end if myWrite "" myWrite "" myWrite "
" myWrite " Home " myWrite " " myWrite " Process " myWrite "" myWrite " Alarms " myWrite " " myWrite " Log Off " myWrite "
" end sub Sub chkWrite(line, condition) if condition = true then myWrite line end if end sub 'Return Values ' 0: Cookie has been created, logon is needed ' 1: Cookie is valid ' 2: Connection error Function chkCookie() mysession.Cookie = Request.Cookies("Session") if mysession.IsValidCookie = false then Dim resp resp = mysession.CreateCookie(Request.ServerVariables("REMOTE_ADDR")) if resp = 0 then Response.Cookies("Session") = mysession.Cookie chkCookie= 0 else Response.Redirect "ConnectionError.htm" chkCookie= 2 end if else chkCookie= 1 end if end function Function chkLogon() dim resp resp = chkCookie() if resp = 2 then chkLogon = false end if if resp = 0 Or mysession.IsValidLogon = false then ChkLogon =false Response.Redirect "logon.asp" else chkLogon = True end if end function %>