<?php
/**
 * The main brain script for all of MythWeb.
 *
 * @url         $URL: http://svn.mythtv.org/svn/branches/release-0-21-fixes/mythplugins/mythweb/mythweb.php $
 * @date        $Date: 2008-02-08 02:34:57 -0800 (Fri, 08 Feb 2008) $
 * @version     $Revision: 15839 $
 * @author      $Author: kormoc $
 * @license     GPL
 *
 * @package     MythWeb
 *
/**/

// Add a custom include path?
    if (!empty($_SERVER['include_path']) && $_SERVER['include_path'] != '.')
        ini_set('include_path', $_SERVER['include_path'].PATH_SEPARATOR.ini_get('include_path'));

// Init
    require_once 'includes/init.php';

// Standard module?  Pass along the
    if ($Modules[$Path[0]]) {
    // Add the current module directory to our search path, so modules can
    // define includes, etc.
        ini_set('include_path', ini_get('include_path').':'.modules_path.'/'.$Path[0]);
    // Load the module handler
        require_once 'handler.php';
    }
    elseif ($Path[0] == 'dcss')
        include_once 'skins/default/'.$Path[1];
    elseif (!empty($Path[0]) && preg_match('/\w/', $Path[0]))
        tailored_error('unknown_module');
    else
        require_once 'modules/welcome.php';
