<?php
//#################################################################################################
// Main Page
//#################################################################################################
// chillyCMS - Content Management System
// Copyright (C) 2008
// Stefanie Wiegand <hide@address.com> & Johannes Cox <hide@address.com>
//
// This program is licensed under the GPL 3.0 license. For more information see LICENSE.txt.
//#################################################################################################
define('DOIT',true);
//load config file (empty before installation routine)
require_once('./core/session.frontend.include.php');
//find out if the config file has been filled:
//if true send to real site
if(defined('DB_HOST')) {
//site is offline
if (isset($settings["offline_mode"]) && $settings["offline_mode"]==1) {
require_once(PATH."/core/offline.site.php");
//site is online
} else {
//do something before anything happens? (eg. set cookies,header,...)
foreach ($page->dofirst as $df) { include($df); }
//Load template file
require_once(PATH."/templates/$page->template/index.php");
}
//if not send to installation routine
} else {
header('Location: '.URL.'/installation/index.php');
}
?>