$ovlValue) { if ($ovlKey != '-1') { foreach($ovlValue as $ovl2Value) { $nbrGridCols = kgv($nbrGridCols, ($ovl2Value['event_overlap'] + 1)); } } } } include (BASE.'includes/header.inc.php'); ?>
\n"; echo ''."\n"; echo ''."\n"; } if ($daysofweek_dayview == 'yes') { ?> '; echo ''; } ?>
'."\n"; echo ''."\n"; foreach($master_array[($getdate)]['-1'] as $allday) { echo "\n"; $event_calno = $allday['calnumber']; if ($event_calno < 1) $event_calno=1; if ($event_calno > 7) $event_calno=7; echo '\n\n"; } echo '
'; openevent("$calendar_name", "", "", $allday, 0, "", '', "", "psf"); echo "
'."\n"; echo '
'; echo ""; $thisdate = $start_week_time; $start_day = strtotime($week_start_day); $i = 0; do { $day_num = date("w", $start_day); $day = $daysofweek_lang[$day_num]; $thisday = date("Ymd", $thisdate); echo "\n"; $start_day = strtotime("+1 day", $start_day); $thisdate = strtotime("+1 day", $thisdate); $i++; } while ($i < 7); echo ''; echo '
\n"; echo "$day\n"; echo "
'; echo '
 '; } ?> 0) { $this_time_arr = $master_array[$getdate][$cal_time]; } // add events that overlap $day_start instead of cutting them out completely if ("$day_start" == "$cal_time" && isset($master_array[$getdate])) { foreach($master_array[$getdate] as $time_key => $time_arr) { if ((int)$time_key < (int)$cal_time && is_array($time_arr) && $time_key != '-1') { foreach($time_arr as $event_tmp) { if ((int)$event_tmp['event_end'] > (int)$cal_time) { $this_time_arr[] = $event_tmp; } } } else { break; } } } // check for eventstart if (isset($this_time_arr) && sizeof($this_time_arr) > 0) { foreach ($this_time_arr as $eventKey => $loopevent) { $drawEvent = drawEventTimes ($cal_time, $loopevent['event_end']); $j = 0; while (isset($event_length[$j])) { if ($event_length[$j]['state'] == 'ended') { $event_length[$j] = array ('length' => ($drawEvent['draw_length'] / $gridLength), 'key' => $eventKey, 'overlap' => $loopevent['event_overlap'],'state' => 'begin'); break; } $j++; } if ($j == sizeof($event_length)) { array_push ($event_length, array ('length' => ($drawEvent['draw_length'] / $gridLength), 'key' => $eventKey, 'overlap' => $loopevent['event_overlap'],'state' => 'begin')); } } } if (ereg('([0-9]{1,2}):00', $key)) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } elseif("$cal_time" == "$day_start") { $size_tmp = 60 - (int)substr($cal_time,2,2); echo "\n"; echo "\n"; echo "\n"; } else { echo ''."\n"; echo ''."\n"; } if ($dayborder == 0) { $class = ' class="dayborder"'; $dayborder++; } else { $class = ' class="dayborder2"'; $dayborder = 0; } if (sizeof($event_length) == 0) { echo ''."\n"; } else { $emptyWidth = $nbrGridCols; for ($i=0;$i 7) $event_calno = 7; echo ''."\n"; break; case 'started': break; case 'ended': echo ''."\n"; break; } $event_length[$i]['length']--; if ($event_length[$i]['length'] == 0) { $event_length[$i]['state'] = 'ended'; } } //fill emtpy space on the right if ($emptyWidth > 0) { echo ''."\n"; } while (isset($event_length[(sizeof($event_length) - 1)]) && $event_length[(sizeof($event_length) - 1)]['state'] == 'ended') { array_pop($event_length); } } echo ''."\n"; } ?>
'.$key.'
$key
 '."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($event_status != '') { echo ''."\n"; } echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'.$event_start.' - '.$event_end.''; echo ''; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'; // Todo: keep track of where the event comes from, and indicate that to openevent instead of $ALL_CALENDARS_COMBINED if ($cal == $ALL_CALENDARS_COMBINED) $calendar_name2=$cal; else $calendar_name2=$calendar_name; openevent("$calendar_name2", "$event_start", "$event_end", $this_time_arr[($event_length[$i]['key'])], "", 0, "", "", "psf"); echo '
'."\n"; echo '
'."\n"; echo '