Exemple #1
0
$smarty->assign('tpl_theend', $theend);
$smarty->assign('tpl_theotherstart', $theotherstart);
$smarty->assign('tpl_thestart', $thestart);
$smarty->assign('tpl_start1', $thestart1);
$smarty->assign('tpl_theotherstart1', $theotherstart1);
$smarty->assign('tpl_end1', $theend1);
$smarty->assign('tpl_theotherend1', $theotherend1);
$thebcat = -1;
if ($what == 'thedate') {
    list($day, $month, $year) = split('[.]', $thedate);
    $thestart = mktime(0, 0, 0, $month, $day, $year);
    $theend = mktime(23, 59, 59, $month, $day, $year);
    if ($request->GetVar('frm_bookcat1', 'post') !== $request->undefined) {
        $thebcat = $request->GetVar('frm_bookcat1', 'post');
    }
    $smarty->assign('tpl_guests', $guestlist->getlist($thestart, $theend, $thebcat));
} elseif ($what == 'timeline') {
    list($day, $month, $year) = split('[.]', $theend1);
    $theend1 = mktime(23, 59, 59, $month, $day, $year);
    list($day, $month, $year) = split('[.]', $thestart1);
    $thestart1 = mktime(0, 0, 0, $month, $day, $year);
    if ($request->GetVar('frm_bookcat2', 'post') !== $request->undefined) {
        $thebcat = $request->GetVar('frm_bookcat2', 'post');
    }
    $smarty->assign('tpl_guests', $guestlist->getlist($thestart1, $theend1, $thebcat));
} else {
    list($month, $year) = split('[/]', $theend);
    $theend = mktime(0, 0, 0, $month, 1, $year);
    list($month, $year) = split('[/]', $thestart);
    $thestart = mktime(0, 0, 0, $month, 1, $year);
    if ($request->GetVar('frm_bookcat3', 'post') !== $request->undefined) {
}
$thestart = str_replace('-', '/', $thestart);
$theend = str_replace('-', '/', $theend);
$thestart1 = str_replace('-', '/', $thestart1);
$theend1 = str_replace('-', '/', $theend1);
$thedate = str_replace('-', '.', $thedate);
if ($request->GetVar('what', 'get') !== $request->undefined) {
    $what = $request->GetVar('what', 'get');
} else {
    $what = 'thedate';
}
if ($what == 'thedate') {
    list($day, $month, $year) = split('[.]', $thedate);
    $thestart = mktime(0, 0, 0, $month, $day, $year);
    $theend = mktime(23, 59, 59, $month, $day, $year);
    $statarr = $guestlist->getlist($thestart, $theend, $bcat);
} elseif ($what == 'timeline') {
    list($day, $month, $year) = split('[/]', $theend1);
    $theend = mktime(23, 59, 59, $month, $day, $year);
    $rtfdate = "bis {$day}.{$month}.{$year} ";
    list($day, $month, $year) = split('[/]', $thestart1);
    $thestart = mktime(0, 0, 0, $month, $day, $year);
    $rtfdate = "vom {$day}.{$month}.{$year} " . $rtfdate;
    $statarr = $guestlist->getlist($thestart, $theend, $bcat);
} else {
    list($month, $year) = split('[/]', $theend);
    $theend = mktime(0, 0, 0, $month, 1, $year);
    list($month, $year) = split('[/]', $thestart);
    $thestart = mktime(0, 0, 0, $month, 1, $year);
    $statarr = $guestlist->getlist($thestart, $theend, $bcat);
}