function exec_calendrier_dist() { exec_calendrier_args(agenda_controle(), _request('type'), _request('echelle'), _request('partie_cal')); }
function agenda_periode($type, $nb, $avec, $sans='') { include_spip('inc/agenda'); $start = agenda_controle(); if ($start<0) $start = time(); $mindate = date("Ymd", $start); if ($type != 'periode') $evt = array($sans, $avec); else { $min = substr($mindate,6,2); $max = !(is_array($avec) AND $avec) ? time() : strtotime(max(array_keys($avec))); $max = $min + (($max - $start) / (3600 * 24)); if ($max < 31) $max = 0; $evt = array($sans, $avec, $min, $max); $type = 'mois'; } $ancre = _request('ancre'); $s = self('&') . (preg_match('/^[\w-]+$/', $ancre) ? "#$ancre" : ''); return http_calendrier_init($start, $type, _request('echelle'), _request('partie_cal'), $s, $evt); }