function template_calendar_month($args) { global $mod_strings; ?> <table width="100%" id="daily_cal_table" border="0" cellspacing="1" cellpadding="0" > <?php // need to change these values after we find out what activities // occur outside of these values /* $start_slice_idx = $args['calendar']->get_start_slice_idx(); $end_slice_idx = $args['calendar']->get_end_slice_idx(); $cur_slice_idx = 1; */ $count = 0; if ($args['calendar']->slice_hash[$args['calendar']->slices_arr[35]]->start_time->month != $args['calendar']->date_time->month) { $rows = 5; } else { $rows = 6; } ?> <tr class="monthCalBodyTH"> <?php for ($i = 0; $i < 7; $i++) { $first_row_slice = $args['calendar']->slice_hash[$args['calendar']->slices_arr[$i]]; ?> <th width="14%"><?php echo $first_row_slice->start_time->get_day_of_week_short(); ?> </th> <?php } ?> </tr> <?php if (isset($_REQUEST['view']) && $_REQUEST['view'] == 'month') { $height_class = "monthViewDayHeight"; } else { if (isset($args['size']) && $args['size'] == 'small') { $height_class = ""; } else { $height_class = "monthViewDayHeight yearViewDayHeight"; } } for ($i = 0; $i < $rows; $i++) { ?> <tr class="<?php echo $height_class; ?> "> <?php for ($j = 0; $j < 7; $j++) { $args['slice'] = $args['calendar']->slice_hash[$args['calendar']->slices_arr[$count]]; ?> <td <?php if ($j == 0 || $j == 6) { ?> class="weekEnd"<?php } ?> ><?php template_cal_day_slice($args); ?> </td> <?php $count++; } ?> </tr> <?php } ?> </table> <?php }
function template_calendar_month(&$args) { global $mod_strings; ?> <table width="100%" id="daily_cal_table" border="0" cellspacing="1" cellpadding="0" > <?php // need to change these values after we find out what activities // occur outside of these values /* $start_slice_idx = $args['calendar']->get_start_slice_idx(); $end_slice_idx = $args['calendar']->get_end_slice_idx(); $cur_slice_idx = 1; */ $count = 0; if ($args['calendar']->slice_hash[$args['calendar']->slices_arr[35]]->start_time->month != $args['calendar']->date_time->month) { $rows = 5; } else { $rows = 6; } ?> <tr> <?php if ($args['calendar']->show_week_on_month_view) { ?> <th width="1%" class="monthCalBodyTHWeek" scope='col'><?php echo $mod_strings['LBL_WEEK']; ?> </th> <?php } for ($i = 0; $i < 7; $i++) { $first_row_slice = $args['calendar']->slice_hash[$args['calendar']->slices_arr[$i]]; ?> <th width="14%" class="monthCalBodyTHDay" scope='col' ><?php echo $first_row_slice->start_time->get_day_of_week_short(); ?> </th> <?php } ?> </tr> <?php if (isset($_REQUEST['view']) && $_REQUEST['view'] == 'month') { $height_class = "monthViewDayHeight"; } else { if (isset($args['size']) && $args['size'] == 'small') { $height_class = ""; } else { $height_class = "yearViewDayHeight"; } } for ($i = 0; $i < $rows; $i++) { ?> <tr class="<?php echo $height_class; ?> "> <?php if ($args['calendar']->show_week_on_month_view) { ?> <td valign=middle align=center class="monthCalBodyWeek" scope='row'><a href="index.php?module=Calendar&action=index&view=week&<?php echo $args['calendar']->slice_hash[$args['calendar']->slices_arr[$count]]->start_time->get_date_str(); ?> " class="monthCalBodyWeekLink"><?php echo $args['calendar']->slice_hash[$args['calendar']->slices_arr[$count + 1]]->start_time->week; ?> </a></td> <?php } for ($j = 0; $j < 7; $j++) { $args['slice'] = $args['calendar']->slice_hash[$args['calendar']->slices_arr[$count]]; ?> <td valign=top <?php if ($j == 0) { echo "scope='row' "; } ?> class="<?php if ($j == 0 || $j == 6) { ?> monthCalBody<?php if (get_current_day($args) == true) { echo "Today"; } ?> WeekEnd<?php } else { ?> monthCalBody<?php if (get_current_day($args) == true) { echo "Today"; } ?> WeekDay<?php } ?> "><?php template_cal_day_slice($args); ?> </td> <?php $count++; } ?> </tr> <?php } ?> </table> <?php }