function calendar() { require_once (JPATH_SITE.DS.'modules'.DS.'mod_k2_tools'.DS.'includes'.DS.'calendarClass.php'); require_once (JPATH_SITE.DS.'modules'.DS.'mod_k2_tools'.DS.'helper.php'); $mainframe = JFactory::getApplication(); $month = JRequest::getInt('month'); $year = JRequest::getInt('year'); $months = array( JText::_('K2_JANUARY'), JText::_('K2_FEBRUARY'), JText::_('K2_MARCH'), JText::_('K2_APRIL'), JText::_('K2_MAY'), JText::_('K2_JUNE'), JText::_('K2_JULY'), JText::_('K2_AUGUST'), JText::_('K2_SEPTEMBER'), JText::_('K2_OCTOBER'), JText::_('K2_NOVEMBER'), JText::_('K2_DECEMBER'), ); $days = array( JText::_('K2_SUN'), JText::_('K2_MON'), JText::_('K2_TUE'), JText::_('K2_WED'), JText::_('K2_THU'), JText::_('K2_FRI'), JText::_('K2_SAT'), ); $cal = new MyCalendar; $cal->setMonthNames($months); $cal->setDayNames($days); $cal->category = JRequest::getInt('catid'); $cal->setStartDay(1); if (($month) && ($year)) { echo $cal->getMonthView($month, $year); } else { echo $cal->getCurrentMonthView(); } $mainframe->close(); }
function calendar() { require_once JPATH_SITE . DS . 'modules' . DS . 'mod_k2_tools' . DS . 'includes' . DS . 'calendarClass.php'; require_once JPATH_SITE . DS . 'modules' . DS . 'mod_k2_tools' . DS . 'helper.php'; $mainframe =& JFactory::getApplication(); $month = JRequest::getInt('month'); $year = JRequest::getInt('year'); $months = array(JText::_('JANUARY'), JText::_('FEBRUARY'), JText::_('MARCH'), JText::_('APRIL'), JText::_('MAY'), JText::_('JUNE'), JText::_('JULY'), JText::_('AUGUST'), JText::_('SEPTEMBER'), JText::_('OCTOBER'), JText::_('NOVEMBER'), JText::_('DECEMBER')); $days = array(JText::_('SUN'), JText::_('MON'), JText::_('TUE'), JText::_('WED'), JText::_('THU'), JText::_('FRI'), JText::_('SAT')); $cal = new MyCalendar(); $cal->setMonthNames($months); $cal->setDayNames($days); $cal->category = JRequest::getInt('catid'); $cal->setStartDay(1); if ($month && $year) { echo $cal->getMonthView($month, $year); } else { echo $cal->getCurrentMonthView(); } $mainframe->close(); }
pageheader_mini($lang_calendar_php['title'], true); $today = getdate(); if ($superCage->get->testInt('month')) { $month = $superCage->get->getInt('month'); } else { $month = $today['mon']; } if ($superCage->get->testInt('year')) { $year = $superCage->get->getInt('year'); } else { $year = $today['year']; } $cal = new MyCalendar(); $cal->setMonthNames($lang_month); $cal->setDayNames($lang_day_of_week); $cal->setStartDay(1); echo $cal->getMonthView($month, $year, false); pagefooter_mini(); ///////////////////////////////////////////////////////////////////////////////////////// // PHP Calendar Class Version 1.4 (5th March 2001) // // Copyright David Wilkinson 2000 - 2001. All Rights reserved. // // This software may be used, modified and distributed freely // providing this copyright notice remains intact at the head // of the file. // // This software is freeware. The author accepts no liability for // any loss or damages whatsoever incurred directly or indirectly // from the use of this script. The author of this software makes // no claims as to its fitness for any purpose whatsoever. If you
public static function calendar($params) { $month = JRequest::getInt('month'); $year = JRequest::getInt('year'); $months = array(JText::_('K2_JANUARY'), JText::_('K2_FEBRUARY'), JText::_('K2_MARCH'), JText::_('K2_APRIL'), JText::_('K2_MAY'), JText::_('K2_JUNE'), JText::_('K2_JULY'), JText::_('K2_AUGUST'), JText::_('K2_SEPTEMBER'), JText::_('K2_OCTOBER'), JText::_('K2_NOVEMBER'), JText::_('K2_DECEMBER')); $days = array(JText::_('K2_SUN'), JText::_('K2_MON'), JText::_('K2_TUE'), JText::_('K2_WED'), JText::_('K2_THU'), JText::_('K2_FRI'), JText::_('K2_SAT')); $cal = new MyCalendar(); $cal->category = $params->get('calendarCategory', 0); $cal->setStartDay(1); $cal->setMonthNames($months); $cal->setDayNames($days); if ($month && $year) { return $cal->getMonthView($month, $year); } else { return $cal->getCurrentMonthView(); } }