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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<?php
/*
* $Horde: kronolith/viewevent.php,v 1.1.2.7 2005/01/03 11:25:58 jan Exp $
*
* Copyright 1999-2005 Charles J. Hagenbuch <chuck@horde.org>
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*/
define('KRONOLITH_BASE', dirname(__FILE__));
require_once KRONOLITH_BASE . '/lib/base.php';
$event = $calendar->getEventObject(Horde::getFormData('eventID'));
if (!$event) {
if (($url = Horde::getFormData('url')) === null) {
$url = $prefs->getValue('defaultview') . '.php';
if ($url == '.php') {
$url = 'month.php';
}
$url = Horde::applicationUrl($url, true);
}
header('Location: ' . $url);
}
$category = $event->getCategory();
$description = $event->getDescription();
$location = $event->getLocation();
if ($conf['metadata']['keywords']) {
include_once KRONOLITH_BASE . '/config/keywords.php';
$keyword_list = array();
foreach ($keywords as $cat => $list) {
$sub_list = array();
foreach ($list as $entry) {
if ($event->hasKeyword($entry)) {
$sub_list[] = htmlspecialchars($entry);
}
}
if (count($sub_list)) {
$keyword_list[$cat] = $sub_list;
}
}
}
if ($timestamp = Horde::getFormData('timestamp')) {
$month = date('n', $timestamp);
$year = date('Y', $timestamp);
} else {
$month = Horde::getFormData('month', date('n'));
$year = Horde::getFormData('year', date('Y'));
}
$title = sprintf(_("View %s"), $event->getTitle());
$js_onLoad = null;
require KRONOLITH_TEMPLATES . '/common-header.inc';
require KRONOLITH_BASE . '/menu.php';
require KRONOLITH_TEMPLATES . '/view/view.inc';
require KRONOLITH_TEMPLATES . '/common-footer.inc';
|