"
end if
end if
' ------------------------------------------------------------
' EERST DE TOON-DATUM GOED ZETTEN OP BASIS VAN HET DATUMSCHEMA
' ------------------------------------------------------------
ZetLokaal = SetLocale("en-gb") 'Datumprojectie DD-MM-EEJJ en Getalsnotatie met decimalen
if Session("agendaNUMMER") > 0 then
statement = "SELECT datum, datumschema, concertagendaID FROM concertagenda WHERE agendaNUMMER = " & Session("agendaNUMMER") & " ORDER BY concertagendaID"
controlestatement = statement
%><%
Set oRs = oConn.Execute(statement)
Do while (Not oRs.eof)
datumveld = oRs("datum") & ""
datumveldSAVE = datumveld
if oRs("datumschema") > " " then
tempinput = day(oRs("datum")) & "-" & month(oRs("datum")) & "-" & year(oRs("datum")) & vbCrlf & oRs("datumschema")
allstates = split(tempinput,vbcrlf)
maxcounter = ubound(allstates)
FOR counter= maxcounter TO 0 STEP -1
thisstate=allstates(counter)
datum1 = thisstate & ""
if datum1 > " " then
datum1 = year(datum1) & "-" & month(datum1) & "-" & day(datum1)
datum2 = year(date()) & "-" & month(date()) & "-" & day(date())
if datum1 >= datum2 then datumveld = datum1 & ""
end if
NEXT
if datumveld <> datumveldSAVE then
statement2 = "UPDATE concertagenda SET datum = '" & datumveld & "' WHERE concertagendaID = " & oRs("concertagendaID")
oConn.Execute statement2
end if
end if
oRs.MoveNext
Loop
oRs.close
Set oRs = Nothing
end if
ZetLokaal = SetLocale("nl")
' ------------------------------------------------------------
timeID2 = ((Hour(Now) * 60) * 60) + (Minute(Now) * 60) + Second(Now)
timeID3 = ((Hour(Now) * 60) * 60) + (Minute(Now) * 60) + Second(Now)
vanafdatum = date() + 0
if Request("historie") = "MIX" then
if Session("jaar") > 0 then
vanafdatum = "2000-01-01"
else
vanafdatum = year(date()) & "-01-01"
end if
end if
' if Session("WEBSITEID") = "PJL2" OR Session("WEBSITEID") = "HOLLANDBOYSCHOIR" OR Session("WEBSITEID") = "UME" then vanafdatum = date() - 10
if Request("vorige3mnd") = "JA" then vanafdatum = Session("vorigedatumCA") + 0
if Request("volgende3mnd") = "JA" then vanafdatum = Session("volgendedatumCA") + 0
teller=0
statement = "SELECT voorraadtoegangskaarten, menukeuze, routebestemming, bestelsite, optie1, PRIJSoptie1, optie2, PRIJSoptie2, optie3, PRIJSoptie3, paginaID, codeIDsoort, pictureID, toegangsprijs, datum, plaats, locatie, aanvangstijd, toelichting, concertagendaID FROM concertagenda WHERE agendaNUMMER = " & Session("agendaNUMMER")
if Session("jaar") > 0 then statement = statement & " AND year(datum) = " & Session("jaar")
if Session("maand") > 0 then statement = statement & " AND month(datum) = " & Session("maand")
if Request("vorige3mnd") = "JA" AND (Session("vorigedatumCA") + 0) > 0 then
statement = statement & " AND datum > " & Session("vorigedatumCA")
end if
if Request("volgende3mnd") = "JA" AND (Session("volgendedatumCA") + 0) > 0 then
statement = statement & " AND datum > " & Session("volgendedatumCA")
end if
if Request.Querystring("historie") = "JA" then
statement = statement & " ORDER BY datum DESC, aanvangstijd"
else
statement = statement & " ORDER BY datum, aanvangstijd"
end if
if Session("WEERGAVE_CONCERTAGENDA") = 3 OR Session("WEERGAVE_CONCERTAGENDA") = 4 then
statement = "SELECT voorraadtoegangskaarten, menukeuze, routebestemming, bestelsite, optie1, PRIJSoptie1, optie2, PRIJSoptie2, optie3, PRIJSoptie3, paginaID, codeIDsoort, pictureID, toegangsprijs, datum, plaats, locatie, aanvangstijd, toelichting, concertagendaID FROM concertagenda WHERE agendaNUMMER = " & Session("agendaNUMMER")
if Session("jaar") > 0 then statement = statement & " AND year(datum) = " & Session("jaar")
if Session("maand") > 0 then statement = statement & " AND month(datum) = " & Session("maand")
if Request.Querystring("historie") = "JA" then
statement = statement & " ORDER BY codeIDsoort DESC, datum, aanvangstijd"
else
statement = statement & " ORDER BY codeIDsoort, datum, aanvangstijd"
end if
end if
if Request("recordID") > " " then
statement = "SELECT * FROM concertagenda WHERE concertagendaID = " & Request("recordID")
end if
controlestatement = statement
%><%
Set oRs = oConn.Execute(statement)
Do while (Not oRs.eof) AND (timeID3 - timeID2) < maxaantalseconden
tonenJN = "JA"
if Session("zoekstring") > " " then
tonenJN = "NEE"
for teller2 = 1 to 5
if teller2 = 1 then zoekitem = oRs("plaats")
if teller2 = 2 then zoekitem = oRs("locatie")
if teller2 = 3 then zoekitem = oRs("toelichting")
if teller2 = 4 then zoekitem = oRs("bestelsite")
if teller2 = 5 then zoekitem = oRs("routebestemming")
if len(zoekitem) >= len(Session("zoekstring")) then
for teller3 = 1 to (len(zoekitem) - len(Session("zoekstring")) + 1)
if Ucase(mid(zoekitem, teller3, len(Session("zoekstring")))) = Ucase(Session("zoekstring")) then tonenJN = "JA"
next
end if
next
end if
datum1 = year(oRs("datum")) & "-" & right((Cstr(100 + month(oRs("datum")))), 2) & "-" & right((Cstr(100 + day(oRs("datum")))), 2)
datum2 = year(vanafdatum) & "-" & right((Cstr(100 + month(vanafdatum))), 2) & "-" & right((Cstr(100 + day(vanafdatum))), 2)
if Request("recordID") > " " then
' niets doen
else
if Request.Querystring("historie") = "JA" then
if datum1 >= datum2 then tonenJN = "NEE"
else
if datum1 < datum2 then tonenJN = "NEE"
end if
end if
if (Session("WEERGAVE_CONCERTAGENDA") = 3 OR Session("WEERGAVE_CONCERTAGENDA") = 4) AND (Session("agendaGENRE") > " " AND Session("agendaGENRE") <> "989898**") then
if oRs("codeIDsoort") <> Session("agendaGENRE") then tonenJN = "NEE"
if Session("agendaGENRE") = "2009-06" AND oRs("codeIDsoort") = "2009-08" AND Session("WEBSITEID") = "PJL2" then tonenJN = "JA"
end if
if tonenJN = "JA" then
teller = teller + 1
opvoorraad = "JA"
if Session("actueleautorisatieniveau") <= 1 AND oRs("voorraadtoegangskaarten") > 0 then
aantalverkocht = 0
statement2 = "SELECT SUM(aantal) AS aantalverkocht FROM orderregels WHERE agendaID = " & oRs("concertagendaID") & " GROUP BY agendaID"
controlestatement = statement2
%><%
Set oRs2 = oConn.Execute(statement2)
Do while (Not oRs2.eof)
aantalverkocht = aantalverkocht + oRs2("aantalverkocht")
oRs2.MoveNext
Loop
oRs2.close
Set oRs2 = Nothing
if aantalverkocht >= oRs("voorraadtoegangskaarten") then opvoorraad = "NEE"
end if
' ==============================================================================================================================================================================================================
' UITGEBREIDE WEERGAVE (1)
' ==============================================================================================================================================================================================================
%><%
' ==============================================================================================================================================================================================================
' TABEL WEERGAVE MET TUSSENKOPJE PER MAAND (2)
' ==============================================================================================================================================================================================================
%><%
' ==============================================================================================================================================================================================================
' TABEL WEERGAVE MET TUSSENKOPJE PER CONCERTSOORT (3)
' ==============================================================================================================================================================================================================
%><%
' ==============================================================================================================================================================================================================
' TABEL WEERGAVE MET TUSSENKOPJE PER CONCERTSOORT EN TOELICHTING OVER DE GEHELE BREEDTE (4)
' ==============================================================================================================================================================================================================
%><%
' ==============================================================================================================================================================================================================
' TABEL WEERGAVE MET TUSSENKOPJE PER MAAND EN MOGELIJKHEID OM MEERDERE ITEMS IN 1 KEER TE BESTELLEN (5)
' ==============================================================================================================================================================================================================
%><%
' ==============================================================================================================================================================================================================
' PER MAAND (MAX 3 MAANDEN) WORDT 1 KOLOM WEERGEGEVEN (6)
' ==============================================================================================================================================================================================================
%><%
' KOPPELING NAAR ROUTEPLANNER
if oRs("routebestemming") > " " then
if Session("WEERGAVE_CONCERTAGENDA") = 1 then
Response.write " |