'reservation.php', "name" => get_lang('Booking'));
Display :: display_header($tool_name);
api_display_tool_title($tool_name);
echo '
';
function getBlock($color) {
return '';
}
$gogogo=false;
// Get resolution of user
if((empty($_SESSION['swidth'])||empty($_SESSION['sheight']))&&(empty($_GET['swidth'])||empty($_GET['sheight']))) {
?>
';
if ($gogogo&&!empty($_GET['cat'])) {
$itemlist = Rsys :: get_cat_items($_GET['cat']);
echo '';
if (count($itemlist) != 0) {
echo '';
}else{
echo ' '.get_lang('NoItemsReservation');
}
echo '
';
if(!empty($_GET['item'])) {
$calendar = new rCalendar();
$time=Rsys::mysql_datetime_to_array($_GET['date'].' 00:00:00');
ob_start();
echo '';
if(isset($_GET['changemonth'])) {
echo $calendar->get_mini_month(intval($time['month']),intval($time['year']),"&cat=".$_GET['cat']."&item=".$_GET['item']."&changemonth=yes",$_GET['item']);
}
else
echo $calendar->get_mini_month(date('m'),date('Y'),"&cat=".$_GET['cat']."&item=".$_GET['item'],$_GET['item']);
echo '
';
switch($_SESSION['swidth']) {
case '640': $week_scale= 170;break;
case '1024': $week_scale=130;break;
case '1152': $week_scale=110;break;
case '1280': $week_scale=94;break;
case '1600': $week_scale=70;break;
case '1792': $week_scale=60;break;
case '1800': $week_scale=50;break;
case '1920': $week_scale=40;break;
case '2048': $week_scale=30;break;
default: $week_scale= 150; // 800x600
}
if(isset($_GET['date'])){
echo $calendar->get_week_view(intval($time['day']),intval($time['month']), $time['year'],$_GET['item'], $week_scale,$_GET['cat']);
}else
echo $calendar->get_week_view(intval(date('d')), intval(date('m')), intval(date('Y')), $_GET['item'], $week_scale,$_GET['cat']);
echo '
';
$buffer=ob_get_contents();
ob_end_clean();
$legend=getBlock('green').' '.ucfirst(get_lang('OpenBooking')).' '.getBlock('blue').' '.get_lang('TimePicker').' '.getBlock('orange').' '.get_lang('OutPeriod').' '.getBlock('red').' '.get_lang('Reserved').' '.getBlock('grey').' '.get_lang('NoReservations').' '.getBlock('black').' '.get_lang('Blackout');
echo '
'.$GLOBALS['weekstart'].' - '.$GLOBALS['weekend'].'
'.$buffer.'
'.$legend.'
';
}
}
Display :: display_footer();
?>