File: menu.php

package info (click to toggle)
kronolith 1.1.4-2sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,212 kB
  • ctags: 1,074
  • sloc: php: 4,187; sh: 724; xml: 522; makefile: 96; sql: 42; perl: 20
file content (42 lines) | stat: -rw-r--r-- 1,393 bytes parent folder | download
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
<?php
/*
 * $Horde: kronolith/menu.php,v 1.14.2.4 2005/01/03 11:25:58 jan Exp $
 *
 * Copyright 1999-2005 Charles J. Hagenbuch <chuck@horde.org>
 * Copyright 1999-2005 Jon Parise <jon@horde.org>
 *
 * See the enclosed file COPYING for license information (GPL). If you did
 * not receive such a file, see also http://www.fsf.org/copyleft/gpl.html.
 */

require_once HORDE_BASE . '/lib/Menu.php';

/* Check for additional site-specific menu items (in config/menu.php). */
$additional_items = '';
if (@is_readable(KRONOLITH_BASE . '/config/menu.php')) {
    include_once KRONOLITH_BASE . '/config/menu.php';
    foreach ($_menu as $item) {
        $additional_items .= Menu::customItem($item);
    }
}

$timestamp = Horde::getFormData('timestamp');
if (!$timestamp) {
    $year = Horde::getFormData('year', date('Y'));
    $month = Horde::getFormData('month', date('m'));
    $day = Horde::getFormData('mday', date('d'));
    if ($week = Horde::getFormData('week')) {
        $month = 1;
        $day = Kronolith::firstDayOfWeek($week, $year);
    }
    $timestamp = mktime(0, 0, 0, $month, $day, $year);
}
$append = "?timestamp=$timestamp";

include KRONOLITH_TEMPLATES . '/menu/menu.inc';
require KRONOLITH_BASE . '/status.php';

/* Include the JavaScript for the help system (if enabled). */
if ($conf['user']['online_help'] && $browser->hasFeature('javascript')) {
    Help::javascript();
}