コード例 #1
0
        $cells[$i][0]++;
        $cells[$i][1]++;
    }
    if ($event_duration->getMinute() > 0) {
        if ($event_duration->getHour() != $event_start->getHour()) {
            $cells[$event_duration->getHour()][0]++;
            if ($event_duration->getMinute() > 30) {
                $cells[$event_duration->getHour()][1]++;
            }
        }
    }
}
$occup = array();
//keys: hora - pos
foreach ($result as $event) {
    getEventLimits($event, $dtv, $event_start, $event_duration, $end_modified);
    $event_id = $event->getId();
    $subject = clean($event->getObjectName());
    $ws_colors = $event->getObjectColors($event instanceof ProjectEvent ? 1 : 12);
    $all_event_colors = array();
    foreach ($ws_colors as $ws_color) {
        cal_get_ws_color($ws_color, $ws_style, $ws_class, $txt_color, $border_color);
        $all_event_colors[$ws_color] = $ws_class;
        if (!user_config_option('show_multiple_color_events')) {
            break;
        }
    }
    $hr_start = $event_start->getHour();
    $min_start = $event_start->getMinute();
    $hr_end = $event_duration->getHour();
    $min_end = $event_duration->getMinute();
コード例 #2
0
ファイル: viewweek5days.php プロジェクト: rorteg/fengoffice
         $cells[$i][0]++;
         $cells[$i][1]++;
     }
     if ($event_duration->getMinute() > 0) {
         if ($event_duration->getHour() != $event_start->getHour()) {
             $cells[$event_duration->getHour()][0]++;
             if ($event_duration->getMinute() > 30) {
                 $cells[$event_duration->getHour()][1]++;
             }
         }
     }
 }
 $occup = array();
 //keys: hora - pos
 foreach ($results[$day_of_week] as $event) {
     getEventLimits($event, $dates[$day_of_week], $event_start, $event_duration, $end_modified);
     $event_id = $event->getId();
     $subject = clean($event->getObjectName());
     $ws_color = $event->getObjectColor($event instanceof ProjectEvent ? 1 : 12);
     cal_get_ws_color($ws_color, $ws_style, $ws_class, $txt_color, $border_color);
     $hr_start = $event_start->getHour();
     $min_start = $event_start->getMinute();
     $hr_end = $event_duration->getHour();
     $min_end = $event_duration->getMinute();
     if ($event_start == $event_duration) {
         $hr_end++;
     }
     if ($hr_end == 0 && $event_duration->getDay() != $dates[$day_of_week]->getDay()) {
         $hr_end = 24;
     }
     $top = PX_HEIGHT * $hr_start + PX_HEIGHT * ($min_start * 100 / (60 * 100));