<?php
/**
* Swun Bootstrap, index, dispatcher... the thing called ;)
*
* @author Benjamin Gillissen <hide@address.com>
*
* **************************************************************
Copyright (C) 2009 Benjamin Gillissen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details at:
http://www.gnu.org/copyleft/gpl.html
* **************************************************************
*/
//Site title
define('SITE_TITLE', 'Simple Way To Usenet');
//dunno if it's possible but anyway let's try something just in case ;)
if ( ! defined('PATH_SEPARATOR') ){
if ( ereg(';', ini_get('include_path')) ){ $ps = ';'; } else { $ps = ':'; }
define('PATH_SEPARATOR', $ps);
unset($ps);
}
//path to folder containing this option set.
define('PATH_OPTS', implode(PATH_SEPARATOR, Array('../config')));
//path that contains files with db objects structure.
define('PATH_CNF', implode(PATH_SEPARATOR, Array('../config/CNF')));
//path to librairies.
define('PATH_LIBS', implode(PATH_SEPARATOR, Array('../libs/core', '../libs/swun/')));
//a writable path, best if reserved to this
define('PATH_CACHE', '../cache');
//path to temp folder, if defined will overwrite system temp folder
define('PATH_TMP', PATH_CACHE.'/tmp');
//used in libs
define('CORE_CONTEXT', 'swun');
//PHP ERROR REDIRECTION
define('REDIRECT_PHP_ERRORS', TRUE);
//PEAR ERROR REDIRECTION, require PEARS folder in include path.
define('REDIRECT_PEAR_ERRORS', FALSE);
//do we hidde events prefixed with the error suppression directive "@"
define('FOLLOW_ERROR_DIRECTIVE',TRUE);
//do we use core auth engine ?, do not even try it yet ;)
define('CORE_AUTH', FALSE);
//and we try to load the CORE.
$icp = ini_get('include_path');
ini_set('include_path', PATH_LIBS);
if ( ! include('CORE.class.php') ){ die('Missing CORE Librairie, plz check the value of PATH_LIBS in this file !'); }
if ( ! include('misc/chrono.class.php') ){ die('Missing Chrono Librairie, plz check the value of PATH_LIBS in this file !'); }
chrono::reqstart();
ini_set('include_path', $icp);
unset($icp);
$pgen = new pagegen();
$pgen->set_active(browsing::get_active());
$r = $pgen->checks();
if ( CORE::isError($r) ){ errors::broadcast($r);exit(1); }
$pgen->build();
exit(0);