Exemplo n.º 1
0
<?php

$page->title_bar();
$termin = new tb_termin();
if ($termin->load_tb_termin($id)) {
    if ($termin->return_field('flag_kueche')) {
        $temp = 'ja';
    } else {
        $temp = 'nein';
    }
    $message = '
				<table width=100% align=center border=0>
					<tr>
						<td width=30% class=list_table_active>
							Terminart:
						</td>
						<td>
							<b>' . $DATE_TYPES[$termin->return_field('terminart')][name] . '</b>
						</td>
					</tr>
					<tr>
						<td width=30% class=list_table_active>
							Datum:
						</td>
						<td>
							<b>' . $termin->return_field('date_begin_readable') . '</b> - <b>' . $termin->return_field('date_end_readable') . '</b>
						</td>
					</tr>
					<tr>
						<td width=30% class=list_table_active>
							Kommentar:
Exemplo n.º 2
0
    // TODO :
    // evtl. plausi-checks einbauen!
    // Zuerst Uhrzeit vom Datum trennen :
    $date_array = explode(" ", $date);
    // Uhrzeit splitten :
    $time = explode(":", $date_array[1]);
    // Datum splitten :
    $date = explode('.', $date_array[0]);
    // Beides zusammensetzen :
    $timestamp = mktime($time[0], $time[1], 0, $date[1], $date[0], $date[2]);
    return $timestamp;
}
$page->title_bar();
// Zuerstmal alles aus der DB holen
$termin = new tb_termin();
$termin->load_tb_termin($id);
// TODO: Presets evtl nur einmal laden!!! (Counter??)
if (!$submit) {
    $presets = array();
    $presets[date_begin] = $termin->return_field('date_begin_readable');
    $presets[date_end] = $termin->return_field('date_end_readable');
    $presets[terminart] = $termin->return_field('terminart');
    $presets[kommentar] = $termin->return_field('kommentar');
    $presets[flag_kueche] = $termin->return_field('flag_kueche');
    $fields = array();
    $fields[0] = array('type' => 'separator', 'value' => '<b>Datum</b>');
    $fields[] = array('name' => 'date_begin', 'type' => 'text', 'title' => 'Anfangsdatum:', 'important' => 1, 'attribs' => array(0 => array('name' => 'title', 'value' => 'Hier das Anfangsdatum eingeben, Format: TT.MM.JJJJ HH:MM'), 1 => array('name' => 'size', 'value' => '15')));
    $fields[] = array('name' => 'date_end', 'type' => 'text', 'title' => 'Enddatum:', 'important' => 1, 'attribs' => array(0 => array('name' => 'title', 'value' => 'Hier das Enddatum eingeben, Format: TT.MM.JJJJ HH:MM'), 1 => array('name' => 'size', 'value' => '15')));
    $fields[] = array('type' => 'separator', 'value' => '<b>Infos zum Termin</b>');
    $fields[] = array('name' => 'terminart', 'type' => 'select', 'title' => 'Termintyp', 'important' => 1, 'selections' => array(), 'attribs' => array(0 => array('name' => 'title', 'value' => 'Bitte den <b>Termintyp</b> auswählen!!'), 1 => array('name' => 'size', 'value' => '1')));
    for ($i = 0; $i < count($DATE_TYPES); $i++) {