<% Dim pageId, thisPage, articleId, querySDictNoId 'thisPage = Request.ServerVariables("SCRIPT_NAME") thisPage = "" pageId = Request.QueryString("id") articleId = Request.QueryString("article") pictureId = Request.QueryString("pid") 'IMPORTANT for subsequent script executions!! Session("pageId") = pageId Session("pictureId") = pictureId 'Response.AddHeader "Content-Type", "text/html" 'Response.AddHeader "Charset", "iso-8859-1" queryS = Request.QueryString Set querySDict = CreateObject("Scripting.Dictionary") If queryS<>"" Then If InStr(queryS,"&") Then pairs = Split(queryS,"&") for each pair in pairs if InStr(pair,"=") Then data = Split(pair,"=") querySDict.Add data(0), data(1) 'Response.write("Data: " & data(0) & " " & data(1)) end if next ElseIf InStr(queryS,"=") Then data = Split(queryS,"=") querySDict.Add data(0), data(1) 'Response.write("Data: " & data(0) & " " & data(1)) End If 'InStr End If 'queryS<>"" querySansId = "" If querySDict.Exists("id") Then querySDict.Remove("id") if querySDict.Count > 0 then isFirst = true for each key in querySDict.Keys if Not isFirst then querySansId = querySansId & "&" else isFirst = false end if querySansId = querySansId & key & "=" & querySDict(key) next end if End If Function PageNoSub() index = InStr(pageId,"/") if index = 0 Then PageNoSub = pageId Else PageNoSub = Left(pageId,index-1) End If End Function 'Page file names main_pageFile = "main_page.asp" speakersFile = "speakers.asp" programmeFile = "programme.asp" informationFile = "information.asp" contactsFile = "contacts.asp" materialsFile = "materials.asp" defaultPageFile = main_pageFile Sub SafeExecute(file) Set fs=Server.CreateObject("Scripting.FileSystemObject") absFile = Server.MapPath(file) If (fs.FileExists(absFile))=true Then Server.Execute(file) Else Server.Execute(defaultPageFile) End If set fs=nothing End Sub Dim BrowserName, ie_version, br_index, version_str, version_num BrowserName = Request.ServerVariables("HTTP_USER_AGENT") ie_version = 0 br_index = InStr(BrowserName, "MSIE") If br_index > 0 Then version_str = Mid(BrowserName, br_index, 8) version_num = Mid(version_str, 6, 3) If IsNumeric(version_num) Then ie_version = CInt(version_num) End If End If Session("IEVersion") = ie_version %> Conference 2009
<% If pageId = "" Or PageNoSub() = "main_page" Then %>
<% Else %>   <% End If %> <% If PageNoSub() = "speakers" Then %>
<% Else %> <% End If %> <% If PageNoSub() = "programme" Then %>
<% Else %> <% End If %> <% If PageNoSub() = "information" Then %>
<% Else %> <% End If %> <% If PageNoSub() = "contacts" Then %>
<% Else %> <% End If %> <% If PageNoSub() = "materials" Then %>
<% Else %> <% End If %>
<% If pageId = "" Or PageNoSub() = "main_page" Then SafeExecute(main_pageFile) ElseIf PageNoSub() = "speakers" Then SafeExecute(speakersFile) ElseIf PageNoSub() = "programme" Then SafeExecute(programmeFile) ElseIf PageNoSub() = "information" Then SafeExecute(informationFile) ElseIf PageNoSub() = "contacts" Then SafeExecute(contactsFile) ElseIf PageNoSub() = "materials" Then SafeExecute(materialsFile) Else %>
Page "<%= pageId %>" not found
<% SafeExecute(defaultPageFile) End If %>