Subversion Repositories Applications.bazar

Rev

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

Rev 187 Rev 205
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.12 2007-02-15 18:16:45 jp_milcent Exp $
22
// CVS : $Id: bazar.fonct.cal.php,v 1.13 2007-03-08 15:12:13 jp_milcent 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.12 $ $Date: 2007-02-15 18:16:45 $
32
*@version       $Revision: 1.13 $ $Date: 2007-03-08 15:12:13 $
33
// +------------------------------------------------------------------------------------------------------+
33
// +------------------------------------------------------------------------------------------------------+
34
*/
34
*/
Line 35... Line 35...
35
 
35
 
36
// +------------------------------------------------------------------------------------------------------+
36
// +------------------------------------------------------------------------------------------------------+
37
// |                                            ENTETE du PROGRAMME                                       |
37
// |                                            ENTETE du PROGRAMME                                       |
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Month/Weekdays.php';
39
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Month/Weekdays.php';
40
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Day.php';
40
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Day.php';
Line 41... Line -...
41
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Decorator.php'; 
-
 
42
 
41
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Decorator.php'; 
43
 
42
 
44
// +------------------------------------------------------------------------------------------------------+
43
// +------------------------------------------------------------------------------------------------------+
Line 45... Line -...
45
// |                                           LISTE de FONCTIONS                                         |
-
 
46
// +------------------------------------------------------------------------------------------------------+
44
// |                                           LISTE de FONCTIONS                                         |
47
 
-
 
48
 
45
// +------------------------------------------------------------------------------------------------------+
49
// Classe Utilitaire pour Calendrier
46
 
50
 
47
// Classe Utilitaire pour Calendrier
-
 
48
class DiaryEvent extends Calendar_Decorator {
51
class DiaryEvent extends Calendar_Decorator {
49
	var $entry = array();
52
	var $entry=array();
50
	function DiaryEvent($calendar)
53
	function DiaryEvent($calendar) {
51
	{
-
 
52
		Calendar_Decorator::Calendar_Decorator($calendar);
54
		Calendar_Decorator::Calendar_Decorator($calendar);
53
	}
Line 55... Line 54...
55
	}
54
	function setEntry($entry)
56
	function setEntry($entry) {
55
	{
-
 
56
		$this->entry[] = $entry;
57
		$this->entry[]=$entry;
57
		
58
		
58
	}
59
	}
59
	function getEntry()
Line 60... Line 60...
60
	function getEntry() {
60
	{
61
		return $this->entry;
61
		return $this->entry;
62
	}
-
 
63
} 
62
	}
Line 64... Line 63...
64
 
63
} 
Line 65... Line 64...
65
 
64
 
66
// $type : calendrier
65
 
67
// $type : calendrier_appplette
66
// $type : calendrier
Line 68... Line 67...
68
 
67
// $type : calendrier_appplette
69
function GestionAffichageCalendrier($type='calendrier') {
68
function GestionAffichageCalendrier($type = 'calendrier') {
70
	
69
	
71
	$retour='';
70
	$retour='';
Line 94... Line 93...
94
	}
93
	}
Line 95... Line 94...
95
	
94
	
96
	// 	Construction Mois en Cours 
95
	// 	Construction Mois en Cours 
Line 97... Line 96...
97
	$month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
96
	$month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
98
 
97
 
99
	$curStamp=$month->getTimeStamp();
98
	$curStamp = $month->getTimeStamp();
100
	$url->addQueryString ('y', date('Y',$curStamp));
99
	$url->addQueryString('y', date('Y',$curStamp));
101
	$url->addQueryString ('m', date('n',$curStamp));
100
	$url->addQueryString('m', date('n',$curStamp));
Line 102... Line 101...
102
	$url->addQueryString ('d', date('j',$curStamp));
101
	$url->addQueryString('d', date('j',$curStamp));
103
	$cur = $url->getUrl();
102
	$cur = $url->getUrl();
104
	
103
	
105
	// Navigation 
104
	// Navigation 
106
	$prevStamp = $month->prevMonth(true);
105
	$prevStamp = $month->prevMonth(true);
107
	$url->addQueryString ('y', date('Y',$prevStamp));
106
	$url->addQueryString('y', date('Y',$prevStamp));
-
 
107
	$url->addQueryString('m', date('n',$prevStamp));
108
	$url->addQueryString ('m', date('n',$prevStamp));
108
	$url->addQueryString('d', date('j',$prevStamp));
109
	$url->addQueryString ('d', date('j',$prevStamp));
109
	$prev = $url->getUrl();
110
	$prev = $url->getUrl();
110
	
111
	$nextStamp = $month->nextMonth(true);
111
	$nextStamp = $month->nextMonth(true);
112
	$url->addQueryString ('y', date('Y',$nextStamp));
112
	$url->addQueryString('y', date('Y',$nextStamp));
113
	$url->addQueryString ('m', date('n',$nextStamp));
113
	$url->addQueryString('m', date('n',$nextStamp));
-
 
114
	$url->addQueryString('d', date('j',$nextStamp));
114
	$url->addQueryString ('d', date('j',$nextStamp));
115
	$next = $url->getUrl();
Line 115... Line 116...
115
	$next = $url->getUrl();
116
	
116
 
117
	$fr_month = array(	"1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,
Line 117... Line 118...
117
	$fr_month=array("1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN,"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
118
						"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE);
Line 358... Line 359...
358
								' '.$_GET['d'].' '.$mois[$_GET['m']-1].' '.$_GET['y'].'</h1>' ;
359
								' '.$_GET['d'].' '.$mois[$_GET['m']-1].' '.$_GET['y'].'</h1>' ;
359
				$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] .= baz_voir_fiches(0,$_GET['id_fiches'] );
360
				$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] .= baz_voir_fiches(0,$_GET['id_fiches'] );
360
				$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '';
361
				$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '';
361
				$GLOBALS['_GEN_commun']['info_menu'] = '';
362
				$GLOBALS['_GEN_commun']['info_menu'] = '';
362
		}
363
		}
-
 
364
 
-
 
365
		// Nettoyage de l'url
-
 
366
		$url->removeQueryString('id_fiches');
-
 
367
		$url->removeQueryString('y');
-
 
368
		$url->removeQueryString('m');
-
 
369
		$url->removeQueryString('d');
Line 363... Line 370...
363
			
370
			
364
		return $retour;
-
 
365
		
371
		return $retour;
366
	}
-
 
367
 
372
	}
368
?>
373
?>