Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Creates a themed table of events.
- *
- * @ingroup event_view
- * @param $op
- * @param $stamp The timestamp
- * @param $endstamp end of the menu
- * @param $types limit to given event node types
- * @param $terms limit to nodes with these
- * @return A fully themed table.
- */
- function event_calendar_table($op, $stamp, $endstamp, $types = NULL, $terms = NULL) {
- $today = _event_user_date();
- $thead[] = array('data' => ' ');
- while ($stamp <= $endstamp) {
- $year = gmdate('Y', $stamp);
- $month = gmdate('m', $stamp);
- $cur_day = gmdate('j', $stamp);
- $month_name = gmdate('M', $stamp);
- $dow = _event_day_of_week($stamp);
- $weekdays = event_week_days();
- $tbody[][] = array('colspan' => 3,
- 'class' => strtolower("$month_name ". $weekdays[$dow]['day'] . ($stamp == $today ? ' today' : '') . ($cur_day == $day ? ' selected' : '')),
- 'id' => strtolower($month_name . $cur_day),
- 'data' => event_render_day($year, $month, $cur_day, 'table', $types, $terms));
- $stamp += 86400;
- }
- return array($thead, $tbody);
- }
Add Comment
Please, Sign In to add comment