<?php

/**------------------------------------------------
*
* Rooty, 2018 <rooty@rooty.me>
*
*
* This software is protected by copyright, please
* read the file COPYRIGHT.
* 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. Please
* read the file LICENCE.
*
* Fichier index.php
*
* Fichier d'execution du système
*
* @author Rooty <www.rooty.me|rooty@rooty.me>
* @link www.rooty.me
* @since 2018/07/01
* @version 0.3
* @copyright Copyright &copy; 2009-2018, Rooty
* @package services_systeme
* @docreview Tristan <tristan@initiance.com> | 30-10-2005
*/

#####################################################################################################
### Déclaration de variables et constantes
#####################################################################################################

/**
* Doit être déclaré pour que les librairies fonctionnent
*/
define('SYSTEM_IN', true);

$COMMUN_PATH_CONFIG=""; /* chemin vers les fichiers de configuration */
$CONF_LIB_PATH =""; 	/* chemin des librairies */

#####################################################################################################
### Inclusion du contrôle d'installation
#####################################################################################################

if( file_exists($CONF_LIB_PATH."config/installcontrol.php") )
	include($CONF_LIB_PATH."config/installcontrol.php");

if ( !defined('QWARE_INSTALLED') )
{
	header("location:install/index.php");
	exit;
}

#####################################################################################################
### Déclaration des entêtes
#####################################################################################################

/* Configuration des Headers */
header("Content-type: text/html; charset=utf-8");		  // Validation XTML
header("Cache-Control: no-cache, must-revalidate");           // HTTP/1.1
header("Pragma: no-cache");

#####################################################################################################
### Inclusion du contrôle du système (système en lui même)
#####################################################################################################

include($CONF_LIB_PATH."lib/system/system_control/systemcontrol.php");

/**
* Création du systemControl
*<P>celui-ci se configure en fonction des autres éléments implémentés</P>
*/
$GLOBALS["SYSTEM_CONTROL"]=new SystemControl();

/**
* Exécute l'opération demandée, ferme les connexions et envoit la page demandée
*/
$GLOBALS["SYSTEM_CONTROL"]->execute();
?>