2037 || $_REQUEST['year'] < 1970) { print("Sorry, calendar cannot handle the year you requested"); print("
Year must be between 1970 and 2037"); exit; } $date_arr['year'] = $_REQUEST['year']; } // today adjusted for user's timezone if(empty($date_arr)) { global $timedate; $gmt_today = $timedate->get_gmt_db_datetime(); $user_today = $timedate->handle_offset($gmt_today, $GLOBALS['timedate']->get_db_date_time_format()); preg_match('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$user_today,$matches); $date_arr = array( 'year'=>$matches[1], 'month'=>$matches[2], 'day'=>$matches[3], 'hour'=>$matches[4], 'min'=>$matches[5]); } $args['calendar'] = new Calendar($_REQUEST['view'], $date_arr); if ($_REQUEST['view'] == 'day' || $_REQUEST['view'] == 'week' || $_REQUEST['view'] == 'month') { global $current_user; $args['calendar']->add_activities($current_user); } $args['view'] = $_REQUEST['view']; ?>