Her er hele kildekoden. Er der nogen der kan få det til at virke og eventuelt gøre den mere overskuelig.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% ' Hovedmenu start
Dim rs, rs2, rs3,checkusedarr(100)
Dim conn,sCatname,idCategory,idCategory2,idCategory3, sSub,nSub,bool1,bool2, bool3,check
Dim SqlString
Dim vitem
bool1=false
bool2=false
bool3=false
check=0
'Set conn = Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("adodb.Recordset")
set rs2=Server.CreateObject("adodb.Recordset")
'Hovedmenu slut
%>
<!--#include file="Connections/CMSContent.asp" -->
<%
Dim rsMenuevents__MMColParam
rsMenuevents__MMColParam = "157"
If (Request("MM_EmptyValue") <> "") Then
rsMenuevents__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim rsMenuevents
Dim rsMenuevents_cmd
Dim rsMenuevents_numRows
Set rsMenuevents_cmd = Server.CreateObject ("ADODB.Command")
rsMenuevents_cmd.ActiveConnection = MM_CMSContent_STRING
rsMenuevents_cmd.CommandText = "SELECT * FROM menu WHERE idParentCategory = ? ORDER BY categoryDesc ASC"
rsMenuevents_cmd.Prepared = true
rsMenuevents_cmd.Parameters.Append rsMenuevents_cmd.CreateParameter("param1", 5, 1, -1, rsMenuevents__MMColParam) ' adDouble
Set rsMenuevents = rsMenuevents_cmd.Execute
rsMenuevents_numRows = 0
%>
<%
cityList= cint(request.querystring("CityList"))
Dim rsqueryHoldOversigt
Dim rsqueryHoldOversigt_cmd
Dim rsqueryHoldOversigt_numRows
Set rsqueryHoldOversigt_cmd = Server.CreateObject ("ADODB.Command")
rsqueryHoldOversigt_cmd.ActiveConnection = MM_CMSContent_STRING
If CityList =0 then
rsqueryHoldOversigt_cmd.CommandText = "SELECT City.City, City.CityId, Hold.HoldType, Kommentar.Kommentar, Ugedag.Ugedag, Holdoversigt.Hold, Holdoversigt.Pris, Holdoversigt.CityRef, Holdoversigt.saeson, Holdoversigt.Tid FROM ((((Holdoversigt LEFT JOIN Kommentar ON Kommentar.kommentarId=Holdoversigt.kommentarRef) LEFT JOIN Ugedag ON Ugedag.UgedagId=Holdoversigt.UgeDagRef) LEFT JOIN Hold ON Hold.holdId=Holdoversigt.holdRef) LEFT JOIN City ON City.CityId=Holdoversigt.Cityref)" & " order by Holdoversigt.idhold,city.city desc"
rsqueryHoldOversigt_cmd.Prepared = true
Set rsqueryHoldOversigt = rsqueryHoldOversigt_cmd.Execute
rsqueryHoldOversigt_numRows = 0
else
rsqueryHoldOversigt_cmd.CommandText = "SELECT City.City, City.CityId, Hold.HoldType, Kommentar.Kommentar, Ugedag.Ugedag, Holdoversigt.Hold, Holdoversigt.Pris, Holdoversigt.CityRef, Holdoversigt.saeson, Holdoversigt.Tid FROM ((((Holdoversigt LEFT JOIN Kommentar ON Kommentar.kommentarId=Holdoversigt.kommentarRef) LEFT JOIN Ugedag ON Ugedag.UgedagId=Holdoversigt.UgeDagRef) LEFT JOIN Hold ON Hold.holdId=Holdoversigt.holdRef) LEFT JOIN City ON City.CityId=Holdoversigt.Cityref) where CityId= " & CityList & " order by Holdoversigt.idhold,city.city desc"
rsqueryHoldOversigt_cmd.Prepared = true
Set rsqueryHoldOversigt = rsqueryHoldOversigt_cmd.Execute
rsqueryHoldOversigt_numRows = 0
end if
%>
<%
Dim rsMenuList__MMColParam
rsMenuList__MMColParam = "154"
If (Request("MM_EmptyValue") <> "") Then
rsMenuList__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
'afdelinger
Dim rsMenuList
Dim rsMenuList_cmd
Dim rsMenuList_numRows
Set rsMenuList_cmd = Server.CreateObject ("ADODB.Command")
rsMenuList_cmd.ActiveConnection = MM_CMSContent_STRING
rsMenuList_cmd.CommandText = "SELECT * FROM menu WHERE idParentCategory = ?" & "order by categoryDesc asc"
rsMenuList_cmd.Prepared = true
rsMenuList_cmd.Parameters.Append rsMenuList_cmd.CreateParameter("param1", 5, 1, -1, rsMenuList__MMColParam) ' adDouble
Set rsMenuList = rsMenuList_cmd.Execute
rsMenuList_numRows = 0
%>
<%
'danse
Dim rsMenuDanse__MMColParam
rsMenuDanse__MMColParam = "155"
If (Request("MM_EmptyValue") <> "") Then
rsMenuList__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim rsMenuDanse
Dim rsMenuDanse_cmd
Dim rsMenuDanse_numRows
Set rsMenuDanse_cmd = Server.CreateObject ("ADODB.Command")
rsMenuDanse_cmd.ActiveConnection = MM_CMSContent_STRING
rsMenuDanse_cmd.CommandText = "SELECT * FROM menu WHERE idParentCategory = ?" & "order by categoryDesc asc"
rsMenuDanse_cmd.Prepared = true
rsMenuDanse_cmd.Parameters.Append rsMenuDanse_cmd.CreateParameter("param1", 5, 1, -1, rsMenuDanse__MMColParam) ' adDouble
Set rsMenuDanse = rsMenuDanse_cmd.Execute
rsMenuDanse_numRows = 0
%>
<%
' Sidemenu
Dim rsMenu__MMColParam
rsMenu__MMColParam = "0"
If (Request("MM_EmptyValue") <> "") Then
rsMenu__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
titleId = cint(request.QueryString("tit"))
Dim rsMenu
Dim rsMenu_cmd
Dim rsMenu_numRows
Set rsMenu_cmd = Server.CreateObject ("ADODB.Command")
rsMenu_cmd.ActiveConnection = MM_CMSContent_STRING
rsMenu_cmd.CommandText = "SELECT id_pag, visible_pag, date_pag, idpag_pag, title_pag FROM page_pag WHERE idpag_pag = ? and visible_pag >0 ORDER BY date_pag ASC"
rsMenu_cmd.Prepared = true
rsMenu_cmd.Parameters.Append rsMenu_cmd.CreateParameter("param1", 5, 1, -1, rsMenu__MMColParam) ' adDouble
Set rsMenu = rsMenu_cmd.Execute
rsMenu_numRows = 0
%>
<%
'Hovedmenu vis side
Dim rsQuery
Dim rsQuery_cmd
Dim rsQuery_numRows
dim id
id= cint(request.querystring("idCategory"))
if id=0 then
id = 152
end if
Set rsQuery_cmd = Server.CreateObject ("ADODB.Command")
rsQuery_cmd.ActiveConnection = MM_CMSContent_STRING
rsQuery_cmd.CommandText = "SELECT metaTags_pag.Content, metaTags_pag.MetaContents, metaTags_pag.idCategoryRef, metaTags_pag.MetaId, metaTags_pag.MetaKeywords, metaTags_pag.PageTitle, menu.idCategory FROM (menu LEFT JOIN metaTags_pag ON metaTags_pag.idCategoryRef=menu.idCategory) where metaTags_pag.idCategoryRef=" & id
rsQuery_cmd.Prepared = true
Set rsQuery = rsQuery_cmd.Execute
rsQuery_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rsMenu_numRows = rsMenu_numRows + Repeat1__numRows
'Sidemenu slut
%>
<!--#include file="includes/mxi/MXI.asp" -->
<%
' Include Multiple Static Pages
Dim mxiObj: Set mxiObj = new MXI_Includes
mxiObj.Init "mod"
mxiObj.IncludeStatic "1", "front/view_art.asp", "", "", ""
mxiObj.IncludeStatic "0", "front/view_list.asp", "", "", ""
'mxiObj.IncludeStatic "", "front/welcome.htm", "", "", ""
' End Include Multiple Static Pages
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ><html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<% if TitleId =1 then %>
<title><%= rsmenu("title_pag")%></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="robots" content="all" />
<% Else %>
<title><%= rsQuery("PageTitle")%></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<%= rsQuery("MetaKeywords")%>" />
<meta name="description" content="<%= rsQuery("MetaContents")%>" />
<meta name="robots" content="all" />
<% End If %>
<link rel="stylesheet" href="css/2.css" type="text/css" />
<script type="text/javascript" language="JavaScript1.2" src="includes/menu/stmenu.js"></script>
</head>
<body>
<div id="container" >
<div id="banner" > </div>
<!--#include file="menu.asp"-->
<div id="outer" >
<div id="inner">
<div id="left" >
<div class="prop"></div>
<% Select case id
case 154,160,161,162,163,178,179%>
<h2>Afdelinger</h2>
<div style="border-right: 1px; color: gray; height:100%; margin-bottom:25px; witdh: 1px; padding: 0; display:block; border-style: dashed; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 1px; ">
<ul>
<% While NOT rsMenuList.EOF%>
<li>
<a href="index.asp?idcategory=<%=rsMenuList.fields.item("idcategory").value%>"><%=rsMenuList.fields("categoryDesc") %></a></li>
<%rsMenuList.MoveNext
Wend %></ul>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit a</p>
</div>
<%case 155,164,167,168,172,173 %>
<h2>Danse</h2>
<div style="border-right: 1px; color: gray; height:100%; margin-bottom:25px; witdh: 1px; padding: 0; display:block; border-style: dashed; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 1px; ">
<ul>
<% While NOT rsMenuDanse.EOF%>
<li>
<a href="index.asp?idcategory=<%=rsMenuDanse.fields.item("idcategory").value%>"><%=rsMenuDanse.fields("categoryDesc") %></a></li>
<%rsMenuDanse.MoveNext
Wend %></ul><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit a</p>
</div>
<%case 157,174,175,176,177%>
<h2>Events</h2>
<div style="border-right: 1px; color: gray; height:100%; margin-bottom:25px; witdh: 1px; padding: 0; display:block; border-style: dashed; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 1px; ">
<ul>
<% While NOT rsMenuevents.EOF%>
<li>
<a href="index.asp?idcategory=<%=rsMenuevents.fields.item("idcategory").value%>"><%=rsMenuevents.fields("categoryDesc") %></a></li>
<%rsMenuevents.MoveNext
Wend %></ul><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit a</p>
</div>
<% case 156 %>
<h2>Holdoversigt</h2>
<div style="border-right: 1px; color: gray; height:100%; margin-bottom:25px; witdh: 1px; padding: 0; display:block; border-style: dashed; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 1px; ">
<ul>
<% While NOT rsqueryHoldOversigt.EOF %>
<% idcategory=156 %>
<%If strLastHoldType1 <> rsqueryHoldOversigt.Fields.Item("city").Value Then%>
<li><a href="index.asp?CityList=<%=rsqueryHoldOversigt.fields.item("CityId").value%>"><%=rsqueryHoldOversigt.fields("City").value %></a></li>
<%End If
strLastHoldType1 = rsqueryHoldOversigt.Fields.Item("City").Value%>
<%
rsqueryHoldOversigt.MoveNext()
Wend
%></ul>
<p>Mandage kl. 21.15 - Torsdage kl. 21.15 - Fredage kl. 19.40 & Søndage kl. 19.40
kan reserveres til sluttede dansehold, af varihed 1 - 2 el. 3 mdr. Ring efter tilbud: XXXXXXX. FLEX: Ved fravær er der mulighed for flex til et andet hold med samme niveau.</p></div>
<%case else%>
<h2>Nyheder</h2>
<div style="border-right: 1px; color: gray; height:100%; margin-bottom:25px; witdh: 1px; padding: 0; display:block; border-style: dashed; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 1px; ">
<ul>
<%
' List Sidemenu
While ((Repeat1__numRows <> 0) AND (NOT rsMenu.EOF)) %>
<li><a href="index.asp?id_pag=<%=(rsMenu.Fields.Item("id_pag").Value)%>&mod=0&tit=1"><%=(rsMenu.Fields.Item("title_pag").Value)%></a><br />
<%=(rsMenu.Fields.Item("date_pag").Value)%></li>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsMenu.MoveNext()
Wend
%>
</ul></div>
<%End Select%>
</div>
<div id="content">
<% if TitleId <>1 then %>
<h2><%= rsQuery("PageTitle")%> </h2>
<% End If %>
<p> <%
incFileName = mxiObj.getCurrentInclude()
If Not isnull(incFileName) Then
Response.write KT_include(incFileName) ' require the page content
End If
%></p>
<% if TitleId <>1 then %>
<% select case id ' kun for holdoversigt
case 156 %>
<table border="0">
<% ' hele holdoversigt
While NOT rsqueryHoldOversigt.EOF
If strLastHoldType <> rsqueryHoldOversigt.Fields.Item("HoldType").Value Then%>
<tr>
<td colspan="6"><strong><%=(rsqueryHoldOversigt.Fields.Item("HoldType").Value)%></strong></td></tr>
<tr><td colspan="6"><strong><%=(rsqueryHoldOversigt.Fields.Item("Kommentar").Value)%></strong></td>
</tr>
<tr>
<td>Hold:</td>
<td>Sæson:</td>
<td>Dag:</td>
<td>Kl.:</td>
<td>By:</td>
<td>Pris:</td>
</tr>
<% End If
strLastHoldType = rsqueryHoldOversigt.Fields.Item("HoldType").Value%>
<tr>
<td><%=(rsqueryHoldOversigt.Fields.Item("Hold").Value)%></td>
<td><%=(rsqueryHoldOversigt.Fields.Item("saeson").Value)%></td>
<td><%=(rsqueryHoldOversigt.Fields.Item("Ugedag").Value)%></td>
<td><%=(rsqueryHoldOversigt.Fields.Item("Tid").Value)%></td>
<td><%=(rsqueryHoldOversigt.Fields.Item("City").Value)%></td>
<td><%=(rsqueryHoldOversigt.Fields.Item("Pris").Value)%></td>
</tr>
<%
Wend
'End if
%>
</table>
<br/><br />
<%case else%>
<p><%= rsQuery("Content")%>
<br/><br /></p>
<%End Select%>
<% End If %>
<p></p>
</div><!-- end content -->
</div><!-- end inner -->
</div>
<!-- end outer -->
<div id="footer"><p>Top | Sitemap | Disclaimer | Om selskabsdans.dk | Webmaster</p></div>
</div><!-- end container -->
<p id="footerValid">Copyright 2007 xxxxxxx. All Rights Reserved. Valid XHTML | CSS</p>
</body>
</html>
<%
rsMenuevents.Close()
Set rsMenuevents = Nothing
%>
<%
rsqueryHoldOversigt.Close()
Set rsqueryHoldOversigt = Nothing
%>
<%
rsMenuList.Close()
Set rsMenuList = Nothing
%>
<%
rsMenuDanse.Close()
Set rsMenuDanse = Nothing
%>
<%
rsMenu.Close()
Set rsMenu = Nothing
%>
<%
rsQuery.Close()
Set rsQuery = Nothing
%>
Der er også nogle filer som bliver include - har i brug for at se dem?
/felixcat