}
$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 = $roomlist->getlist($thestart, $theend);
} 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 = $roomlist->getlist($thestart, $theend);
} 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 = $roomlist->getlist($thestart, $theend);
}
Esempio n. 2
0
}
$smarty->assign('tpl_what', $what);
$smarty->assign('tpl_theotherdate', $theotherdate);
$smarty->assign('tpl_thedate', $thedate);
$smarty->assign('tpl_theotherend', $theotherend);
$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);
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);
    $smarty->assign('tpl_booking', $roomchangelist->getlist($thestart, $theend));
} 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);
    $smarty->assign('tpl_booking', $roomchangelist->getlist($thestart1, $theend1));
} 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);
    $smarty->assign('tpl_booking', $roomchangelist->getlist($thestart, $theend));
}
$smarty->display('list_roomchange.tpl');