Пример #1
0
     $smarty->assign('tpl_bookid', $bookid);
     $smarty->assign('tpl_bookingdetailid', $book->getBookingDetailId($bookid));
     $smarty->assign('tpl_cat', $request->GetVar('frm_cat', 'post'));
     $smarty->assign('tpl_start', date("d. m. Y", $request->GetVar('frm_startdate', 'post')));
     $smarty->assign('tpl_end', date("d. m. Y", $request->GetVar('frm_enddate', 'post')));
     $smarty->assign('tpl_nights', $request->GetVar('frm_days', 'post'));
     $smarty->assign('tpl_persons', $request->GetVar('frm_persons', 'post'));
     $smarty->assign('tpl_children0', $request->GetVar('frm_children0', 'post'));
     $smarty->assign('tpl_children', $request->GetVar('frm_children', 'post'));
     $smarty->assign('tpl_children2', $request->GetVar('frm_children2', 'post'));
     $smarty->assign('tpl_children3', $request->GetVar('frm_children3', 'post'));
     $smarty->assign('tpl_bookingtype', $request->GetVar('frm_bookingtype', 'post'));
     $smarty->assign('tpl_reservationduration', $request->GetVar('frm_reservationduration', 'post'));
     $smarty->assign('tpl_description', $request->GetVar('frm_description', 'post'));
     // get categories
     $smarty->assign('tpl_bcat', $bcat->get());
 } else {
     $start = $request->GetVar('start', 'get');
     // duration for reservation
     $today = getdate();
     $todaydate = date("Y-m-d", $today[0]);
     $defdays = $request->GetVar('defaultreservationduration', 'session');
     $reservation = date("d.m.Y", strtotime("{$todaydate} + {$defdays} days"));
     $smarty->assign('tpl_reservationduration', $reservation);
     $roomid = $request->GetVar('room', 'get');
     $freenights = $cal->getFreeNights($start, $roomid);
     if ($freenights == 0) {
         $freenights = 100;
     }
     $smarty->assign('tpl_startdate', $start);
     $smarty->assign('tpl_startnice', date("D, d. m. Y", $start));
Пример #2
0
    }
}
$todaydate = getdate();
$month = $todaydate['mon'];
$year = $todaydate['year'];
if ($request->GetVar('month', 'get') !== $request->undefined) {
    $month = $request->GetVar('month', 'get');
    $year = $request->GetVar('year', 'get');
} else {
    if ($request->GetVar('month', 'post') !== $request->undefined) {
        $month = $request->GetVar('month', 'post');
        $year = $request->GetVar('year', 'post');
    }
}
// get categories
$categories = $bcat->get();
// get rooms
$rooms = $room->get();
$monthName = $cal->returnMonthName($month);
$prevMonth = $cal->previous_month($month, $year, false, false);
$displayyear = $year;
if ($request->GetVar('step', 'get') !== $request->undefined) {
    if ($month == 12) {
        $nextmonth = 1;
        $tmpyear = $year + 1;
        $displayyear = $year . '/' . $tmpyear;
    } else {
        $nextmonth = $month + 1;
    }
    $monthName = $monthName . '/' . $cal->returnMonthName($nextmonth);
    $calendar = $cal->GetHalfMonth($year, $month, 0);