1 |
<?php
|
1 |
<?php
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
4 |
// | PHP version 4.1 |
|
4 |
// | PHP version 4.1 |
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
8 |
// | This library is free software; you can redistribute it and/or |
|
8 |
// | This library is free software; you can redistribute it and/or |
|
9 |
// | modify it under the terms of the GNU Lesser General Public |
|
9 |
// | modify it under the terms of the GNU Lesser General Public |
|
10 |
// | License as published by the Free Software Foundation; either |
|
10 |
// | License as published by the Free Software Foundation; either |
|
11 |
// | version 2.1 of the License, or (at your option) any later version. |
|
11 |
// | version 2.1 of the License, or (at your option) any later version. |
|
12 |
// | |
|
12 |
// | |
|
13 |
// | This library is distributed in the hope that it will be useful, |
|
13 |
// | This library is distributed in the hope that it will be useful, |
|
14 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 |
// | Lesser General Public License for more details. |
|
16 |
// | Lesser General Public License for more details. |
|
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: bazar.fonct.cal.php,v 1.24 2007-09-18 07:36:32 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.cal.php,v 1.25 2007-11-20 10:27:28 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions calendrier du module bazar
|
25 |
* Fonctions calendrier du module bazar
|
26 |
*
|
26 |
*
|
27 |
*@package bazar
|
27 |
*@package bazar
|
28 |
//Auteur original :
|
28 |
//Auteur original :
|
29 |
*@author David Delon <david.delon@clapas.net>
|
29 |
*@author David Delon <david.delon@clapas.net>
|
30 |
//Autres auteurs :
|
30 |
//Autres auteurs :
|
31 |
*@copyright Tela-Botanica 2000-2004
|
31 |
*@copyright Tela-Botanica 2000-2004
|
32 |
*@version $Revision: 1.24 $ $Date: 2007-09-18 07:36:32 $
|
32 |
*@version $Revision: 1.25 $ $Date: 2007-11-20 10:27:28 $
|
33 |
// +------------------------------------------------------------------------------------------------------+
|
33 |
// +------------------------------------------------------------------------------------------------------+
|
34 |
*/
|
34 |
*/
|
35 |
|
35 |
|
36 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// | ENTETE du PROGRAMME |
|
37 |
// | ENTETE du PROGRAMME |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
|
39 |
|
40 |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Month/Weekdays.php';
|
40 |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Month/Weekdays.php';
|
41 |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Day.php';
|
41 |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Day.php';
|
42 |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Decorator.php';
|
42 |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Decorator.php';
|
43 |
|
43 |
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// | LISTE de FONCTIONS |
|
45 |
// | LISTE de FONCTIONS |
|
46 |
// +------------------------------------------------------------------------------------------------------+
|
46 |
// +------------------------------------------------------------------------------------------------------+
|
47 |
|
47 |
|
48 |
// Classe Utilitaire pour Calendrier
|
48 |
// Classe Utilitaire pour Calendrier
|
49 |
class DiaryEvent extends Calendar_Decorator {
|
49 |
class DiaryEvent extends Calendar_Decorator {
|
50 |
var $entry = array();
|
50 |
var $entry = array();
|
51 |
function DiaryEvent($calendar)
|
51 |
function DiaryEvent($calendar)
|
52 |
{
|
52 |
{
|
53 |
Calendar_Decorator::Calendar_Decorator($calendar);
|
53 |
Calendar_Decorator::Calendar_Decorator($calendar);
|
54 |
}
|
54 |
}
|
55 |
function setEntry($entry)
|
55 |
function setEntry($entry)
|
56 |
{
|
56 |
{
|
57 |
$this->entry[] = $entry;
|
57 |
$this->entry[] = $entry;
|
58 |
|
58 |
|
59 |
}
|
59 |
}
|
60 |
function getEntry()
|
60 |
function getEntry()
|
61 |
{
|
61 |
{
|
62 |
return $this->entry;
|
62 |
return $this->entry;
|
63 |
}
|
63 |
}
|
64 |
}
|
64 |
}
|
65 |
|
65 |
|
66 |
|
66 |
|
67 |
// $type : calendrier
|
67 |
// $type : calendrier
|
68 |
// $type : calendrier_appplette
|
68 |
// $type : calendrier_appplette
|
69 |
function GestionAffichageCalendrier($arguments = array(), $type = 'calendrier') {
|
69 |
function GestionAffichageCalendrier($arguments = array(), $type = 'calendrier') {
|
70 |
$script = '';
|
70 |
$script = '';
|
71 |
// recuperation des arguments de l applette
|
71 |
// recuperation des arguments de l applette
|
72 |
$balise = isset ($arguments[0]) ? $arguments[0] : '';
|
72 |
$balise = isset ($arguments[0]) ? $arguments[0] : '';
|
73 |
$tab_arguments = $arguments;
|
73 |
$tab_arguments = $arguments;
|
- |
|
74 |
if (is_string ($tab_arguments)) {
|
- |
|
75 |
$tab_arguments = substr($tab_arguments, 1);
|
- |
|
76 |
} else {
|
74 |
unset($tab_arguments[0]);
|
77 |
unset($tab_arguments[0]);
|
- |
|
78 |
}
|
75 |
if (is_array($tab_arguments)) {
|
79 |
if (is_array($tab_arguments)) {
|
76 |
foreach($tab_arguments as $argument) {
|
80 |
foreach($tab_arguments as $argument) {
|
77 |
if ($argument != '') {
|
81 |
if ($argument != '') {
|
78 |
$tab_parametres = explode('=', $argument, 2);
|
82 |
$tab_parametres = explode('=', $argument, 2);
|
79 |
if (is_array($tab_parametres)) {
|
83 |
if (is_array($tab_parametres)) {
|
80 |
$options[$tab_parametres[0]] =
|
84 |
$options[$tab_parametres[0]] =
|
81 |
(isset($tab_parametres[1])? trim($tab_parametres[1], '"') : '') ;
|
85 |
(isset($tab_parametres[1])? trim($tab_parametres[1], '"') : '') ;
|
82 |
}
|
86 |
}
|
83 |
}
|
87 |
}
|
84 |
}
|
88 |
}
|
85 |
}
|
89 |
}
|
86 |
|
90 |
|
87 |
if (!isset($options['template'])) {
|
91 |
if (!isset($options['template'])) {
|
88 |
$options['template'] = BAZ_CHEMIN_SQUELETTE.BAZ_SQUELETTE_DEFAUT;
|
92 |
$options['template'] = BAZ_CHEMIN_SQUELETTE.BAZ_SQUELETTE_DEFAUT;
|
89 |
} else {
|
93 |
} else {
|
90 |
if (file_exists(BAZ_CHEMIN_SQUELETTE.$options['template'])) {
|
94 |
if (file_exists(BAZ_CHEMIN_SQUELETTE.$options['template'])) {
|
91 |
$options['template'] = BAZ_CHEMIN_SQUELETTE.$options['template'];
|
95 |
$options['template'] = BAZ_CHEMIN_SQUELETTE.$options['template'];
|
92 |
}
|
96 |
}
|
93 |
}
|
97 |
}
|
94 |
|
98 |
|
95 |
$retour = '';
|
99 |
$retour = '';
|
96 |
|
100 |
|
97 |
$url = $GLOBALS['_GEN_commun']['url'] ;
|
101 |
$url = $GLOBALS['_GEN_commun']['url'] ;
|
98 |
$db =& $GLOBALS['_GEN_commun']['pear_db'] ;
|
102 |
$db =& $GLOBALS['_GEN_commun']['pear_db'] ;
|
99 |
$auth =& $GLOBALS['_GEN_commun']['pear_auth'] ;
|
103 |
$auth =& $GLOBALS['_GEN_commun']['pear_auth'] ;
|
100 |
|
104 |
|
101 |
// Nettoyage de l'url de la query string
|
105 |
// Nettoyage de l'url de la query string
|
102 |
$chaine_url = $url->getQueryString();
|
106 |
$chaine_url = $url->getQueryString();
|
103 |
$tab_params = explode('&', $chaine_url);
|
107 |
$tab_params = explode('&', $chaine_url);
|
104 |
if (count($tab_params) == 0) {
|
108 |
if (count($tab_params) == 0) {
|
105 |
$tab_params = explode('&', $chaine_url);
|
109 |
$tab_params = explode('&', $chaine_url);
|
106 |
}
|
110 |
}
|
107 |
foreach ($tab_params as $param) {
|
111 |
foreach ($tab_params as $param) {
|
108 |
$tab_parametre = explode('=', $param);
|
112 |
$tab_parametre = explode('=', $param);
|
109 |
$url->removeQueryString($tab_parametre[0]);
|
113 |
$url->removeQueryString($tab_parametre[0]);
|
110 |
}
|
114 |
}
|
111 |
|
115 |
|
112 |
if (!isset($_GET['y'])) {
|
116 |
if (!isset($_GET['y'])) {
|
113 |
$_GET['y'] = date('Y');
|
117 |
$_GET['y'] = date('Y');
|
114 |
}
|
118 |
}
|
115 |
|
119 |
|
116 |
if (!isset($_GET['m'])) {
|
120 |
if (!isset($_GET['m'])) {
|
117 |
$_GET['m'] = date('m');
|
121 |
$_GET['m'] = date('m');
|
118 |
}
|
122 |
}
|
119 |
|
123 |
|
120 |
// Construction Mois en Cours
|
124 |
// Construction Mois en Cours
|
121 |
$month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
|
125 |
$month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
|
122 |
|
126 |
|
123 |
$curStamp = $month->getTimeStamp();
|
127 |
$curStamp = $month->getTimeStamp();
|
124 |
$url->addQueryString('y', date('Y',$curStamp));
|
128 |
$url->addQueryString('y', date('Y',$curStamp));
|
125 |
$url->addQueryString('m', date('n',$curStamp));
|
129 |
$url->addQueryString('m', date('n',$curStamp));
|
126 |
$url->addQueryString('d', date('j',$curStamp));
|
130 |
$url->addQueryString('d', date('j',$curStamp));
|
127 |
$cur = $url->getUrl();
|
131 |
$cur = $url->getUrl();
|
128 |
|
132 |
|
129 |
// Gestion de l'affichage des titres des évènements
|
133 |
// Gestion de l'affichage des titres des évènements
|
130 |
if (isset($_GET['ctt']) && $_GET['ctt'] == '1') {
|
134 |
if (isset($_GET['ctt']) && $_GET['ctt'] == '1') {
|
131 |
$url->addQueryString('tt', '0');
|
135 |
$url->addQueryString('tt', '0');
|
132 |
if (isset($_GET['tt']) && $_GET['tt'] == '0') {
|
136 |
if (isset($_GET['tt']) && $_GET['tt'] == '0') {
|
133 |
$url->addQueryString('tt', '1');
|
137 |
$url->addQueryString('tt', '1');
|
134 |
}
|
138 |
}
|
135 |
$tc_lien = $url->getUrl();
|
139 |
$tc_lien = $url->getUrl();
|
136 |
} else {
|
140 |
} else {
|
137 |
$url->addQueryString('tt', '0');
|
141 |
$url->addQueryString('tt', '0');
|
138 |
if (isset($_GET['tt']) && $_GET['tt'] == '0') {
|
142 |
if (isset($_GET['tt']) && $_GET['tt'] == '0') {
|
139 |
$url->addQueryString('tt', '1');
|
143 |
$url->addQueryString('tt', '1');
|
140 |
}
|
144 |
}
|
141 |
$url->addQueryString('ctt', '1');
|
145 |
$url->addQueryString('ctt', '1');
|
142 |
$tc_lien = $url->getUrl();
|
146 |
$tc_lien = $url->getUrl();
|
143 |
}
|
147 |
}
|
144 |
$url->removeQueryString('ctt');
|
148 |
$url->removeQueryString('ctt');
|
145 |
$url->removeQueryString('tt');
|
149 |
$url->removeQueryString('tt');
|
146 |
$tc_txt = 'Afficher les titres complets des évènements';
|
150 |
$tc_txt = 'Afficher les titres complets des évènements';
|
147 |
if (isset($_GET['tt']) && $_GET['tt'] == '0') {
|
151 |
if (isset($_GET['tt']) && $_GET['tt'] == '0') {
|
148 |
$tc_txt = 'Tronquer les titres des évènements';
|
152 |
$tc_txt = 'Tronquer les titres des évènements';
|
149 |
$url->addQueryString('tt', $_GET['tt']);
|
153 |
$url->addQueryString('tt', $_GET['tt']);
|
150 |
}
|
154 |
}
|
151 |
|
155 |
|
152 |
// Navigation
|
156 |
// Navigation
|
153 |
$prevStamp = $month->prevMonth(true);
|
157 |
$prevStamp = $month->prevMonth(true);
|
154 |
$url->addQueryString('y', date('Y',$prevStamp));
|
158 |
$url->addQueryString('y', date('Y',$prevStamp));
|
155 |
$url->addQueryString('m', date('n',$prevStamp));
|
159 |
$url->addQueryString('m', date('n',$prevStamp));
|
156 |
$url->addQueryString('d', date('j',$prevStamp));
|
160 |
$url->addQueryString('d', date('j',$prevStamp));
|
157 |
$prev = $url->getUrl();
|
161 |
$prev = $url->getUrl();
|
158 |
|
162 |
|
159 |
$nextStamp = $month->nextMonth(true);
|
163 |
$nextStamp = $month->nextMonth(true);
|
160 |
$url->addQueryString('y', date('Y',$nextStamp));
|
164 |
$url->addQueryString('y', date('Y',$nextStamp));
|
161 |
$url->addQueryString('m', date('n',$nextStamp));
|
165 |
$url->addQueryString('m', date('n',$nextStamp));
|
162 |
$url->addQueryString('d', date('j',$nextStamp));
|
166 |
$url->addQueryString('d', date('j',$nextStamp));
|
163 |
$next = $url->getUrl();
|
167 |
$next = $url->getUrl();
|
164 |
|
168 |
|
165 |
// Suppression du paramêtre de troncage des titres
|
169 |
// Suppression du paramêtre de troncage des titres
|
166 |
$url->removeQueryString('tt');
|
170 |
$url->removeQueryString('tt');
|
167 |
|
171 |
|
168 |
$fr_month = array( "1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,
|
172 |
$fr_month = array( "1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,
|
169 |
"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
|
173 |
"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
|
170 |
|
174 |
|
171 |
// Titre
|
175 |
// Titre
|
172 |
if ($type == 'calendrier') {
|
176 |
if ($type == 'calendrier') {
|
173 |
// Ajout des styles du bazar
|
177 |
// Ajout des styles du bazar
|
174 |
if (defined('PAP_VERSION')) { //si on est dans Papyrus
|
178 |
if (defined('PAP_VERSION')) { //si on est dans Papyrus
|
175 |
GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
|
179 |
GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
|
176 |
GEN_stockerFichierScript('domLib', '/api/js/domtooltip/domLib.js');
|
180 |
GEN_stockerFichierScript('domLib', '/api/js/domtooltip/domLib.js');
|
177 |
GEN_stockerFichierScript('domTT', '/api/js/domtooltip/domTT.js');
|
181 |
GEN_stockerFichierScript('domTT', '/api/js/domtooltip/domTT.js');
|
178 |
// DomToolTip
|
182 |
// DomToolTip
|
179 |
$script = 'var domTT_styleClass = "niceTitle";'."\n";
|
183 |
$script = 'var domTT_styleClass = "niceTitle";'."\n";
|
180 |
$script .= 'function nicetitleDecorator(el) {'."\n";
|
184 |
$script .= 'function nicetitleDecorator(el) {'."\n";
|
181 |
$script .= ' var result = el.title;'."\n";
|
185 |
$script .= ' var result = el.title;'."\n";
|
182 |
$script .= ' result = result.replace(new RegExp("\n", "g"), "<br />");'."\n";
|
186 |
$script .= ' result = result.replace(new RegExp("\n", "g"), "<br />");'."\n";
|
183 |
$script .= ' if (el.href) {'."\n";
|
187 |
$script .= ' if (el.href) {'."\n";
|
184 |
$script .= ' result += "<p>" + el.href + "</p>";'."\n";
|
188 |
$script .= ' result += "<p>" + el.href + "</p>";'."\n";
|
185 |
$script .= ' }'."\n";
|
189 |
$script .= ' }'."\n";
|
186 |
$script .= ' return result;'."\n";
|
190 |
$script .= ' return result;'."\n";
|
187 |
$script .= '}'."\n";
|
191 |
$script .= '}'."\n";
|
188 |
$script .= 'domTT_replaceTitles(nicetitleDecorator);'."\n";
|
192 |
$script .= 'domTT_replaceTitles(nicetitleDecorator);'."\n";
|
189 |
GEN_stockerCodeScript('var domTT_styleClass = "niceTitle";'."\n");
|
193 |
GEN_stockerCodeScript('var domTT_styleClass = "niceTitle";'."\n");
|
190 |
}
|
194 |
}
|
191 |
$retour .= '<div id="cal_entete">';
|
195 |
$retour .= '<div id="cal_entete">';
|
192 |
$retour .= '<span class="cal_navigation">';
|
196 |
$retour .= '<span class="cal_navigation">';
|
193 |
$retour .= '<a id="cal_precedent_lien" href="'.$prev.'" title="Allez au mois précédent"><img id="cal_precedent_img" src="client/bazar/images/cal_precedent.png" alt="<<"/></a>';
|
197 |
$retour .= '<a id="cal_precedent_lien" href="'.$prev.'" title="Allez au mois précédent"><img id="cal_precedent_img" src="client/bazar/images/cal_precedent.png" alt="<<"/></a>';
|
194 |
$retour .= ' ';
|
198 |
$retour .= ' ';
|
195 |
$retour .= '<span id="cal_encadre_mois_courrant"><a id="cal_mois_courrant" href="'.$cur.'">';
|
199 |
$retour .= '<span id="cal_encadre_mois_courrant"><a id="cal_mois_courrant" href="'.$cur.'">';
|
196 |
$retour .= $fr_month[(date('n',$curStamp))];
|
200 |
$retour .= $fr_month[(date('n',$curStamp))];
|
197 |
$retour .= ' ';
|
201 |
$retour .= ' ';
|
198 |
$retour .= (date('Y',$curStamp));
|
202 |
$retour .= (date('Y',$curStamp));
|
199 |
$retour .= '</a></span>';
|
203 |
$retour .= '</a></span>';
|
200 |
$retour .= ' ';
|
204 |
$retour .= ' ';
|
201 |
$retour .= '<a id="cal_suivant_lien" href="'.$next.'" title="Allez au mois suivant"><img id="cal_suivant_img" src="client/bazar/images/cal_suivant.png" alt=">>"/></a>';
|
205 |
$retour .= '<a id="cal_suivant_lien" href="'.$next.'" title="Allez au mois suivant"><img id="cal_suivant_img" src="client/bazar/images/cal_suivant.png" alt=">>"/></a>';
|
202 |
$retour .= '</span>';
|
206 |
$retour .= '</span>';
|
203 |
$retour .= '<h1 id="cal_titre"><img id="cal_titre_img" src="client/bazar/images/cal_titre.png" alt="Calendrier"/></h1>';
|
207 |
$retour .= '<h1 id="cal_titre"><img id="cal_titre_img" src="client/bazar/images/cal_titre.png" alt="Calendrier"/></h1>';
|
204 |
$retour .= '</div>';
|
208 |
$retour .= '</div>';
|
205 |
|
209 |
|
206 |
$retour .= '<p>'.'<a href="'.$tc_lien.'">'.$tc_txt.'</a>'.'</p>';
|
210 |
$retour .= '<p>'.'<a href="'.$tc_lien.'">'.$tc_txt.'</a>'.'</p>';
|
207 |
} else {
|
211 |
} else {
|
208 |
// Appel du template
|
212 |
// Appel du template
|
209 |
ob_start();
|
213 |
ob_start();
|
210 |
include $options['template'];
|
214 |
include $options['template'];
|
211 |
$retour .= ob_get_contents();
|
215 |
$retour .= ob_get_contents();
|
212 |
ob_end_clean();
|
216 |
ob_end_clean();
|
213 |
}
|
217 |
}
|
214 |
// Vue Mois calendrier ou vue applette
|
218 |
// Vue Mois calendrier ou vue applette
|
215 |
|
219 |
|
216 |
if ((!isset($_GET['id_fiche']) && $type == 'calendrier') || ($type == 'calendrier_applette')){
|
220 |
if ((!isset($_GET['id_fiche']) && $type == 'calendrier') || ($type == 'calendrier_applette')){
|
217 |
// trigger_error('ICI', E_USER_NOTICE);
|
221 |
// trigger_error('ICI', E_USER_NOTICE);
|
218 |
// Recherche evenement de la periode selectionnée
|
222 |
// Recherche evenement de la periode selectionnée
|
219 |
$ts_jour_fin_mois = $month->nextMonth('timestamp');
|
223 |
$ts_jour_fin_mois = $month->nextMonth('timestamp');
|
220 |
$ts_jour_debut_mois = $month->thisMonth('timestamp');;
|
224 |
$ts_jour_debut_mois = $month->thisMonth('timestamp');;
|
221 |
$requete_evenements = "SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, DAY(bf_date_debut_evenement) AS bf_jour_debut_evenement, bf_date_debut_evenement, bf_date_fin_evenement, bf_description ".
|
225 |
$requete_evenements = "SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, DAY(bf_date_debut_evenement) AS bf_jour_debut_evenement, bf_date_debut_evenement, bf_date_fin_evenement, bf_description ".
|
222 |
"FROM bazar_fiche, bazar_nature ".
|
226 |
"FROM bazar_fiche, bazar_nature ".
|
223 |
"WHERE bf_date_debut_evenement < '".date('Y-m-d', $ts_jour_fin_mois)."' ".
|
227 |
"WHERE bf_date_debut_evenement < '".date('Y-m-d', $ts_jour_fin_mois)."' ".
|
224 |
"AND bf_date_fin_evenement >= '".date('Y-m-d', $ts_jour_debut_mois)."' ".
|
228 |
"AND bf_date_fin_evenement >= '".date('Y-m-d', $ts_jour_debut_mois)."' ".
|
225 |
"AND bf_ce_nature = bn_id_nature ".
|
229 |
"AND bf_ce_nature = bn_id_nature ".
|
226 |
"AND bn_id_nature IN (".BAZ_NUM_ANNONCE_CALENDRIER.") ".
|
230 |
"AND bn_id_nature IN (".BAZ_NUM_ANNONCE_CALENDRIER.") ".
|
227 |
"AND bf_statut_fiche = 1 ".
|
231 |
"AND bf_statut_fiche = 1 ".
|
228 |
"ORDER BY bf_jour_debut_evenement";
|
232 |
"ORDER BY bf_jour_debut_evenement";
|
229 |
|
233 |
|
230 |
$resultat_evenement = $db->query($requete_evenements);
|
234 |
$resultat_evenement = $db->query($requete_evenements);
|
231 |
|
235 |
|
232 |
(DB::isError($resultat_evenement)) ? trigger_error(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_evenement->getMessage(), $requete_evenements), E_USER_WARNING) : '';
|
236 |
(DB::isError($resultat_evenement)) ? trigger_error(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_evenement->getMessage(), $requete_evenements), E_USER_WARNING) : '';
|
233 |
|
237 |
|
234 |
$selection = array();
|
238 |
$selection = array();
|
235 |
$evenements = array();
|
239 |
$evenements = array();
|
236 |
$annee = date('Y', $curStamp);
|
240 |
$annee = date('Y', $curStamp);
|
237 |
$mois = date('m', $curStamp);
|
241 |
$mois = date('m', $curStamp);
|
238 |
$tablo_jours = array();
|
242 |
$tablo_jours = array();
|
239 |
while ($ligne_evenements = $resultat_evenement->fetchRow(DB_FETCHMODE_OBJECT)) {
|
243 |
while ($ligne_evenements = $resultat_evenement->fetchRow(DB_FETCHMODE_OBJECT)) {
|
240 |
list($annee_debut, $mois_debut, $jour_debut) = explode('-', $ligne_evenements->bf_date_debut_evenement);
|
244 |
list($annee_debut, $mois_debut, $jour_debut) = explode('-', $ligne_evenements->bf_date_debut_evenement);
|
241 |
list($annee_fin, $mois_fin, $jour_fin) = explode('-', $ligne_evenements->bf_date_fin_evenement);
|
245 |
list($annee_fin, $mois_fin, $jour_fin) = explode('-', $ligne_evenements->bf_date_fin_evenement);
|
242 |
|
246 |
|
243 |
$Calendrier = new Calendar($annee_debut, $mois_debut, $jour_debut);
|
247 |
$Calendrier = new Calendar($annee_debut, $mois_debut, $jour_debut);
|
244 |
$ts_jour_suivant = $Calendrier->thisDay('timestamp');
|
248 |
$ts_jour_suivant = $Calendrier->thisDay('timestamp');
|
245 |
$ts_jour_fin = mktime(0,0,0,$mois_fin, $jour_fin, $annee_fin);
|
249 |
$ts_jour_fin = mktime(0,0,0,$mois_fin, $jour_fin, $annee_fin);
|
246 |
|
250 |
|
247 |
if ($ts_jour_suivant < $ts_jour_fin) {
|
251 |
if ($ts_jour_suivant < $ts_jour_fin) {
|
248 |
//echo "$ts_jour_suivant-";
|
252 |
//echo "$ts_jour_suivant-";
|
249 |
$naviguer = true;
|
253 |
$naviguer = true;
|
250 |
while ($naviguer) {
|
254 |
while ($naviguer) {
|
251 |
// Si le jours suivant est inférieur à la date de fin, on continue...
|
255 |
// Si le jours suivant est inférieur à la date de fin, on continue...
|
252 |
if ($ts_jour_suivant <= $ts_jour_fin) {
|
256 |
if ($ts_jour_suivant <= $ts_jour_fin) {
|
253 |
// Si le jours suivant est inférieur à la date de fin du mois courrant, on continue...
|
257 |
// Si le jours suivant est inférieur à la date de fin du mois courrant, on continue...
|
254 |
if ($ts_jour_suivant < $ts_jour_fin_mois) {
|
258 |
if ($ts_jour_suivant < $ts_jour_fin_mois) {
|
255 |
$cle_j = date('Y-m-d', $ts_jour_suivant);
|
259 |
$cle_j = date('Y-m-d', $ts_jour_suivant);
|
256 |
if (!isset($tablo_jours[$cle_j])) {
|
260 |
if (!isset($tablo_jours[$cle_j])) {
|
257 |
$tablo_jours[$cle_j]['Calendar_Day'] = new Calendar_Day(date('Y', $ts_jour_suivant),date('m', $ts_jour_suivant), date('d', $ts_jour_suivant));
|
261 |
$tablo_jours[$cle_j]['Calendar_Day'] = new Calendar_Day(date('Y', $ts_jour_suivant),date('m', $ts_jour_suivant), date('d', $ts_jour_suivant));
|
258 |
$tablo_jours[$cle_j]['Diary_Event'] = new DiaryEvent($tablo_jours[$cle_j]['Calendar_Day']);
|
262 |
$tablo_jours[$cle_j]['Diary_Event'] = new DiaryEvent($tablo_jours[$cle_j]['Calendar_Day']);
|
259 |
}
|
263 |
}
|
260 |
$tablo_jours[$cle_j]['Diary_Event']->setEntry($ligne_evenements);
|
264 |
$tablo_jours[$cle_j]['Diary_Event']->setEntry($ligne_evenements);
|
261 |
|
265 |
|
262 |
$ts_jour_suivant = $Calendrier->nextDay('timestamp');
|
266 |
$ts_jour_suivant = $Calendrier->nextDay('timestamp');
|
263 |
//echo "ici$ts_jour_suivant-";
|
267 |
//echo "ici$ts_jour_suivant-";
|
264 |
$Calendrier->setTimestamp($ts_jour_suivant);
|
268 |
$Calendrier->setTimestamp($ts_jour_suivant);
|
265 |
//echo "la".$Calendrier->thisDay('timestamp')."-";
|
269 |
//echo "la".$Calendrier->thisDay('timestamp')."-";
|
266 |
} else {
|
270 |
} else {
|
267 |
$naviguer = false;
|
271 |
$naviguer = false;
|
268 |
}
|
272 |
}
|
269 |
} else {
|
273 |
} else {
|
270 |
$naviguer = false;
|
274 |
$naviguer = false;
|
271 |
}
|
275 |
}
|
272 |
}
|
276 |
}
|
273 |
} else {
|
277 |
} else {
|
274 |
$curday_ymd = $annee.$mois.$ligne_evenements->bf_jour_debut_evenement;
|
278 |
$curday_ymd = $annee.$mois.$ligne_evenements->bf_jour_debut_evenement;
|
275 |
$cle_j = $annee.'-'.$mois.'-'.$ligne_evenements->bf_jour_debut_evenement;
|
279 |
$cle_j = $annee.'-'.$mois.'-'.$ligne_evenements->bf_jour_debut_evenement;
|
276 |
if (!isset($tablo_jours[$cle_j])) {
|
280 |
if (!isset($tablo_jours[$cle_j])) {
|
277 |
$tablo_jours[$cle_j]['Calendar_Day'] = new Calendar_Day($annee, $mois, $ligne_evenements->bf_jour_debut_evenement);
|
281 |
$tablo_jours[$cle_j]['Calendar_Day'] = new Calendar_Day($annee, $mois, $ligne_evenements->bf_jour_debut_evenement);
|
278 |
$tablo_jours[$cle_j]['Diary_Event'] = new DiaryEvent($tablo_jours[$cle_j]['Calendar_Day']);
|
282 |
$tablo_jours[$cle_j]['Diary_Event'] = new DiaryEvent($tablo_jours[$cle_j]['Calendar_Day']);
|
279 |
}
|
283 |
}
|
280 |
$tablo_jours[$cle_j]['Diary_Event']->setEntry($ligne_evenements);
|
284 |
$tablo_jours[$cle_j]['Diary_Event']->setEntry($ligne_evenements);
|
281 |
}
|
285 |
}
|
282 |
}
|
286 |
}
|
283 |
// Add the decorator to the selection
|
287 |
// Add the decorator to the selection
|
284 |
foreach ($tablo_jours as $jour) {
|
288 |
foreach ($tablo_jours as $jour) {
|
285 |
$selection[] = $jour['Diary_Event'];
|
289 |
$selection[] = $jour['Diary_Event'];
|
286 |
}
|
290 |
}
|
287 |
|
291 |
|
288 |
// Affichage Calendrier
|
292 |
// Affichage Calendrier
|
289 |
$month->build($selection);
|
293 |
$month->build($selection);
|
290 |
if ($type == 'calendrier') {
|
294 |
if ($type == 'calendrier') {
|
291 |
$retour.= '<table class="calendrier">'.
|
295 |
$retour.= '<table class="calendrier">'.
|
292 |
'<colgroup>'.
|
296 |
'<colgroup>'.
|
293 |
'<col class="cal_lundi"/>'.
|
297 |
'<col class="cal_lundi"/>'.
|
294 |
'<col class="cal_mardi"/>'.
|
298 |
'<col class="cal_mardi"/>'.
|
295 |
'<col class="cal_mercredi"/>'.
|
299 |
'<col class="cal_mercredi"/>'.
|
296 |
'<col class="cal_jeudi"/>'.
|
300 |
'<col class="cal_jeudi"/>'.
|
297 |
'<col class="cal_vendredi"/>'.
|
301 |
'<col class="cal_vendredi"/>'.
|
298 |
'<col class="cal_samedi"/>'.
|
302 |
'<col class="cal_samedi"/>'.
|
299 |
'<col class="cal_dimanche"/>'.
|
303 |
'<col class="cal_dimanche"/>'.
|
300 |
'</colgroup>'.
|
304 |
'</colgroup>'.
|
301 |
'<thead>'.
|
305 |
'<thead>'.
|
302 |
"<tr>
|
306 |
"<tr>
|
303 |
|
307 |
|
304 |
<th> ". BAZ_LUNDI ."</th>
|
308 |
<th> ". BAZ_LUNDI ."</th>
|
305 |
<th> ". BAZ_MARDI ."</th>
|
309 |
<th> ". BAZ_MARDI ."</th>
|
306 |
<th> ". BAZ_MERCREDI ."</th>
|
310 |
<th> ". BAZ_MERCREDI ."</th>
|
307 |
<th> ". BAZ_JEUDI ."</th>
|
311 |
<th> ". BAZ_JEUDI ."</th>
|
308 |
<th> ". BAZ_VENDREDI ."</th>
|
312 |
<th> ". BAZ_VENDREDI ."</th>
|
309 |
<th> ". BAZ_SAMEDI ."</th>
|
313 |
<th> ". BAZ_SAMEDI ."</th>
|
310 |
<th> ". BAZ_DIMANCHE ."</th>
|
314 |
<th> ". BAZ_DIMANCHE ."</th>
|
311 |
</tr>
|
315 |
</tr>
|
312 |
".'</thead>'.'<tbody>';
|
316 |
".'</thead>'.'<tbody>';
|
313 |
} else {
|
317 |
} else {
|
314 |
$retour.= '<table class="calendrier_applette">'.
|
318 |
$retour.= '<table class="calendrier_applette">'.
|
315 |
'<colgroup>'.
|
319 |
'<colgroup>'.
|
316 |
'<col class="cal_lundi"/>'.
|
320 |
'<col class="cal_lundi"/>'.
|
317 |
'<col class="cal_mardi"/>'.
|
321 |
'<col class="cal_mardi"/>'.
|
318 |
'<col class="cal_mercredi"/>'.
|
322 |
'<col class="cal_mercredi"/>'.
|
319 |
'<col class="cal_jeudi"/>'.
|
323 |
'<col class="cal_jeudi"/>'.
|
320 |
'<col class="cal_vendredi"/>'.
|
324 |
'<col class="cal_vendredi"/>'.
|
321 |
'<col class="cal_samedi"/>'.
|
325 |
'<col class="cal_samedi"/>'.
|
322 |
'<col class="cal_dimanche"/>'.
|
326 |
'<col class="cal_dimanche"/>'.
|
323 |
'</colgroup>'.
|
327 |
'</colgroup>'.
|
324 |
'<thead>'.
|
328 |
'<thead>'.
|
325 |
"<tr>
|
329 |
"<tr>
|
326 |
|
330 |
|
327 |
<th> ". BAZ_LUNDI_COURT ."</th>
|
331 |
<th> ". BAZ_LUNDI_COURT ."</th>
|
328 |
<th> ". BAZ_MARDI_COURT ."</th>
|
332 |
<th> ". BAZ_MARDI_COURT ."</th>
|
329 |
<th> ". BAZ_MERCREDI_COURT ."</th>
|
333 |
<th> ". BAZ_MERCREDI_COURT ."</th>
|
330 |
<th> ". BAZ_JEUDI_COURT ."</th>
|
334 |
<th> ". BAZ_JEUDI_COURT ."</th>
|
331 |
<th> ". BAZ_VENDREDI_COURT ."</th>
|
335 |
<th> ". BAZ_VENDREDI_COURT ."</th>
|
332 |
<th> ". BAZ_SAMEDI_COURT ."</th>
|
336 |
<th> ". BAZ_SAMEDI_COURT ."</th>
|
333 |
<th> ". BAZ_DIMANCHE_COURT ."</th>
|
337 |
<th> ". BAZ_DIMANCHE_COURT ."</th>
|
334 |
</tr>
|
338 |
</tr>
|
335 |
".'</thead>'.'<tbody>';
|
339 |
".'</thead>'.'<tbody>';
|
336 |
}
|
340 |
}
|
337 |
|
341 |
|
338 |
$todayStamp=time();
|
342 |
$todayStamp=time();
|
339 |
$today_ymd=date('Ymd',$todayStamp);
|
343 |
$today_ymd=date('Ymd',$todayStamp);
|
340 |
|
344 |
|
341 |
// Other month : mois
|
345 |
// Other month : mois
|
342 |
while ($day = $month->fetch() ) {
|
346 |
while ($day = $month->fetch() ) {
|
343 |
$dayStamp = $day->thisDay(true);
|
347 |
$dayStamp = $day->thisDay(true);
|
344 |
$day_ymd = date('Ymd',$dayStamp);
|
348 |
$day_ymd = date('Ymd',$dayStamp);
|
345 |
if ( $day->isEmpty() ) {
|
349 |
if ( $day->isEmpty() ) {
|
346 |
$class = "cal_ma other_month";
|
350 |
$class = "cal_ma other_month";
|
347 |
} else {
|
351 |
} else {
|
348 |
if (($day_ymd < $today_ymd)) {
|
352 |
if (($day_ymd < $today_ymd)) {
|
349 |
$class= "cal_mp previous_month";
|
353 |
$class= "cal_mp previous_month";
|
350 |
} else {
|
354 |
} else {
|
351 |
if ($day_ymd == $today_ymd) {
|
355 |
if ($day_ymd == $today_ymd) {
|
352 |
$class= "cal_jc current_day";
|
356 |
$class= "cal_jc current_day";
|
353 |
} else {
|
357 |
} else {
|
354 |
$class="cal_mc current_month";
|
358 |
$class="cal_mc current_month";
|
355 |
}
|
359 |
}
|
356 |
}
|
360 |
}
|
357 |
}
|
361 |
}
|
358 |
|
362 |
|
359 |
$url->addQueryString ('y', date('Y',$dayStamp));
|
363 |
$url->addQueryString ('y', date('Y',$dayStamp));
|
360 |
$url->addQueryString ('m', date('n',$dayStamp));
|
364 |
$url->addQueryString ('m', date('n',$dayStamp));
|
361 |
$url->addQueryString ('d', date('j',$dayStamp));
|
365 |
$url->addQueryString ('d', date('j',$dayStamp));
|
362 |
$link = $url->getUrl();
|
366 |
$link = $url->getUrl();
|
363 |
|
367 |
|
364 |
// isFirst() to find start of week
|
368 |
// isFirst() to find start of week
|
365 |
if ($day->isFirst()) {
|
369 |
if ($day->isFirst()) {
|
366 |
$retour.= ( "<tr>\n" );
|
370 |
$retour.= ( "<tr>\n" );
|
367 |
}
|
371 |
}
|
368 |
if ($type == 'calendrier') {
|
372 |
if ($type == 'calendrier') {
|
369 |
$retour.= "<td class=\"".$class."\">".'<span class="cal_j">'.$day->thisDay().'</span>'."\n";
|
373 |
$retour.= "<td class=\"".$class."\">".'<span class="cal_j">'.$day->thisDay().'</span>'."\n";
|
370 |
if ($day->isSelected() ) {
|
374 |
if ($day->isSelected() ) {
|
371 |
$evenements = $day->getEntry();
|
375 |
$evenements = $day->getEntry();
|
372 |
$evenements_nbre = count($evenements);
|
376 |
$evenements_nbre = count($evenements);
|
373 |
$evenemt_xhtml = '';
|
377 |
$evenemt_xhtml = '';
|
374 |
while ($ligne_evenement = array_pop($evenements)) {
|
378 |
while ($ligne_evenement = array_pop($evenements)) {
|
375 |
$id_fiches = array();
|
379 |
$id_fiches = array();
|
376 |
$id_fiches[] = $ligne_evenement->bf_id_fiche;
|
380 |
$id_fiches[] = $ligne_evenement->bf_id_fiche;
|
377 |
$url->addQueryString ('id_fiches',$id_fiches);
|
381 |
$url->addQueryString ('id_fiches',$id_fiches);
|
378 |
$link = $url->getUrl();
|
382 |
$link = $url->getUrl();
|
379 |
|
383 |
|
380 |
if (!isset($_GET['tt']) || (isset($_GET['tt']) && $_GET['tt'] == '1')) {
|
384 |
if (!isset($_GET['tt']) || (isset($_GET['tt']) && $_GET['tt'] == '1')) {
|
381 |
$titre_taille = strlen($ligne_evenement->bf_titre);
|
385 |
$titre_taille = strlen($ligne_evenement->bf_titre);
|
382 |
$titre = ($titre_taille > 20)?substr($ligne_evenement->bf_titre, 0, 20).'...':$ligne_evenement->bf_titre;
|
386 |
$titre = ($titre_taille > 20)?substr($ligne_evenement->bf_titre, 0, 20).'...':$ligne_evenement->bf_titre;
|
383 |
} else {
|
387 |
} else {
|
384 |
$titre = $ligne_evenement->bf_titre;
|
388 |
$titre = $ligne_evenement->bf_titre;
|
385 |
}
|
389 |
}
|
386 |
$evenemt_xhtml .= '<li class="tooltip" title="'.$ligne_evenement->bf_titre.'"><a class="cal_evenemt" href="'.$link.'">'.$titre.'</a></li>'."\n";
|
390 |
$evenemt_xhtml .= '<li class="tooltip" title="'.$ligne_evenement->bf_titre.'"><a class="cal_evenemt" href="'.$link.'">'.$titre.'</a></li>'."\n";
|
387 |
$url->removeQueryString ('id_fiches');
|
391 |
$url->removeQueryString ('id_fiches');
|
388 |
}
|
392 |
}
|
389 |
if ($evenements_nbre > 0) {
|
393 |
if ($evenements_nbre > 0) {
|
390 |
$retour .= '<ul class="cal_evenemt_liste">';
|
394 |
$retour .= '<ul class="cal_evenemt_liste">';
|
391 |
$retour .= $evenemt_xhtml;
|
395 |
$retour .= $evenemt_xhtml;
|
392 |
$retour .= '</ul>';
|
396 |
$retour .= '</ul>';
|
393 |
}
|
397 |
}
|
394 |
}
|
398 |
}
|
395 |
} else {
|
399 |
} else {
|
396 |
$lien_date= "<td class=\"".$class."\">".$day->thisDay();
|
400 |
$lien_date= "<td class=\"".$class."\">".$day->thisDay();
|
397 |
if ($day->isSelected() ) {
|
401 |
if ($day->isSelected() ) {
|
398 |
$evenements=$day->getEntry();
|
402 |
$evenements=$day->getEntry();
|
399 |
$id_fiches=array();
|
403 |
$id_fiches=array();
|
400 |
while ($ligne_evenement=array_pop($evenements)) {
|
404 |
while ($ligne_evenement=array_pop($evenements)) {
|
401 |
$id_fiches[]=$ligne_evenement->bf_id_fiche;
|
405 |
$id_fiches[]=$ligne_evenement->bf_id_fiche;
|
402 |
}
|
406 |
}
|
403 |
$url->addQueryString ('id_fiches',$id_fiches);
|
407 |
$url->addQueryString ('id_fiches',$id_fiches);
|
404 |
$link = $url->getUrl();
|
408 |
$link = $url->getUrl();
|
405 |
$lien_date= "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n";
|
409 |
$lien_date= "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n";
|
406 |
$url->removeQueryString ('id_fiches');
|
410 |
$url->removeQueryString ('id_fiches');
|
407 |
}
|
411 |
}
|
408 |
$retour.=$lien_date;
|
412 |
$retour.=$lien_date;
|
409 |
}
|
413 |
}
|
410 |
$retour.= ( "</td>\n" );
|
414 |
$retour.= ( "</td>\n" );
|
411 |
|
415 |
|
412 |
// isLast() to find end of week
|
416 |
// isLast() to find end of week
|
413 |
if ( $day->isLast() ) {
|
417 |
if ( $day->isLast() ) {
|
414 |
$retour.= ( "</tr>\n" );
|
418 |
$retour.= ( "</tr>\n" );
|
415 |
}
|
419 |
}
|
416 |
}
|
420 |
}
|
417 |
$retour.= "</tbody></table>";
|
421 |
$retour.= "</tbody></table>";
|
418 |
}
|
422 |
}
|
419 |
$retour.= '<script type="text/javascript">//<![CDATA['."\n".$script.'//]]></script>'."\n";
|
423 |
$retour.= '<script type="text/javascript">//<![CDATA['."\n".$script.'//]]></script>'."\n";
|
420 |
// Vue detail
|
424 |
// Vue detail
|
421 |
|
425 |
|
422 |
if ((isset($_GET['id_fiches']))) {
|
426 |
if ((isset($_GET['id_fiches']))) {
|
423 |
// Ajout d'un titre pour la page avec la date
|
427 |
// Ajout d'un titre pour la page avec la date
|
424 |
$jours = array ('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche') ;
|
428 |
$jours = array ('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche') ;
|
425 |
$mois = array ('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre',
|
429 |
$mois = array ('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre',
|
426 |
'octobre', 'novembre', 'décembre') ;
|
430 |
'octobre', 'novembre', 'décembre') ;
|
427 |
$timestamp = strtotime ($_GET['y'].'/'.$_GET['m'].'/'.$_GET['d']) ;
|
431 |
$timestamp = strtotime ($_GET['y'].'/'.$_GET['m'].'/'.$_GET['d']) ;
|
428 |
|
432 |
|
429 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';
|
433 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';
|
430 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = '';
|
434 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = '';
|
431 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = '<h1>'.$jours[date('w', $timestamp)].
|
435 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = '<h1>'.$jours[date('w', $timestamp)].
|
432 |
' '.$_GET['d'].' '.$mois[$_GET['m']-1].' '.$_GET['y'].'</h1>' ;
|
436 |
' '.$_GET['d'].' '.$mois[$_GET['m']-1].' '.$_GET['y'].'</h1>' ;
|
433 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] .= baz_voir_fiches(0,$_GET['id_fiches'] );
|
437 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] .= baz_voir_fiches(0,$_GET['id_fiches'] );
|
434 |
|
438 |
|
435 |
$GLOBALS['_GEN_commun']['info_menu'] = '';
|
439 |
$GLOBALS['_GEN_commun']['info_menu'] = '';
|
436 |
|
440 |
|
437 |
// Un lien pour retourner au calendrier
|
441 |
// Un lien pour retourner au calendrier
|
438 |
$url->removeQueryString('id_fiches');
|
442 |
$url->removeQueryString('id_fiches');
|
439 |
$url->removeQueryString('y');
|
443 |
$url->removeQueryString('y');
|
440 |
$url->removeQueryString('m');
|
444 |
$url->removeQueryString('m');
|
441 |
$url->removeQueryString('d');
|
445 |
$url->removeQueryString('d');
|
442 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '<div class="retour"><a href="'.$url->getURL().'">Retour au calendrier</a></div>';
|
446 |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '<div class="retour"><a href="'.$url->getURL().'">Retour au calendrier</a></div>';
|
443 |
}
|
447 |
}
|
444 |
|
448 |
|
445 |
// Nettoyage de l'url
|
449 |
// Nettoyage de l'url
|
446 |
$url->removeQueryString('id_fiches');
|
450 |
$url->removeQueryString('id_fiches');
|
447 |
$url->removeQueryString('y');
|
451 |
$url->removeQueryString('y');
|
448 |
$url->removeQueryString('m');
|
452 |
$url->removeQueryString('m');
|
449 |
$url->removeQueryString('d');
|
453 |
$url->removeQueryString('d');
|
450 |
|
454 |
|
451 |
|
455 |
|
452 |
return $retour;
|
456 |
return $retour;
|
453 |
}
|
457 |
}
|
454 |
?>
|
458 |
?>
|