function calendar_display_calendar

7.x calendar.module calendar_display_calendar()
6.x calendar.module calendar_display_calendar()
1 string reference to 'calendar_display_calendar'
calendar_menu in modules/calendar/calendar.module
implements hook_menu

File

modules/calendar/calendar.module, line 3045

Code

function calendar_display_calendar() {
  $rtn = "";

  fp_set_title('');


  $year_month = @trim($_REQUEST ['year_month']);
  if ($year_month == '') {
    $year_month = 'now';
  }


  if ($year_month == 'now') {
    $temp = strtotime('now');
    $year_month = date('Y-m', $temp);
  }

  $temp = explode("-", $year_month);
  $year = intval($temp [0]);
  $month = intval($temp [1]);

  // if mobile_date has been set, then display that (the entire day).
  if (isset($_REQUEST ['mobile_date'])) {
    $rtn .= calendar_display_mobile_date_page($_REQUEST ['mobile_date'], $_REQUEST ['mobile_cids']);
  }
  else {
    $rtn .= calendar_build_custom_calendar($month, $year);
  }


  watchdog("calendar", "display_calendar", array());

  return $rtn;
}