$unique_colors) $event_calno = ($event_calno - $unique_colors);
if ($event_status != '') {
$confirmed = '
';
} elseif (is_array($event_recur)) {
$confirmed = '
';
}
$colspan_width = round((460 / $nbrGridCols) * $drawWidth);
$daydisplay .= ''."\n";
// Start drawing the event
$event_temp = $loop_event;
$event_calna = $this_time_arr[($event_length[$i]['key'])]['calname'];
$event_url = $this_time_arr[($event_length[$i]['key'])]['url'];
$event = openevent($event_calna, $event_start, $event_end, $this_time_arr[($event_length[$i]['key'])], '', 0, '', '', 'ps', $event_url);
$event_temp = str_replace('{EVENT}', $event, $event_temp);
$event_temp = str_replace('{EVENT_START}', $event_start, $event_temp);
$event_temp = str_replace('{EVENT_END}', $event_end, $event_temp);
$event_temp = str_replace('{CONFIRMED}', $confirmed, $event_temp);
$event_temp = str_replace('{EVENT_CALNO}', $event_calno, $event_temp);
$daydisplay .= $event_temp;
$daydisplay .= ' | ';
// End event drawing
break;
case 'started':
break;
case 'ended':
$daydisplay .= ' | '."\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) {
$daydisplay .= ' | '."\n";
}
while (isset($event_length[(sizeof($event_length) - 1)]) && $event_length[(sizeof($event_length) - 1)]['state'] == 'ended') {
array_pop($event_length);
}
}
$daydisplay .= '