File: index.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 (30 lines) | stat: -rw-r--r-- 1,028 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
<?php
/*
 * $Horde: kronolith/index.php,v 1.19.2.5 2005/01/03 11:25:58 jan Exp $
 *
 * Kronolith: Copyright 1999-2005 Charles J. Hagenbuch <chuck@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.
 */

define('KRONOLITH_BASE', dirname(__FILE__));
$kronolith_configured = (@is_readable(KRONOLITH_BASE . '/config/conf.php') &&
                         @is_readable(KRONOLITH_BASE . '/config/prefs.php') &&
                         @is_readable(KRONOLITH_BASE . '/config/html.php'));

if ($kronolith_configured) {
    include_once KRONOLITH_BASE . '/lib/base.php';

    $uri = $prefs->getValue('defaultview') . '.php';
    if ($uri == '.php') {
        $uri = 'month.php';
    }
    if (!empty($_SERVER['QUERY_STRING'])) {
        $uri .= '?' . $_SERVER['QUERY_STRING'];
    }

    header('Location: ' . Horde::applicationUrl($uri, true));
} else {
    include KRONOLITH_BASE . '/templates/index/notconfigured.inc';
}