»".$mod_strings['LBL_MODULE_ACTION'], true); if ( empty($_REQUEST['view'])) { $_REQUEST['view'] = 'day'; } $date_arr = array(); if ( isset($_REQUEST['ts'])) { $date_arr['ts'] = $_REQUEST['ts']; } if ( isset($_REQUEST['day'])) { $date_arr['day'] = $_REQUEST['day']; } if ( isset($_REQUEST['month'])) { $date_arr['month'] = $_REQUEST['month']; } if ( isset($_REQUEST['week'])) { $date_arr['week'] = $_REQUEST['week']; } if ( isset($_REQUEST['year'])) { if ($_REQUEST['year'] > 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']; ?>