if (date("j", $items[$counter]->captured) > $counter_days) { $counter_days = date("j", $items[$counter]->captured); $calendar->event($counter_days, url::site("calendarview/day/" . $calendar_year . "/" . $user_id . "/" . $counter_months . "/" . $counter_days)); } // Move onto the next photo. $counter++; } // Print out the last calendar to be generated. echo $calendar->render(); print "</div>"; $counter_months++; // If the calendar that was previously rendered was not the final month, // then print out a few empty months to fill the remaining space. while ($counter_months < $user_month + 1) { print "<div id=\"g-calendar-profile-grid\">"; $month_url = ""; $calendar = new PHPCalendar($counter_months, $calendar_year, $month_url); echo $calendar->render(); print "</div>"; $counter_months++; } ?> <br clear="all" /><br /><br /> <div align="right"><a href="<?php echo url::site("calendarview/calendar/{$user_year}/{$user_id}"); ?> "><?php echo t("View full calendar"); ?> >></a></div>