1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
4 $days = Calendar
::days(2);
6 // Previous and next month timestamps
7 $next = mktime(0, 0, 0, $month +
1, 1, $year);
8 $prev = mktime(0, 0, 0, $month - 1, 1, $year);
10 // Import the GET query array locally and remove the day
14 // Previous and next month query URIs
15 $prev = Router
::$current_uri.'?'.http_build_query(array_merge($qs, array('month' => date('n', $prev), 'year' => date('Y', $prev))));
16 $next = Router
::$current_uri.'?'.http_build_query(array_merge($qs, array('month' => date('n', $next), 'year' => date('Y', $next))));
19 <table
class="calendar">
21 <td
class="prev"><?php
echo html
::anchor($prev, '«') ?
></td
>
22 <td
class="title" colspan
="5"><?php
echo strftime('%B %Y', mktime(0, 0, 0, $month, 1, $year)) ?
></td
>
23 <td
class="next"><?php
echo html
::anchor($next, '»') ?
></td
>
26 <?php
foreach ($days as $day): ?
>
27 <th
><?php
echo $day ?
></th
>
30 <?php
foreach ($weeks as $week): ?
>
32 <?php
foreach ($week as $day):
34 list ($number, $current, $data) = $day;
38 $classes = $data['classes'];
39 $output = empty($data['output']) ?
'' : '<ul class="output"><li>'.implode('</li><li>', $data['output']).'</li></ul>';
48 <td
class="<?php echo implode(' ', $classes) ?>"><span
class="day"><?php
echo $day[0] ?
></span
><?php
echo $output ?
></td
>