<% Response.Buffer = true %> <% Response.ExpiresAbsolute=#Jan 01,1997 00:00:00# %> <% Dim intMenuID Dim strLangName Dim intLangID Dim boolExpMenu Dim boolMenuIDOk Dim boolLangNameOk Dim arrMenuBranch Dim boolBranchStatus Dim DebugRule Dim strDSN Dim strExpLink '---- ÅBNER DATABASEN Call oConn.Open(strZienceDSN) '----- HENTER VARIABLER intMenuID = trim(Request("page")) strLangName = trim(Request("lang")) boolExpMenu = trim(Request("exp")) strSearchFrase = trim(Request("search")) '----- TJEKKER VARIABLER boolMenuIDOk = CheckMenuID(intMenuID, oConn) boolLangNameOk = CheckLangName(strLangName, oConn) '----- TJEKKER PAGE SELECTION If intMenuID <> "" AND boolMenuIDOk = true then strLangName = GetMenuLangByMenuId(intMenuID, oConn) intLangID = GetLangIdByName(strLangName, oConn) DebugRule = 1 ElseIF strLangName <> "" AND boolLangNameOk = true then intLangID = GetLangIdByName(strLangName, oConn) intMenuID = GetDefaultMenuID(intLangID, oConn) DebugRule = 2 ElseIf (len(intMenuID) <> 0 OR len(strLangName) <> 0) AND boolMenuIDOk = false AND boolLangNameOk = false then 'BANDIT FORSØGER AT HENTE IKKE-AKTIVE SIDER ELLER FREMPROVOKER FEJL - HAN FÅR FEJL ! Response.Redirect ("/ErrorPages/404.asp") Else strLangName = GetDefaultLangName(oConn) intLangID = GetLangIdByName(strLangName, oConn) intMenuID = GetDefaultMenuID(intLangID, oConn) DebugRule = 3 End if '----- TJEKKER MULTILANGUAL SETTINGS If boolMultiLang = false AND GetDefaultLangName(oConn) <> GetMenuLangByMenuId(intMenuID, oConn) then strLangName = GetDefaultLangName(oConn) intLangID = GetLangIdByName(strLangName, oConn) intMenuID = GetDefaultMenuID(intLangID, oConn) End if '----- MENU FOLDER if boolExpMenu = "" OR isNull(boolExpMenu) then boolExpMenu = session("Expand") If boolExpMenu = "true" OR boolExpMenu = true then boolExpMenu = true session("Expand") = true strExpLink = "" & GetServiceWords(strLangName, 6) & "" ElseIf boolExpMenu = "false" OR boolExpMenu = false then boolExpMenu = false session("Expand") = false strExpLink = "" & GetServiceWords(strLangName, 5) & "" End if '----- HENTER MENU STRUKTUREN arrMenuBranch = split(replace(trim(GetMenuBranch(intMenuID, oConn)), " ", ", "), ",") boolBranchStatus = GetBranchStatus(arrMenuBranch, false, oConn) %> <%= strSiteTitle%> <% Response.write GetPageTitles(arrMenuBranch, oConn)%>
<%= strExpLink%> <% Call WriteLangSelector(intLangID, oConn) %>            
<% If strSearchFrase <> "" then Call WriteSearchResult(strSearchFrase, oConn) Else Call WriteContent(intMenuID, oConn) End if %>
<% 'Response.Write strCopyrightNotic %>
<% oConn.Close() %>