isPackageActive( 'calendar', true ); $gBitSystem->verifyPermission( 'p_calendar_view' ); // now, lets get the ball rolling! $gCalendar = new Calendar(); // Handle the request hash storing into the session. $gCalendar->processRequestHash($_REQUEST, $_SESSION['calendar']); // Setup which content types we want to view. if( $gBitUser->hasPermission("p_calendar_view_changes") && $_SESSION['calendar']['content_type_guid'] ) { $listHash = $_SESSION['calendar']; } else { foreach ($gLibertySystem->mContentTypes as $key => $val) { if ($gBitSystem->isFeatureActive('calendar_default_'.$key)) { $listHash['content_type_guid'][] = $key; } } } // Build the calendar $gCalendar->buildCalendar($listHash, $_SESSION['calendar']); // And display it with a nice title. $gCalendar->display(KernelTools::tra('Calendar'));