diff --git a/dist/agenda.html b/dist/agenda.html index 7fe567f5b5b80128dba869c539ab1c56cb1e4364..3662e2b920b9379a8828780e2c9cc12dc15ee3fe 100644 --- a/dist/agenda.html +++ b/dist/agenda.html @@ -8,5 +8,5 @@ <script type="text/javascript" src="ecrire/presentation.js"></script> </head><body> [(#ENV{type, mois}|agenda_connu)<INCLURE(page.php3) - {fond=#ENV{type}}{type}{delais=900}{annee}{mois}{jour}{echelle}{partie_cal}>] + {fond=#ENV{type,mois}}{type}{delais=900}{annee}{mois}{jour}{echelle}{partie_cal}>] </body></html> diff --git a/dist/jour.html b/dist/jour.html index b452bdf73cbf4643bc9403642b7c55d3fb286dde..2210bef23e58fbbc6a77529be852e75511b7b821 100644 --- a/dist/jour.html +++ b/dist/jour.html @@ -1,8 +1,8 @@ <BOUCLE_jour(ARTICLES) {agenda date, jour, #ENV{annee}, #ENV{mois}, #ENV{jour}}>[ -(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 'jour'}) +(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 1}) ]</BOUCLE_jour> -[(#DATE|agenda_memo{'', '', '', 'jour', 'jour'})] +[(#DATE|agenda_memo{'', '', '', 1, 'jour'})] </B_jour> <:aucun_article:> <//B_jour> \ No newline at end of file diff --git a/dist/mois.html b/dist/mois.html index 5d5c9a4b4d62e7ec5dd069baa99c89fab9859976..3e2fba64476c66fe08250d535d3bcf314f387891 100644 --- a/dist/mois.html +++ b/dist/mois.html @@ -1,8 +1,8 @@ <BOUCLE_mois(ARTICLES) {agenda date, mois, #ENV{annee}, #ENV{mois}}>[ -(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 'mois'}) +(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 3}) ]</BOUCLE_mois> -[(#DATE|agenda_memo{'', '', '', 'mois', 'mois'})] +[(#DATE|agenda_memo{'', '', '', 3, 'mois'})] </B_mois> <:aucun_article:> <//B_mois> \ No newline at end of file diff --git a/dist/periode.html b/dist/periode.html index c8946cddfa1499451c9a9de52ff12748d9db17d2..d152f31d36a9cf7bf5da0661de605647c0d51717 100644 --- a/dist/periode.html +++ b/dist/periode.html @@ -2,9 +2,9 @@ {agenda date, periode, #ENV{annee}, #ENV{mois}, #ENV{jour}, #ENV{annee_fin}, #ENV{mois_fin}, #ENV{jour_fin}}>[ -(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 'periode'}) +(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 4}) ]</BOUCLE_periode> -[(#DATE|agenda_memo{'', '', '', 'periode', 'periode'})] +[(#DATE|agenda_memo{'', '', '', 4, 'periode'})] </B_periode> <:aucun_article:> <//B_periode> \ No newline at end of file diff --git a/dist/semaine.html b/dist/semaine.html index b1df658d049cfbaac4483b6428022be0229a7a62..aae0c6a948c6e57d2fe88c5310c3a6594567c70d 100644 --- a/dist/semaine.html +++ b/dist/semaine.html @@ -1,8 +1,8 @@ <BOUCLE_semaine(ARTICLES) {agenda date, semaine, #ENV{annee}, #ENV{mois}, #ENV{jour}}>[ -(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 'semaine'}) +(#DATE|agenda_memo{#DESCRIPTIF, #TITRE, #URL_ARTICLE, 2}) ]</BOUCLE_semaine> -[(#DATE|agenda_memo{'', '', '', 'semaine', 'semaine'})] +[(#DATE|agenda_memo{'', '', '', 2, 'semaine'})] </B_semaine> <:aucun_article:> <//B_semaine> diff --git a/ecrire/inc_calendrier.php b/ecrire/inc_calendrier.php index 097697555af685ac9733e39a46bf95ca69315a87..329d65186d3657676eb3ffc456e072ee4b46da8b 100644 --- a/ecrire/inc_calendrier.php +++ b/ecrire/inc_calendrier.php @@ -198,11 +198,11 @@ function http_calendrier_init($time='', $ltype='', $lechelle='', $lpartie_cal='' if (!$time) { $today=getdate(time()); - if (!isset($annee)) + if (!$annee) $annee = $today["year"]; - if (!isset($mois)) + if (!$mois) $mois = $today["mon"]; - if (!isset($jour)) + if (!$jour) $jour = $today["mday"]; $time = mktime(0,0,0,$mois, $jour, $annee); $type= 'mois'; diff --git a/ecrire/inc_filtres.php3 b/ecrire/inc_filtres.php3 index 974b47f4fb8cfde166390c748b73434b603be31d..44d512bc9bd81acb654b5ea978a4169325392f4c 100644 --- a/ecrire/inc_filtres.php3 +++ b/ecrire/inc_filtres.php3 @@ -710,18 +710,24 @@ function agenda_connu($type) return in_array($type, array('jour','mois','semaine','periode')) ? ' ' : ''; } +// A chaque appel de moins 5 arguments,cette fonction memorise un evenement +// decrit par une date, un descriptif, un titre et une URL. +// A l'appel avec 6 arguments, l'ensemble sera mis en page selon le type +// indique par le 6e argument et la couleur indiquee par le 5e +// (nombre indexant le tableau $contraste de inc_calendrier -- a CSS-iser) +// Ce 5e argument sert aussi d'index de memorisation +// pour avoir plusieurs calendriers dans une meme page sans interferences + + function agenda_memo($date='', $descriptif='', $titre='', $url='', $cal='', $type='') { static $agenda = array(); if (!$type) { - // rajouter une dimension dans le tableau afin d'autoriser plusieurs - // calendriers dans une même page $agenda[$cal][(date_anneemoisjour($date))][] = array( -# CATEGORIES reference le tableau $contraste de inc_calendrier -# faudrait passer ca en CSS - 'CATEGORIES' => 2, + 'CATEGORIES' => intval($cal), 'DTSTART' => date_ical($date), + 'DTEND' => date_ical($date), 'DESCRIPTION' => texte_script($descriptif), 'SUMMARY' => texte_script($titre), 'URL' => $url); @@ -729,6 +735,7 @@ function agenda_memo($date='', $descriptif='', $titre='', $url='', $cal='', $typ return " "; } else { + if ($type != 'periode') $evt = array('', $agenda[$cal]); else @@ -741,8 +748,8 @@ function agenda_memo($date='', $descriptif='', $titre='', $url='', $cal='', $typ $evt = array('', $agenda[$cal], $min, $max); $type = 'mois'; } - include('ecrire/inc_calendrier.php'); - return http_calendrier_init('', $type, '', '', '', $evt); + include('ecrire/inc_calendrier.php'); + return http_calendrier_init('', $type, '', '', '', $evt); } }