2009-02-17 14:14:53 +01:00
|
|
|
|
<?php
|
2009-02-20 16:14:13 +01:00
|
|
|
|
/*
|
2009-09-01 11:19:43 +02:00
|
|
|
|
* Sp<EFBFBD>cification des chemins d'include
|
2009-02-20 16:14:13 +01:00
|
|
|
|
* Remplacement du php_value include_path dans le .htaccess
|
|
|
|
|
* Attention <EFBFBD> bien placer l'include_path dans le php.ini
|
2009-03-20 18:33:40 +01:00
|
|
|
|
* Pour windows/wamp : include_path = ".;c:\wamp\bin\php\php-X.X.X\PEAR"
|
2009-02-20 16:14:13 +01:00
|
|
|
|
* Pour serveur linux : include_path = ".:/usr/share/php"
|
|
|
|
|
*/
|
2009-09-01 11:19:43 +02:00
|
|
|
|
// TODO : Placer le r<>pertoire framework dans le r<>pertoire includes pour limiter les inclusions de r<>pertoire
|
2009-07-21 09:56:58 +02:00
|
|
|
|
ini_set('include_path',
|
|
|
|
|
ini_get('include_path') . PATH_SEPARATOR .
|
|
|
|
|
realpath(dirname(__FILE__) . '/../framework/') . PATH_SEPARATOR .
|
|
|
|
|
realpath(dirname(__FILE__) . '/../includes/')
|
2009-02-20 14:04:46 +01:00
|
|
|
|
);
|
2009-02-17 14:14:53 +01:00
|
|
|
|
|
2009-09-01 11:19:43 +02:00
|
|
|
|
// Lecture du fichier de configuration
|
2009-07-21 09:56:58 +02:00
|
|
|
|
require_once realpath(dirname(__FILE__)).'/config.inc';
|
2009-09-01 11:19:43 +02:00
|
|
|
|
|
|
|
|
|
// D<>marrage des statistiques
|
2009-07-21 16:41:56 +02:00
|
|
|
|
require_once 'debug/bench.php';
|
2009-02-17 14:14:53 +01:00
|
|
|
|
|
2009-09-01 11:19:43 +02:00
|
|
|
|
// Classe de g<>n<EFBFBD>ration des graphiques perso (N<>cessaire pour la page synthese_perso.php)
|
|
|
|
|
require_once 'ratios/Graphperso.php';
|
|
|
|
|
|
|
|
|
|
// Chargement de la classe de debuggage
|
2009-04-03 17:25:57 +02:00
|
|
|
|
require_once 'FirePHPCore/FirePHP.class.php';
|
2009-09-01 11:19:43 +02:00
|
|
|
|
|
|
|
|
|
// D<>marrage de l'environnement
|
2009-03-04 16:39:59 +01:00
|
|
|
|
ob_start();
|
|
|
|
|
$firephp = FirePHP::getInstance(true);
|
2009-04-03 17:25:57 +02:00
|
|
|
|
|
2009-07-20 18:17:33 +02:00
|
|
|
|
if(ENVIRONNEMENT == 'PRD')
|
2009-04-03 17:25:57 +02:00
|
|
|
|
{
|
|
|
|
|
$firephp->setEnabled(false);
|
|
|
|
|
ini_set('error_reporting', 0);
|
|
|
|
|
}
|
|
|
|
|
elseif(ENVIRONNEMENT == 'DEV')
|
|
|
|
|
{
|
2009-07-20 18:17:33 +02:00
|
|
|
|
$firephp->setEnabled(true); //Debuggage activ<69> par defaut
|
2009-05-05 17:52:06 +02:00
|
|
|
|
//ini_set('error_reporting', E_ALL ^ E_NOTICE);
|
2009-04-03 17:25:57 +02:00
|
|
|
|
}
|
2009-03-04 16:39:59 +01:00
|
|
|
|
|
2009-07-21 16:41:56 +02:00
|
|
|
|
/** On ne prend l'heure qu'une seule fois par script PHP et on initialise des constantes.
|
|
|
|
|
*
|
|
|
|
|
* DATETIME YmdHis
|
|
|
|
|
* DATETIME_LOG Y-m-d H:i:s Date du jour pour les insertions en BDD
|
|
|
|
|
* NOW His Heure d'ex<EFBFBD>cution du script
|
|
|
|
|
* NOW_FORMAT H:i:s Heure d'ex<EFBFBD>cution du script
|
|
|
|
|
* TODAY Ymd Ann<EFBFBD>e, Mois, Jour d'ex<EFBFBD>cution du script
|
|
|
|
|
* TODAY_FORMAT Y-m-d
|
|
|
|
|
* TODAY_AFF d/m/Y
|
2009-02-17 14:14:53 +01:00
|
|
|
|
*/
|
2009-07-21 16:41:56 +02:00
|
|
|
|
define ('DATETIME', date('YmdHis'));
|
|
|
|
|
define ('DATETIME_LOG', substr(DATETIME,0,4).'-'.substr(DATETIME, 4,2).'-'.substr(DATETIME, 6,2).' '.substr(DATETIME,8,2).'-'.substr(DATETIME,10,2).'-'.substr(DATETIME,12,2) );
|
|
|
|
|
define ('TODAY', substr(DATETIME,0,8));
|
|
|
|
|
define ('NOW', substr(DATETIME,8,6));
|
|
|
|
|
define ('TODAY_FORMAT', substr(DATETIME,0,4).'-'.substr(DATETIME,4,2).'-'.substr(DATETIME,6,2));
|
|
|
|
|
define ('TODAY_AFF', substr(DATETIME,6,2).'/'.substr(DATETIME,4,2).'/'.substr(DATETIME,0,4));
|
|
|
|
|
define ('NOW_FORMAT', substr(DATETIME,8,2).':'.substr(DATETIME,10,2).':'.substr(DATETIME,12,2));
|
2009-02-17 14:14:53 +01:00
|
|
|
|
|
2009-09-01 11:19:43 +02:00
|
|
|
|
// D<>marrage de la session
|
2009-07-21 16:41:56 +02:00
|
|
|
|
session_start();
|
2009-02-17 14:14:53 +01:00
|
|
|
|
|
|
|
|
|
?>
|