/** * @brief zoom the calendar */ function zoom_calendar($notitle) { global $g_user; $exercice_user = $g_user->get_exercice(); /* day */ $cell = array(); for ($i = 0; $i < 42; $i++) { $cell[$i] = ""; } $this->set_month_year(); /* weekday */ $week = array(_('Dimanche'), _('Lundi'), _('Mardi'), _('Mercredi'), _('Jeudi'), _('Vendredi'), _('Samedi')); $this->fill_from_action($cell, "long"); $this->fill_from_todo($cell, "long"); $wMonth = new ISelect('per_div'); $cn = new Database(dossier::id()); $wMonth->value = $cn->make_array("select p_id,to_char(p_start,'MM/YYYY') from parm_periode where p_exercice = '{$exercice_user}' order by p_start"); $wMonth->selected = $this->default_periode; $wMonth->javascript = sprintf("onchange=calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s',notitle:%d})", dossier::id(), 'per_div', 'calendar_zoom_div', 'cal', $notitle); $wMonth->set_attribute('gDossier', dossier::id()); $month_year = $wMonth->input() . $wMonth->get_js_attr(); ob_start(); $zoom = 1; $notitle = HtmlInput::default_value_get('notitle', 0); require_once NOALYSS_INCLUDE . '/template/calendar.php'; if (count($this->action_div) > 0) { foreach ($this->action_div as $day) { echo $day; } } $ret = ob_get_contents(); ob_end_clean(); return $ret; }