$viewname = $ev[$i]['cal_name']; } $event_str .= event_to_text($viewid, $dateYmd, $ev[$i]['cal_time'], $ev[$i]['cal_duration'], $viewname, $ev[$i]['cal_description'], $ev[$i]['cal_status'], $ev[$i]['cal_priority'], $ev[$i]['cal_access'], $ev[$i]['cal_login']); } } // print out any remaining repeating events while ($cur_rep < count($rep)) { if ($get_unapproved || $rep[$cur_rep]['cal_status'] == 'A') { if (!empty($rep[$cur_rep]['cal_ext_for_id'])) { $viewid = $rep[$cur_rep]['cal_ext_for_id']; $viewname = $rep[$cur_rep]['cal_name'] . " (" . translate("cont.") . ")"; } else { $viewid = $rep[$cur_rep]['cal_id']; $viewname = $rep[$cur_rep]['cal_name']; } $event_str .= event_to_text($viewid, $dateYmd, $rep[$cur_rep]['cal_time'], $rep[$cur_rep]['cal_duration'], $viewname, $rep[$cur_rep]['cal_description'], $rep[$cur_rep]['cal_status'], $rep[$cur_rep]['cal_priority'], $rep[$cur_rep]['cal_access'], $rep[$cur_rep]['cal_login']); } $cur_rep++; } if (!empty($event_str) || $report_include_empty == 'Y' || $report_time_range < 10) { $date_str = date_to_str($dateYmd, "", false); $date_full_str = date_to_str($dateYmd, "", true, false); $text = str_replace('${events}', $event_str, $day_template); $text = str_replace('${report_id}', $report_id, $text); $text = str_replace('${fulldate}', $date_full_str, $text); $day_str .= str_replace('${date}', $date_str, $text); } } } if (!empty($error)) { echo "<h2>" . translate("Error") . "</h2>\n" . $error;
} if (empty($error) && empty($list)) { $cat_id = empty($report_cat_id) ? '' : $report_cat_id; $repeated_events = read_repeated_events($report_user, $start_date, $end_date, $cat_id); $events = read_events($report_user, $start_date, $end_date, $cat_id); $get_unapproved = $DISPLAY_UNAPPROVED == 'Y'; // Loop through each day. // Get events for each day (both normal and repeating). // (Most of this code was copied from week.php.) for ($cur_time = $start_date; $cur_time <= $end_date; $cur_time += 86400) { $event_str = ''; $dateYmd = date('Ymd', $cur_time); $ev = combine_and_sort_events(get_entries($dateYmd), get_repeating_entries($report_user, $dateYmd)); for ($i = 0, $cnt = count($ev); $i < $cnt; $i++) { if ($get_unapproved || $ev[$i]->getStatus() == 'A') { $event_str .= event_to_text($ev[$i], $dateYmd); } } if (!empty($event_str) || $report_include_empty == 'Y' || $report_time_range < 10) { $date_str = date_to_str($dateYmd, '', false); $date_full_str = date_to_str($dateYmd); $day_str .= str_replace(array('${date}', '${events}', '${fulldate}', '${report_id}'), array($date_str, $event_str, $date_full_str, $report_id), $day_template); } } } if (!empty($error)) { echo print_error($error) . print_trailer(); exit; } $adminLinkStr = $manageStr = $nextLinkStr = $prevLinkStr = $textStr = ''; $nextStr = translate('Next');