<?php
 $debut = microtime(true); 
// session_destroy();
// die();

define('WEBROOT',dirname(__FILE__)); 
define('ROOT',dirname(WEBROOT)); 
define('DS',DIRECTORY_SEPARATOR);
define('CORE',ROOT.DS.'core'); 
if (dirname(dirname($_SERVER['SCRIPT_NAME'])) == '/' ) {
	define (BASE_URL,'');
}
else {
	define('BASE_URL',dirname(dirname($_SERVER['SCRIPT_NAME']))); 
}

define('IMAGES',BASE_URL.'/webroot/images/');
define('INCLUDES',WEBROOT.DS.'includes'.DS);
define('LANGUE',WEBROOT.DS.'lang'.DS);
//define('AVIS',BASE_URL.'/webroot/avis/');
define('CSS',BASE_URL.'/webroot/css/');
define('JS',BASE_URL.'/webroot/js/');
define('UTILITAIRES',ROOT.'/webroot/utilitaires/');

require CORE.'/includes.php'; 

if(!isset($_SESSION)) { 
	session_start();
 }

require INCLUDES.'lbl_inc.php';
require INCLUDES.'lib_inc.php';
require INCLUDES.'progress_bar.php';

//require INCLUDES.'define_droits.php';
//require INCLUDES.'choix_lang.php';
//require INCLUDES.'inc_couleurs.php';

if($_SESSION['FAMILY']==-1  || !isset($_SESSION['FAMILY']) || !isset($_SESSION['s_ReqFamille'])) {
	$_SESSION['FAMILY'] = 1;
	$_SESSION['s_ReqFamille'] = " and id_family=".$_SESSION['FAMILY'];
	$_SESSION['t_stats_accueil'] = array();
}
// recherche du skin par défaut si pas de choix utilisateur
if(!isset( $_SESSION['s_skin'])){ $_SESSION['s_skin'] = 'BROWN_TOP_LEFT'; };

$_SESSION['s_TitreGeneral']='';
$_SESSION['b_Sosa'] = true;
$_SESSION['b_UserPlaceNames']=false;


if (!isset($_SESSION['s_lang'])) { 
	$_SESSION['s_lang'] = 'fra';
}
//echo 'lang= '.$_SESSION['s_lang'];

$_SESSION['s_time'] = $debut;
// pour debugger le déroulement des appels de modules
//echo "Session active est ".session_id()." - Module Index.php at ".microtime(true).' sec'."<br/>"; 
// debug(get_defined_vars());
// echo "les constantes";
// debug(get_defined_constants(true));

new Dispatcher(); 

?>


