Subversion Repositories Applications.bazar

Rev

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

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