Esempio n. 1
0
echo _Ti('app_input_title') . $row['title'] . "<br />\n";
echo _Ti('app_input_type') . _Tkw('appointments', $row['type']) . "<br />\n";
if ($row['hidden'] == 'Y') {
    echo '<p class="normal_text"><strong>' . _T('app_info_is_deleted') . "</strong>";
    if ($ac['a']) {
        echo " " . _T('app_info_is_deleted2');
    }
    echo "</p>\n";
}
show_page_subtitle(_T('generic_subtitle_general'), 'tools_agenda');
echo _Ti('app_input_description') . nl2br($row['description']) . "<br />\n";
echo "<br />\n";
echo _Ti('time_input_date_start') . format_date($row['start_time'], 'short');
$year_for_cal = "&annee=" . annee($row['start_time']) . "&mois=" . mois($row['start_time']) . "&jour=" . journum($row['start_time']);
// day
echo ' ' . http_href_img("calendar.php?type=jour" . $year_for_cal, 'cal-today.gif', '', _T('app_info_see_cal_for_day_tooltip'));
echo "<br />\n";
/* [ML] removing: not really useful for now 
	$end_time = vider_date($row['end_time']);
	$reminder = vider_date($row['reminder']);
	if ($prefs['time_intervals'] == 'absolute') {
		echo _Ti('time_input_date_end') . format_date($row['end_time'], 'short') . "<br />\n";
		echo _Ti('app_input_reminder') . format_date($row['reminder'], 'short') . "<br />\n";
	} else {
		$duration = ($end_time ? strtotime($row['end_time']) - strtotime($row['start_time']) : 0);
		echo _Ti('app_input_time_length') . format_time_interval($duration,($prefs['time_intervals_notation'] == 'hours_only')) . "<br />\n";
		$reminder_offset = ($reminder ? strtotime($row['start_time']) - strtotime($row['reminder']) : 0);
		echo _Ti('app_input_reminder')
			. format_time_interval($reminder_offset,($prefs['time_intervals_notation'] == 'hours_only'))
			. " " . _T('time_info_before_start') . "<br />\n";
	}
Esempio n. 2
0
function http_calendrier_navigation($jour, $mois, $annee, $partie_cal, $echelle, $nom, $script, $args_pred, $args_suiv, $type, $ancre)
{
    if (!$echelle) {
        $echelle = DEFAULT_D_SCALE;
    }
    $script = http_calendrier_retire_args($script);
    if (!preg_match('/[?&]$/', $script)) {
        $script .= strpos($script, '?') ? '&' : '?';
    }
    $args = "jour={$jour}&mois={$mois}&annee={$annee}{$ancre}";
    $retour = "<div class='cal_navigation'>";
    if ($type != "mois") {
        if ($partie_cal == "tout") {
            $img_att = " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'";
        } else {
            $img_att = "";
        }
        // Button: 'all day'
        $retour .= "<span{$img_att}>" . http_href_img($script . "type={$type}&set_partie_cal=tout&{$args}", "heures-tout.png", "width='13' height='13' style='behavior: url(win_png.htc)'", _T('calendar_button_fullday')) . "</span>";
        // Button: 'morning only'
        if ($partie_cal == "matin") {
            $img_att = " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'";
        } else {
            $img_att = "";
        }
        $retour .= "<span{$img_att}>" . http_href_img($script . "type={$type}&set_partie_cal=matin&{$args}", "heures-am.png", "width='13' height='13' style='behavior: url(win_png.htc)'", _T('calendar_button_morning')) . "</span>";
        // Button: 'after-noon only'
        if ($partie_cal == "soir") {
            $img_att = " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'";
        } else {
            $img_att = "";
        }
        $retour .= "<span{$img_att}>" . http_href_img($script . "type={$type}&set_partie_cal=soir&{$args}", "heures-pm.png", "width='13' height='13' style='behavior: url(win_png.htc)'", _T('calendar_button_afternoon')) . "</span>";
        $retour .= "&nbsp;";
        // Button: Zoom out
        $retour .= http_href_img($script . "type={$type}&set_echelle=" . floor($echelle * 1.5) . "&{$args}", "loupe-moins.gif", '', _T('button_zoom') . '-');
        // Button: Zoom in
        $retour .= http_href_img($script . "type={$type}&set_echelle=" . floor($echelle / 1.5) . "&{$args}", "loupe-plus.gif", '', _T('button_zoom') . '+');
        $retour .= "&nbsp;";
    }
    // Button: specific day view
    $img_att = $type == 'jour' ? " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'" : '';
    $retour .= http_href_img($script . "type=jour&echelle={$echelle}&{$args}", "cal-jour.gif", $img_att, _T('calendar_button_daily')) . "&nbsp;";
    // Button: specific week view
    $img_att = $type == 'semaine' ? " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'" : "";
    $retour .= http_href_img($script . "type=semaine&echelle={$echelle}&{$args}", "cal-semaine.gif", $img_att, _T('calendar_button_weekly')) . "&nbsp;";
    // Button: specific month view
    $img_att = $type == 'mois' ? " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'" : "";
    $retour .= http_href_img($script . "type=mois&echelle={$echelle}&{$args}", "cal-mois.gif", $img_att, _T('calendar_button_monthly'));
    $retour .= "&nbsp;&nbsp;";
    $today = getdate(time());
    $jour_today = $today["mday"];
    $mois_today = $today["mon"];
    $annee_today = $today["year"];
    $arguments = "jour={$jour_today}&mois={$mois_today}&annee={$annee_today}{$ancre}";
    if ($type == 'mois') {
        $condition = $annee == $annee_today && $mois == $mois_today;
    } else {
        $condition = $annee == $annee_today && $mois == $mois_today && $jour == $jour_today;
    }
    // Button: 'today' view + mouseover of 3-month cal + previous/future months in year
    $id = 'nav-agenda' . preg_replace('/[^A-Za-z0-9]/', '', $ancre);
    $retour .= "<span onmouseover=\"lcm_show('{$id}');\">";
    $retour .= http_href_img($script . "type={$type}&echelle={$echelle}&{$arguments}", "cal-today.gif", $condition ? " style='-moz-opacity: 0.3; filter: alpha(opacity=30)'" : "", _T("calendar_button_now"));
    // Button: Previous month
    if ($args_pred) {
        $retour .= http_href($script . "type={$type}&echelle={$echelle}&{$args_pred}{$ancre}", http_img_pack("fleche-left.png", '&lt;&lt;&lt;', "style='behavior: url(win_png.htc)'  width='12' height='12'"), _T('listnav_link_previous'));
    }
    // Button: Next month
    if ($args_suiv) {
        $retour .= http_href($script . "type={$type}&echelle={$echelle}&{$args_suiv}{$ancre}", http_img_pack("fleche-right.png", '&gt;&gt;&gt;', "style='behavior: url(win_png.htc)' width='12' height='12'"), _T('listnav_link_next'));
    }
    $retour .= "</span>&nbsp;";
    $retour .= "&nbsp;&nbsp;";
    // Current month name
    $retour .= "<span style='font-weight: bold'>{$nom}</span>";
    // Hidden agenda shown on mouseover of 'current day' button
    return $retour . "</div>" . http_agenda_invisible($id, $annee, $jour, $mois, $script, $ancre);
}