Subversion Repositories Applications.bazar

Rev

Rev 468 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 468 Rev 479
Line 110... Line 110...
110
	if (count($tab_params) == 0) {
110
	if (count($tab_params) == 0) {
111
		$tab_params = explode('&', $chaine_url);
111
		$tab_params = explode('&', $chaine_url);
112
	}
112
	}
113
	foreach ($tab_params as $param) {
113
	foreach ($tab_params as $param) {
114
		$tab_parametre = explode('=', $param);
114
		$tab_parametre = explode('=', $param);
115
		// note d'Aurélien, si on nettoie l'URL on perd la vue en cours  
115
		// note d'Aur�lien, si on nettoie l'URL on perd la vue en cours  
116
		//$url->removeQueryString($tab_parametre[0]);
116
		//$url->removeQueryString($tab_parametre[0]);
117
	}
117
	}
Line 118... Line 118...
118
	
118
	
119
	if (!isset($_GET['y'])) { 
119
	if (!isset($_GET['y'])) { 
Line 131... Line 131...
131
	$url->addQueryString('y', date('Y',$curStamp));
131
	$url->addQueryString('y', date('Y',$curStamp));
132
	$url->addQueryString('m', date('n',$curStamp));
132
	$url->addQueryString('m', date('n',$curStamp));
133
	$url->addQueryString('d', date('j',$curStamp));
133
	$url->addQueryString('d', date('j',$curStamp));
134
	$cur = $url->getUrl();
134
	$cur = $url->getUrl();
Line 135... Line 135...
135
 
135
 
136
	// Gestion de l'affichage du filtre des natures d'évènements
136
	// Gestion de l'affichage du filtre des natures d'�v�nements
137
	$cal_num_annonce = BAZ_NUM_ANNONCE_CALENDRIER;
137
	$cal_num_annonce = BAZ_NUM_ANNONCE_CALENDRIER;
138
	$ficnat_id = null;
138
	$ficnat_id = null;
139
	if (isset($_GET['ficnat']) && $_GET['ficnat'] != '*') {
139
	if (isset($_GET['ficnat']) && $_GET['ficnat'] != '*') {
140
		$ficnat_id = $_GET['ficnat'];
140
		$ficnat_id = $_GET['ficnat'];
141
		$url->addQueryString('ficnat', $_GET['ficnat']);
141
		$url->addQueryString('ficnat', $_GET['ficnat']);
142
		$cal_num_annonce = $_GET['ficnat'];
142
		$cal_num_annonce = $_GET['ficnat'];
Line 143... Line 143...
143
	}
143
	}
144
 
144
 
145
	// Gestion de l'affichage des titres des évènements
145
	// Gestion de l'affichage des titres des �v�nements
146
	if (isset($_GET['ctt']) && $_GET['ctt'] == '1') {
146
	if (isset($_GET['ctt']) && $_GET['ctt'] == '1') {
147
		$url->addQueryString('tt', '0');
147
		$url->addQueryString('tt', '0');
148
		if (isset($_GET['tt']) && $_GET['tt'] == '0') {
148
		if (isset($_GET['tt']) && $_GET['tt'] == '0') {
Line 157... Line 157...
157
		$url->addQueryString('ctt', '1');
157
		$url->addQueryString('ctt', '1');
158
		$tc_lien = $url->getUrl();
158
		$tc_lien = $url->getUrl();
159
	}
159
	}
160
	$url->removeQueryString('ctt');
160
	$url->removeQueryString('ctt');
161
	$url->removeQueryString('tt');
161
	$url->removeQueryString('tt');
162
	$tc_txt = 'Afficher les titres complets des évènements';
162
	$tc_txt = 'Afficher les titres complets des �v�nements';
163
	if (isset($_GET['tt']) && $_GET['tt'] == '0') {
163
	if (isset($_GET['tt']) && $_GET['tt'] == '0') {
164
		$tc_txt = 'Tronquer les titres des évènements';
164
		$tc_txt = 'Tronquer les titres des �v�nements';
165
		$url->addQueryString('tt', $_GET['tt']);
165
		$url->addQueryString('tt', $_GET['tt']);
166
	}
166
	}
Line 167... Line 167...
167
 
167
 
168
	//	Gestion des champs cachés pour le formulaire de filtre
168
	//	Gestion des champs cach�s pour le formulaire de filtre
169
	// Attention  à la position dans le fichier...
169
	// Attention  � la position dans le fichier...
170
	$ficnat_chps_cache = $url->querystring;
170
	$ficnat_chps_cache = $url->querystring;
Line 171... Line 171...
171
	unset($ficnat_chps_cache['ficnat']); 
171
	unset($ficnat_chps_cache['ficnat']); 
172
	
172
	
Line 181... Line 181...
181
	$url->addQueryString('y', date('Y',$nextStamp));
181
	$url->addQueryString('y', date('Y',$nextStamp));
182
	$url->addQueryString('m', date('n',$nextStamp));
182
	$url->addQueryString('m', date('n',$nextStamp));
183
	$url->addQueryString('d', date('j',$nextStamp));
183
	$url->addQueryString('d', date('j',$nextStamp));
184
	$next = $url->getUrl();
184
	$next = $url->getUrl();
Line 185... Line 185...
185
	
185
	
186
	// Suppression du paramêtre de troncage des titres
186
	// Suppression du param�tre de troncage des titres
Line 187... Line 187...
187
	$url->removeQueryString('tt');
187
	$url->removeQueryString('tt');
188
	
188
	
Line 189... Line 189...
189
	$fr_month = array(	"1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,
189
	$fr_month = array(	"1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,
190
						"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
190
						"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
191
 
191
 
192
	// Récupération des infos sur les natures des fiches pour le filtre
192
	// R�cup�ration des infos sur les natures des fiches pour le filtre
193
	$requete_nature_fiche = 'SELECT DISTINCT bn_id_nature, bn_ce_i18n, bn_label_nature '.
193
	$requete_nature_fiche = 'SELECT DISTINCT bn_id_nature, bn_ce_i18n, bn_label_nature '.
194
							'FROM bazar_nature '.
194
							'FROM bazar_nature '.
Line 195... Line 195...
195
							'WHERE bn_id_nature IN ('.BAZ_NUM_ANNONCE_CALENDRIER.') ';
195
							'WHERE bn_id_nature IN ('.BAZ_NUM_ANNONCE_CALENDRIER.') ';
196
	$resultat_nature_fiche = $db->query($requete_nature_fiche);
196
	$resultat_nature_fiche = $db->query($requete_nature_fiche);
197
	(DB::isError($resultat_nature_fiche)) ? trigger_error(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_nature_fiche->getMessage(), $requete_nature_fiche), E_USER_WARNING) : '';
197
	(DB::isError($resultat_nature_fiche)) ? trigger_error(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_nature_fiche->getMessage(), $requete_nature_fiche), E_USER_WARNING) : '';
198
	
198
	
199
	// Ajout du javascript et des styles du bazar
199
	// Ajout du javascript et des styles du bazar
Line 200... Line 200...
200
	if (defined('PAP_VERSION')) { //si on est dans Papyrus
200
	if (defined('PAP_VERSION')) { //si on est dans Papyrus
201
		GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css');
201
		GEN_stockerStyleExterne( 'bazar_interne', 'reseau/bazar/bazar.interne.css');
Line 218... Line 218...
218
	
218
	
219
	// Titre
219
	// Titre
220
	if ($type == 'calendrier') {
220
	if ($type == 'calendrier') {
221
		$retour .= '<div id="cal_entete">'."\n";
221
		$retour .= '<div id="cal_entete">'."\n";
222
		$retour .= '<span class="cal_navigation">'."\n";	
222
		$retour .= '<span class="cal_navigation">'."\n";	
223
		$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="&lt;&lt;"/></a>'."\n"; 
223
		$retour .= '<a id="cal_precedent_lien" href="'.$prev.'" title="Allez au mois pr�c�dent"><img id="cal_precedent_img" src="reseau/bazar/images/cal_precedent.png" alt="&lt;&lt;"/></a>'."\n"; 
224
		$retour .= '&nbsp;&nbsp;'."\n";
224
		$retour .= '&nbsp;&nbsp;'."\n";
225
		$retour .= '<span id="cal_encadre_mois_courrant"><a id="cal_mois_courrant" href="'.$cur.'">';
225
		$retour .= '<span id="cal_encadre_mois_courrant"><a id="cal_mois_courrant" href="'.$cur.'">';
226
		$retour .= $fr_month[(date('n',$curStamp))]; 
226
		$retour .= $fr_month[(date('n',$curStamp))]; 
227
		$retour .= '&nbsp;';
227
		$retour .= '&nbsp;';
228
		$retour .= (date('Y',$curStamp));
228
		$retour .= (date('Y',$curStamp));
229
		$retour .= '</a></span>'."\n";
229
		$retour .= '</a></span>'."\n";
230
		$retour .= '&nbsp;&nbsp;'."\n";
230
		$retour .= '&nbsp;&nbsp;'."\n";
231
		$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="&gt;&gt;"/></a>'."\n";
231
		$retour .= '<a id="cal_suivant_lien" href="'.$next.'" title="Allez au mois suivant"><img id="cal_suivant_img" src="reseau/bazar/images/cal_suivant.png" alt="&gt;&gt;"/></a>'."\n";
232
		$retour .= '</span>'."\n";
232
		$retour .= '</span>'."\n";
233
		$retour .= '<h1 id="cal_titre"><img id="cal_titre_img" src="client/bazar/images/cal_titre.png" alt="Calendrier"/></h1>'."\n";
233
		$retour .= '<h1 id="cal_titre"><img id="cal_titre_img" src="reseau/bazar/images/cal_titre.png" alt="Calendrier"/></h1>'."\n";
Line 234... Line 234...
234
		$retour .= '</div>'."\n";
234
		$retour .= '</div>'."\n";
235
		
235
		
236
		$retour .= '<form action="'.$tc_lien.'" method="get">'."\n";
236
		$retour .= '<form action="'.$tc_lien.'" method="get">'."\n";
Line 276... Line 276...
276
	}
276
	}
277
	// Vue Mois calendrier ou vue applette
277
	// Vue Mois calendrier ou vue applette
Line 278... Line 278...
278
		
278
		
279
	if ((!isset($_GET['id_fiche']) && $type == 'calendrier') || ($type == 'calendrier_applette')){
279
	if ((!isset($_GET['id_fiche']) && $type == 'calendrier') || ($type == 'calendrier_applette')){
280
//		trigger_error('ICI', E_USER_NOTICE);
280
//		trigger_error('ICI', E_USER_NOTICE);
281
		// Recherche evenement de la periode selectionnée 
281
		// Recherche evenement de la periode selectionn�e 
282
		$ts_jour_fin_mois = $month->nextMonth('timestamp');
282
		$ts_jour_fin_mois = $month->nextMonth('timestamp');
283
		$ts_jour_debut_mois = $month->thisMonth('timestamp');; 
283
		$ts_jour_debut_mois = $month->thisMonth('timestamp');; 
284
	    $requete_evenements = 	"SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, ".
284
	    $requete_evenements = 	"SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, ".
285
	    						"	DAY(bf_date_debut_evenement) AS bf_jour_debut_evenement, bf_date_debut_evenement, ".
285
	    						"	DAY(bf_date_debut_evenement) AS bf_jour_debut_evenement, bf_date_debut_evenement, ".
Line 477... Line 477...
477
	// Vue detail
477
	// Vue detail
Line 478... Line 478...
478
	
478
	
479
	if ((isset($_GET['id_fiches']))) {
479
	if ((isset($_GET['id_fiches']))) {
480
		// Ajout d'un titre pour la page avec la date
480
		// Ajout d'un titre pour la page avec la date
481
		$jours = array ('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi') ;
481
		$jours = array ('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi') ;
482
		$mois = array ('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre',
482
		$mois = array ('janvier', 'f�vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', 'ao�t', 'septembre',
483
						'octobre', 'novembre', 'décembre') ;
483
						'octobre', 'novembre', 'd�cembre') ;
Line 484... Line 484...
484
		$timestamp = strtotime ($_GET['y'].'/'.$_GET['m'].'/'.$_GET['d']) ;
484
		$timestamp = strtotime ($_GET['y'].'/'.$_GET['m'].'/'.$_GET['d']) ;
485
		
485
		
486
		$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';
486
		$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = '';