예제 #1
0
 function ScheduleWeek($start_hour = '', $end_hour = '', $show_days = '', $start_date = '', $show_dates = false)
 {
     parent::ScheduleView($start_hour, $end_hour, $show_days, $start_date);
     $this->show_dates = $show_dates;
     if (!$show_dates && $start_date) {
         $this->show_dates = TRUE;
     }
 }
 function SemGroupScheduleDayOfWeek($start_hour = '', $end_hour = '', $rooms_to_show = array(), $start_date = '', $dow = 1)
 {
     foreach ($rooms_to_show as $id => $room_id) {
         $show_columns[$id + 1] = $room_id;
     }
     parent::ScheduleView($start_hour, $end_hour, $show_columns, $start_date);
     $this->dow = $dow;
     if ($this->dow !== false) {
         //the base_date have to be 0:00
         $first_monday = date("j", $this->start_date) - (date("w", $this->start_date) - 1);
         if (date("w", $this->start_date) > 1) {
             $first_monday += 7;
         }
         $this->base_date = mktime(0, 0, 0, date("n", $this->start_date), $first_monday + $this->dow - 1, date("Y", $this->start_date));
     } else {
         $this->base_date = $this->start_date;
     }
 }