3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 include_spip('inc/presentation');
17 // http://doc.spip.org/@exec_calendrier_dist
18 function exec_calendrier_dist()
20 exec_calendrier_args(agenda_controle(), _request('type'), _request('echelle'), _request('partie_cal'));
23 function exec_calendrier_args($time, $type, $echelle, $partie_cal)
25 if ($time < 0) $time = time();
29 elseif ($type == 'semaine')
30 $GLOBALS['afficher_bandeau_calendrier_semaine'] = true;
32 $ancre = 'calendrier-1';
33 $r = generer_url_ecrire('calendrier', "type=$type") . "#$ancre";
34 $r = http_calendrier_init($time, $type, $echelle, $partie_cal, $r);
39 $date = date("Y-m-d", $time);
40 if ($type == 'jour') {
41 $titre = nom_jour($date)." ". affdate_jourcourt($date);
43 $titre = _T('titre_page_calendrier',
44 array('nom_mois' => nom_mois($date),
45 'annee' => annee($date)));
48 $commencer_page = charger_fonction('commencer_page', 'inc');
49 echo $commencer_page($titre, "accueil", "calendrier");
50 // ne produit rien par defaut, mais est utilisee par le plugin agenda
51 echo barre_onglets("calendrier", "calendrier");
52 echo debut_grand_cadre(true);
53 echo "\n<div> </div>\n<div id='", $ancre, "'>",$r,'</div>';
54 echo fin_grand_cadre(true);