<%@ Language=VBScript %> <% ' initialize variables dTypePrint = request.querystring("SID") ' open database connection Set dbNewsItems = Server.CreateObject("ADODB.Connection") dbNewsItems.open "DRIVER={MySQL ODBC 3.51 Driver};PORT=3306;SEREVER=localhost;DataBase=sound53_masterdata;UID=sound53_dbuser;PWD=SOSdb2012" ' count items to display SQLStatement = "SELECT COUNT(*) as tCNT FROM performances WHERE display = 'Y' " if dTypePrint = "JAZZ" then SQLStatement = SQLStatement & " AND SOSJazz = 'Y' " elseif dTypePrint = "BAND" then SQLStatement = SQLStatement & " AND SOSJazz = 'N' " end if set rsPerformances = dbNewsItems.Execute(SQLStatement) wCount = rsPerformances("tCNT") ' retrieve all items SQLStatement = "SELECT * FROM performances WHERE display = 'Y' " if dTypePrint = "JAZZ" then SQLStatement = SQLStatement & " AND SOSJazz = 'Y' " elseif dTypePrint = "BAND" then SQLStatement = SQLStatement & " AND SOSJazz = 'N' " end if SQLStatement = SQLStatement & "ORDER BY performance_date " set rsPerformances = dbNewsItems.Execute(SQLStatement) dim dItems(200,11) dim dTitles(10) dTitles(1) = "Event" dTitles(2) = "Description" dTitles(3) = "Date" dTitles(4) = "Time" dTitles(5) = "Call" dTitles(6) = "Location" dTitles(7) = "Dress" dTitles(8) = "Directions" dTitles(9) = "New Item" %> Event Calendar

Sounds of Sawnee Performance Calendar      As of: <% = now() %>


<% for wItem = 1 to wCount dItems(wItem, 1) = rsPerformances("event_name") & "" dItems(wItem, 2) = rsPerformances("event_description") & "" dItems(wItem, 3) = rsPerformances("performance_date") & "" dItems(wItem, 4) = rsPerformances("start_time") & "" dItems(wItem, 5) = rsPerformances("call_time")& "" dItems(wItem, 6) = rsPerformances("location") & "" dItems(wItem, 7) = rsPerformances("dress")& "" dItems(wItem, 8) = rsPerformances("directions") & "" if rsPerformances("duration") & "" = "" then ' do nothing else dItems(wItem, 4) = dItems(wItem, 4) & " - " & rsPerformances("duration") end if for J = 1 to 8 if dItems(wItem, J) = "" then dItems(wItem, J) = "TBD" next 'J wDateDiff = DateDiff("d", rsPerformances("date_edited"), now()) if wDateDiff > 14 then dItems(wItem, 9) = "*" else dItems(wItem, 9) = "" rsPerformances.movenext 'response.write(wItem & " - " & dItems(wItem, 1) & " " & dItems(wItem, 2) & "
") next 'wItem %>
<% for wItem = 1 to wCount step 2 ' insert headers %> <% for J = 3 to 8 %> <% next 'j %> <% if rsPerformances.eof = false then rsPerformances.movenext next 'wItem %>
<% = dItems(wItem, 1) %><% if dItems(wItem, 9) <> "" then %> *<% end if %>
        <% = dItems(wItem, 2) %>
<% = dItems(wItem + 1, 1) %><% if dItems(wItem + 1, 9) <> "" then %> *<% end if %>
        <% = dItems(wItem + 1, 2) %>
    <% = dTitles(J) %>: <% = dItems(wItem, J) %>     <% = dTitles(J) %>: <% = dItems(wItem+1, J) %>
  

NOTE: An asterisk next to the event name means this event has been updated in the last 2 weeks.