<?php require_once('includes/requirelogin.inc.php'); $CMD_TMPL_NAME='reservation.list'; $lctr_id=0+TGET('lctr_id'); $mb_id=0+TGET('mb_id'); $st_id=0+TGET('st_id'); if ($mb_id!=current_mb_id()) { redirect("./"); return; } $timezone_bias_seconds=get_user_time_zone()*60; $DBConn->connect(true); $reservation=db_load_reservation($DBConn,$lctr_id,$st_id,$mb_id); if (!$reservation) { $dataset['ERROR-RESERVATION-NOTEXIST']=array(0); } else { $lecture=db_load_lecture_by_id($DBConn,$lctr_id); $course=db_load_course_by_id($DBConn,$lecture['cs_id']); $classroom=db_load_classroom($DBConn,$lecture['clsr_id']); $seat=db_load_seat($DBConn,$reservation['st_id']); $place=db_load_place($DBConn,$seat['plc_id']); $staff_ids=db_load_lecture_staff_ids($DBConn,$lctr_id); $staff=db_load_comperes($DBConn,$staff_ids); $USE_THEME_BY_USER_ID=$course['mb_id_owner']; $lec=array(); $lec+=$lecture; $lec+=$course; $lec+=$classroom; $lec+=$seat; $lec+=$place; $lec+=array_key_prepend(split_datetime($lec['lctr_since'],$timezone_bias_seconds),'since_'); $lec+=array_key_prepend(split_datetime($lec['lctr_expire'],$timezone_bias_seconds),'expire_'); $lec+=array_key_prepend(split_datetime($lec['lctr_deadline'],$timezone_bias_seconds),'deadline_'); $lec['ONDUTY']=$staff; $lec['since_weekday']=datetime_to_weekday($lec['lctr_since'],$timezone_bias_seconds); $lec['expire_weekday']=datetime_to_weekday($lec['lctr_expire'],$timezone_bias_seconds); $lec['deadline_weekday']=datetime_to_weekday($lec['lctr_deadline'],$timezone_bias_seconds); if ($lec['lctr_deadline']>=$cur_time_utc) $lec['CANCELLABLE']=array(0); else $dataset['ERROR-DEADLINE-OVER']=array(0); if ($reservation['rsv_timestamp_confirmed']) $lec['RS-COMPLETE']=array(0); else $lec['RS-PROVISIONAL']=array(0); $dataset['LECTURE']=array($lec); $dataset['DELETE-CONFIRM']=array(0); $dataset['lctr_id']=$lctr_id; $dataset['mb_id']=$mb_id; $dataset['st_id']=$st_id; } ?>