blob: f338ea95afdb375fffd837b0f8f320f8fa8f19ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
use Bitweaver\Calendar\Calendar;
use Bitweaver\KernelTools;
// $Header$
// Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
require_once( '../kernel/includes/setup_inc.php' );
$gBitSystem->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'));
|