<?php
/**
 * $Horde: vacation/index.php,v 1.11 2003/08/24 22:48:22 jan Exp $
 *
 * Copyright 2001-2003 Eric Rostetter <eric.rostetter@physics.utexas.edu>
 *
 * See the enclosed file LICENSE for license information (BSD). If you
 * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
 */

define('VACATION_BASE', dirname(__FILE__));
$vacation_configured = (@is_readable(VACATION_BASE . '/config/conf.php'));

if ($vacation_configured) {
    include_once VACATION_BASE . '/lib/base.php';
    $uri = 'main.php';
    if (!empty($_SERVER['QUERY_STRING'])) {
       $uri .= '?' . $_SERVER['QUERY_STRING'];
    }
    header('Location: ' . Horde::applicationUrl($uri, true));
    exit;
} else {
    /* Vacation isn't configured. */
    require VACATION_BASE . '/../lib/Test.php';
    Horde_Test::configFilesMissing('Vacation', VACATION_BASE, 'conf.php');
}
