Subversion Repositories Applications.bazar

Rev

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

Rev 33 Rev 39
Line 17... Line 17...
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.2 2005-10-14 12:59:24 ddelon Exp $
22
// CVS : $Id: bazar.fonct.cal.php,v 1.3 2005-10-21 16:15:04 florian 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.2 $ $Date: 2005-10-14 12:59:24 $
32
*@version       $Revision: 1.3 $ $Date: 2005-10-21 16:15:04 $
33
// +------------------------------------------------------------------------------------------------------+
33
// +------------------------------------------------------------------------------------------------------+
34
*/
34
*/
Line 35... Line 35...
35
 
35
 
36
// +------------------------------------------------------------------------------------------------------+
36
// +------------------------------------------------------------------------------------------------------+
Line 62... Line 62...
62
		return $this->entry;
62
		return $this->entry;
63
	}
63
	}
64
} 
64
} 
Line 65... Line -...
65
 
-
 
66
 
-
 
67
// $type : calendrier
-
 
68
// $type : calendrier_appplette
65
 
Line 69... Line 66...
69
 
66
 
Line 70... Line 67...
70
function GestionAffichageCalendrier($type='calendrier') {
67
function GestionAffichageCalendrier($prefixe_cal) {
Line 123... Line 120...
123
 
120
 
Line 124... Line 121...
124
	$retour.= "</div>";
121
	$retour.= "</div>";
Line 125... Line 122...
125
 
122
 
126
	$retour.="<br></br>";
-
 
127
 
123
	$retour.="<br></br>";
Line 128... Line 124...
128
	// Vue Mois calendrier ou vue applette
124
 
Line 129... Line 125...
129
		
125
		// Vue Mois 
Line 168... Line 164...
168
		// Affichage Calendrier
164
		// Affichage Calendrier
Line 169... Line 165...
169
		
165
		
Line 170... Line -...
170
		
-
 
171
		$month->build($selection);
166
		
172
	
167
		$month->build($selection);
173
		if ($type=='calendrier') {
168
	
174
			$retour.= "<table class=\"calendar\">
169
		$retour.= "<table class=\"calendar\">
175
			 <tr>
170
		 <tr>
176
			
171
		
177
			  <th> ". BAZ_LUNDI ."</th>
172
		  <th> ". BAZ_LUNDI ."</th>
178
			  <th> ". BAZ_MARDI ."</th>
173
		  <th> ". BAZ_MARDI ."</th>
179
			  <th> ". BAZ_MERCREDI ."</th>
174
		  <th> ". BAZ_MERCREDI ."</th>
180
			  <th> ". BAZ_JEUDI ."</th>
175
		  <th> ". BAZ_JEUDI ."</th>
181
			  <th> ". BAZ_VENDREDI ."</th>
-
 
182
			  <th> ". BAZ_SAMEDI ."</th>
-
 
183
			  <th> ". BAZ_DIMANCHE ."</th>
-
 
184
			 </tr>
-
 
185
			 ";
-
 
186
		}
-
 
187
		else {
-
 
188
			$retour.= "<table class=\"calendar\">
-
 
189
			 <tr>
-
 
190
			
-
 
191
			  <th> ". BAZ_LUNDI_COURT ."</th>
-
 
192
			  <th> ". BAZ_MARDI_COURT ."</th>
-
 
193
			  <th> ". BAZ_MERCREDI_COURT ."</th>
-
 
194
			  <th> ". BAZ_JEUDI_COURT ."</th>
-
 
195
			  <th> ". BAZ_VENDREDI_COURT ."</th>
176
		  <th> ". BAZ_VENDREDI ."</th>
196
			  <th> ". BAZ_SAMEDI_COURT ."</th>
177
		  <th> ". BAZ_SAMEDI ."</th>
197
			  <th> ". BAZ_DIMANCHE_COURT ."</th>
-
 
Line 198... Line -...
198
			 </tr>
-
 
199
			 ";
178
		  <th> ". BAZ_DIMANCHE ."</th>
Line 200... Line 179...
200
		}
179
		 </tr>
Line 201... Line 180...
201
		
180
		 ";
Line 237... Line 216...
237
			
216
			
238
				// isFirst() to find start of week
217
				// isFirst() to find start of week
239
				if ($day->isFirst())
218
				if ($day->isFirst())
Line 240... Line 219...
240
					$retour.= ( "<tr>\n" );
219
					$retour.= ( "<tr>\n" );
Line 241... Line -...
241
				
-
 
242
				//$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" );
-
 
243
				
220
				
244
				if ($type=='calendrier') {
-
 
245
					$retour.= "<td class=\"".$class."\">".$day->thisDay()."\n";
-
 
246
					if ($day->isSelected() ) {
-
 
247
						$evenements=$day->getEntry();
-
 
248
						while ($ligne_evenement=array_pop($evenements)) {
-
 
249
							$id_fiches=array();
-
 
250
							$id_fiches[]=$ligne_evenement->bf_id_fiche;
-
 
251
							$url->addQueryString ('id_fiches',$id_fiches);
-
 
252
							$link = $url->getUrl();
-
 
253
							$retour.= "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n";
-
 
254
							$url->removeQueryString ('id_fiches');
-
 
255
						}
-
 
256
					}
-
 
257
				}
-
 
258
				else {
221
				$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" );
259
					$lien_date= "<td class=\"".$class."\">".$day->thisDay()."\n";
-
 
260
					if ($day->isSelected() ) {
222
				
261
						$evenements=$day->getEntry();
-
 
262
						$id_fiches=array();
-
 
263
						while ($ligne_evenement=array_pop($evenements)) {
223
				if ($day->isSelected() ) {
264
							$id_fiches[]=$ligne_evenement->bf_id_fiche;
224
					$evenements=$day->getEntry();
265
						}
225
					while ($ligne_evenement=array_pop($evenements)) {
266
						$url->addQueryString ('id_fiches',$id_fiches);
-
 
267
						$link = $url->getUrl();
226
						$url->addQueryString ('id_fiche',$ligne_evenement->bf_id_fiche);
268
						$lien_date= "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n";
-
 
-
 
227
						$link = $url->getUrl();
269
						$url->removeQueryString ('id_fiches');
228
						$retour.= ( "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n" );
Line 270... Line 229...
270
					}
229
					}
Line 271... Line 230...
271
					$retour.=$lien_date;
230
					
Line 278... Line 237...
278
					$retour.= ( "</tr>\n" );
237
					$retour.= ( "</tr>\n" );
279
			}
238
			}
Line 280... Line 239...
280
		
239
		
Line 281... Line -...
281
			$retour.= "</table>";
-
 
282
			
-
 
283
			
-
 
284
		}
240
			$retour.= "</table>";
Line 285... Line -...
285
		
-
 
286
		// Vue detail
-
 
287
		
241
			
288
		if ((isset($_GET['id_fiches']))) {
242
			return $retour;
289
				$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = baz_voir_fiches(0,$_GET['id_fiches'] );
243
		
-
 
244
		}
-
 
245
		else {
-
 
246
			// Vue jour
-
 
247
			if (isset($_GET['id_fiche'])) {
Line -... Line 248...
-
 
248
				return 	$retour.baz_voir_fiche(0, $_GET['id_fiche']);
290
		}
249
			}
Line 291... Line 250...
291
			
250
		}
292
		return $retour;
251