Akce pro děti

<% Function pocetakci(xK3,xOD,xDO) SQL="select Count(id) as Pocet " &_ "from org_zar_akce " &_ "where Not pravidelna And a_katg2=2 And a_katg3=" & xK3 & " And ((datum_od<=" & FCE_DATUM & " And datum_do>=" & FCE_DATUM & ") Or (datum_od>=" & DATOD & " And datum_od<=" & DATDO & " And datum_do Is Not Null) Or (datum_od>=" & DATOD & " And Datum_od<= " & DATDO & " And datum_do Is Null)) " &_ "group by a_katg1,a_katg3" set poc = Server.CreateObject("ADODB.Recordset") poc.Open SQL, ConnK, 3 If poc.EOF Then pocetakci=0 Else pocetakci=poc("Pocet") End If poc.Close set poc=Nothing End Function Function urci_dat_od(xTYPE) Select Case xTYPE Case "D" xDAT=Now() Case "T" XX1=WeekDay(Now(),0) xDAT=DateAdd("d",-XX1+1,Now()) Case "T2" XX1=WeekDay(DateAdd("ww",1,Now()),0) xDAT=DateAdd("d",-XX1+1,DateAdd("ww",1,Now())) Case "M" XX1=Day(Now())-1 xDAT=DateAdd("d",-XX1,Now()) Case "M2" XX1=Day(DateAdd("m",1,Now()))-1 xDAT=DateAdd("d",-XX1,DateAdd("m",1,Now())) End Select If TYP_DB="SQL" Then xDAT1=Day(xDAT) & "." & Month(xDAT) & "." & Year(xDAT) urci_dat_od="'" & xDAT1 & " 00:00'" Else xDAT1=Month(xDAT) & "/" & Day(xDAT) & "/" & Year(xDAT) urci_dat_od="#" & xDAT1 & " 00:00#" End If End Function Function urci_dat_do(xTYPE) Select Case xTYPE Case "D" xDAT=Now() Case "T" XX1=7-WeekDay(Now(),0) xDAT=DateAdd("d",XX1,Now()) Case "T2" XX1=7-WeekDay(DateAdd("ww",1,Now()),0) xDAT=DateAdd("d",XX1,DateAdd("ww",1,Now())) Case "M" XX1=Month(Now()) xDAT=DateAdd("m",XX1-1,"31/1/"& Year(Now())) Case "M2" XX1=Month(Now()) xDAT=DateAdd("m",XX1,"31/1/"& Year(Now())) End Select If TYP_DB="SQL" Then xDAT1=Day(xDAT) & "." & Month(xDAT) & "." & Year(xDAT) urci_dat_do="'" & xDAT1 & " 23:59'" Else xDAT1=Month(xDAT) & "/" & Day(xDAT) & "/" & Year(xDAT) urci_dat_do="#" & xDAT1 & " 23:59#" End If End Function Select Case Request("int") Case "" DATOD=urci_dat_od("D") DATDO=urci_dat_do("D") SQL="select * from org_zar_akce " &_ "where a_katg2=2 And ((datum_od<=" & FCE_DATUM & " And datum_do>=" & FCE_DATUM & ") Or (datum_od>=" & DATOD & " And datum_od<=" & DATDO & " And datum_do Is Not Null) Or (datum_od>=" & DATOD & " And Datum_od<= " & DATDO & " And datum_do Is Null))" set test = Server.CreateObject("ADODB.Recordset") test.Open SQL, ConnK, 3 If test.EOF Then DATOD=urci_dat_od("M") DATDO=urci_dat_do("M") SQL="select * from org_zar_akce " &_ "where a_katg2=2 And ((datum_od<=" & FCE_DATUM & " And datum_do>=" & FCE_DATUM & ") Or (datum_od>=" & DATOD & " And datum_od<=" & DATDO & " And datum_do Is Not Null) Or (datum_od>=" & DATOD & " And Datum_od<= " & DATDO & " And datum_do Is Null))" set test2 = Server.CreateObject("ADODB.Recordset") test2.Open SQL, ConnK, 3 If test2.EOF Then FNAZ="tento měsíc" TYP="M" Else FNAZ="tento týden" TYP="T" End If Else FNAZ="dnes" TYP="D" End If test.Close set test=Nothing Case "D" FNAZ="dnes" TYP="D" Case "T" FNAZ="tento týden" TYP="T" Case "T2" FNAZ="příští týden" TYP="T2" Case "M" FNAZ="tento měsíc" TYP="M" Case "M2" FNAZ="příští měsíc" TYP="M2" End Select If Request("druh")<>"" Then If Request("druh")<>"0" Then DRUH=CInt(Request("druh")) xDRUH="a_katg3=" & Request("druh") & " And " Else DRUH=0 xDRUH="" End If Else DRUH=0 xDRUH="" End If If Request("order")<>"" Then ORDER=Request("order") Else ORDER="KATG" End If If ORDER="DATE" Then ONAZ="dle data" Else ONAZ="dle zařízení" End If %> <% If Request("print")<>"yes" Then %> <% End If %>
<% DATOD=urci_dat_od(TYP) DATDO=urci_dat_do(TYP) 'Response.Write "

Nastavený filtr: " & FNAZ & "   
" 'Response.Write "Řazení: " & ONAZ & "   " %>

<% If ORDER="KATG" Then SQL="select org_zar_akce.*,a_katg1.nazev as nazevkatg1,org_zar.nazev as nazevzar " &_ "from (org_zar_akce left join a_katg1 on org_zar_akce.a_katg1=a_katg1.id) " &_ "left join org_zar on org_zar_akce.id_zar=org_zar.id " &_ "where Not pravidelna And a_katg2=2 And " & xDRUH & " ((datum_od<=" & FCE_DATUM & " And datum_do>=" & FCE_DATUM & ") Or (datum_od>=" & DATOD & " And datum_od<=" & DATDO & " And datum_do Is Not Null) Or (datum_od>=" & DATOD & " And Datum_od<= " & DATDO & " And datum_do Is Null)) " &_ "order by a_katg1.nazev, org_zar.nazev, datum_od" Else SQL="select org_zar_akce.*,a_katg1.nazev as nazevkatg1,org_zar.nazev as nazevzar " &_ "from (org_zar_akce left join a_katg1 on org_zar_akce.a_katg1=a_katg1.id) " &_ "left join org_zar on org_zar_akce.id_zar=org_zar.id " &_ "where Not pravidelna And a_katg2=2 And " & xDRUH & " ((datum_od<=" & FCE_DATUM & " And datum_do>=" & FCE_DATUM & ") Or (datum_od>=" & DATOD & " And datum_od<=" & DATDO & " And datum_do Is Not Null) Or (datum_od>=" & DATOD & " And Datum_od<= " & DATDO & " And datum_do Is Null)) " &_ "order by a_katg1.nazev, datum_od, id_zar" End If set akce = Server.CreateObject("ADODB.Recordset") akce.Open SQL, ConnK, 3 'Response.Write SQL %>
<% If akce.EOF Then Response.Write "

Žádné akce nejsou" Else If ORDER="KATG" Then ' Výpis pro řazení dle zařízení %>

<% Do While Not akce.EOF If akce("a_katg1")<>xAKATG1 Then %> <% Response.Write "" xAKATG1=akce("a_katg1") End If If akce("id_zar")<>xZAR1 Then %> <% Response.Write "" xZAR1=akce("id_zar") End If %> <% If akce("popis")&""<>"" Then %> <% End If akce.MoveNext Loop %>

 

<%=akce("nazevkatg1")%>

 

<%=akce("nazevzar")%> ">Informace o zařízení

<% Response.Write WeekdayName(Weekday(akce("datum_od")),true) & " " & Day(akce("datum_od")) & "." & Month(akce("datum_od")) & "." If Year(akce("datum_od")) <> Year(Now) Then Response.Write Year(akce("datum_od")) End If If Hour(akce("datum_od"))>0 Then Response.Write " " & dopln(Hour(akce("datum_od")),2,"0") & ":" & dopln(Minute(akce("datum_od")),2,"0") End If If Not IsNull(akce("datum_do")) Then Response.Write " - " Response.Write WeekdayName(Weekday(akce("datum_do")),true) & " " & Day(akce("datum_do")) & "." & Month(akce("datum_do")) & "." If Year(akce("datum_do")) <> Year(Now) Then Response.Write Year(akce("datum_do")) End If If Hour(akce("datum_do"))>0 Then Response.Write " " & dopln(Hour(akce("datum_do")),2,"0") & ":" & dopln(Minute(akce("datum_do")),2,"0") End If End If %>

   

<% If akce("popis_det")&"" <> "" Or akce("popis_det")&"" <> "" Then %>

"><%=akce("nazev")%> <% Else %>

<%=akce("nazev")%> <% End If %>

<%=akce("popis")%>

<% Else ' Výpis při řazení dle data %> <% Do While Not akce.EOF If akce("a_katg1")<>xAKATG1 Then %> <% Response.Write "" xAKATG1=akce("a_katg1") End If %> <% If akce("popis")&""<>"" Then %> <% End If akce.MoveNext Loop %>

 

<%=akce("nazevkatg1")%>

<% Response.Write WeekdayName(Weekday(akce("datum_od")),true) & " " & Day(akce("datum_od")) & "." & Month(akce("datum_od")) & "." If Year(akce("datum_od")) <> Year(Now) Then Response.Write Year(akce("datum_od")) End If If Hour(akce("datum_od"))>0 Then Response.Write " " & dopln(Hour(akce("datum_od")),2,"0") & ":" & dopln(Minute(akce("datum_od")),2,"0") End If If Not IsNull(akce("datum_do")) Then Response.Write " - " Response.Write WeekdayName(Weekday(akce("datum_do")),true) & " " & Day(akce("datum_do")) & "." & Month(akce("datum_do")) & "." If Year(akce("datum_do")) <> Year(Now) Then Response.Write Year(akce("datum_do")) End If If Hour(akce("datum_do"))>0 Then Response.Write " " & dopln(Hour(akce("datum_do")),2,"0") & ":" & dopln(Minute(akce("datum_do")),2,"0") End If End If %>

   

<% Response.Write "" & akce("nazevzar") & "
" If akce("popis_det")&"" <> "" Or akce("popis_det")&"" <> "" Then %> "><%=akce("nazev")%> <% Else %> <%=akce("nazev")%> <% End If %>

<%=akce("popis")%>

<% End If End If %>
 
">

Filtr

Řazení dle

Data spravuje kulturní středisko ALBIS a jsou čerpána z "Nových ústeckých přehledů"