<%Option Explicit%> <% Dim strMainTitle, strMainBody Dim strSql, rsCategories, arrColours, rsMain, strMenu arrColours = GetColours() If Not CreateConnection() Then Response.write(GetDatabaseErrorMessage()) End If strSql = "SELECT * FROM CONTENT WHERE CONTENT_NAME = 'eventmain'" Set rsMain = GetRecordset(strSQL) Do while not rsMain.EOF strMainTitle = rsMain.Fields("CONTENT_TITLE") strMainBody = rsMain.Fields("CONTENT_BODY") rsMain.MoveNext() Loop 'response.Write(strMainTitle & "
") ' response.Write(strMainBody & "
") If rsMain.State = adStateOpen then rsMain.Close End If strSql = "SELECT * FROM qryAvailableCategories" Set rsCategories = GetRecordset(strSQL) strMenu = "" ' Generate the left menu Do While Not rsCategories.EOF strMenu = strMenu & "" & rsCategories.Fields("EVENT_CATEGORY_NAME") & "" rsCategories.MoveNext Loop ' Reset the recordset for later use If rsCategories.RecordCount > 0 Then rsCategories.MoveFirst() End If %> Newhampton Arts Centre
<% Response.Write(strMenu) %>
<% Dim strSqlEvent, rsEvent, intUBound, intCount intCount = 0 intUBound = UBound(arrColours) ' First loop through the categories Do while not rsCategories.EOF strSqlEvent = "SELECT * FROM EVENT_ITEM WHERE EVENT_CATEGORY_ID = " & rsCategories.Fields("EVENT_CATEGORY_ID") &_ " ORDER BY ORDER_INDEX ASC" Set rsEvent = GetRecordset(strSqlEvent) %> <% Do while not rsEvent.EOF %> <% rsEvent.MoveNext() Loop %> <% If intCount = intUBound Then intCount = 0 Else intCount = intCount + 1 End If rsCategories.MoveNext() %> <% Loop %>

Coming Up

<% If strMainTitle <> "" and strMainBody <> "" Then %>

<%Response.Write(strMainTitle)%>

<%Response.Write(Replace(strMainBody & "", chr(13), "
"))%>


<% End If %>

<%=rsCategories.Fields("EVENT_CATEGORY_NAME")%>

<% If trim(rsEvent.Fields("EVENT_ITEM_TITLE")) <> "" Then %> <%=replace(rsEvent.Fields("EVENT_ITEM_TITLE") & "", chr(13), "
")%>
<%End If%> <% If trim(rsEvent.Fields("EVENT_ITEM_SUB_TITLE")) <> "" Then %>
<%=replace(rsEvent.Fields("EVENT_ITEM_SUB_TITLE") & "", chr(13), "
")%>
<%End If%> <% If trim(rsEvent.Fields("ITEM_DATE")) <> "" Then %>
<%=replace(rsEvent.Fields("ITEM_DATE") & "", chr(13), "
")%>

<%End If%>

<% If trim(rsEvent.Fields("IMAGE_NAME")) <> "" Then %> " width="150px"/> <%End If%>
<% If trim(rsEvent.Fields("BODY_TEXT")) <> "" Then %>

<%=replace(rsEvent.Fields("BODY_TEXT") & "", chr(13), "
")%>

<%End If%> <% If trim(rsEvent.Fields("PRICE")) <> "" Then %>

<%=replace(rsEvent.Fields("PRICE") & "", chr(13), "
")%>

<%End If%>

back to top

General Enquiries Tel/Fax: 01902 572090 or email: admin@newhamptonarts.co.uk
<% If isobject(rsEvent) Then If rsEvent.State = adStateOpen then rsEvent.Close End If End If If rsCategories.State = adStateOpen then rsCategories.Close End If ReleaseConnection %>