1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<?php
define('PLX_ROOT', '../../');
define('PLX_CORE', PLX_ROOT.'core/');
include(PLX_ROOT.'config.php');
include(PLX_CORE.'lib/config.php');
# On verifie que PluXml est installé
if(!file_exists(path('XMLFILE_PARAMETERS'))) {
header('Location: '.PLX_ROOT.'install.php');
exit;
}
# On démarre la session
session_start();
$session_domain = dirname(__FILE__);
if(!defined('PLX_AUTHPAGE') OR PLX_AUTHPAGE !== true){ # si on est pas sur la page de login
# Test sur le domaine et sur l'identification
if((isset($_SESSION['domain']) AND $_SESSION['domain']!=$session_domain) OR (!isset($_SESSION['user']) OR $_SESSION['user']=='')){
header('Location: auth.php?p='.htmlentities($_SERVER['REQUEST_URI']));
exit;
}
}
# On inclut les librairies nécessaires
include_once(PLX_CORE.'lib/class.plx.date.php');
include_once(PLX_CORE.'lib/class.plx.glob.php');
include_once(PLX_CORE.'lib/class.plx.utils.php');
include_once(PLX_CORE.'lib/class.plx.msg.php');
include_once(PLX_CORE.'lib/class.plx.record.php');
include_once(PLX_CORE.'lib/class.plx.motor.php');
include_once(PLX_CORE.'lib/class.plx.admin.php');
include_once(PLX_CORE.'lib/class.plx.encrypt.php');
include_once(PLX_CORE.'lib/class.plx.medias.php');
include_once(PLX_CORE.'lib/class.plx.plugins.php');
include_once(PLX_CORE.'lib/class.plx.token.php');
# Echappement des caractères
if($_SERVER['REQUEST_METHOD'] == 'POST') $_POST = plxUtils::unSlash($_POST);
# On impose le charset
header('Content-Type: text/html; charset='.PLX_CHARSET);
# Creation de l'objet principal et premier traitement
$plxAdmin = plxAdmin::getInstance();
# Chargement des fichiers de langue en fonction du profil de l'utilisateur connecté
$lang = isset($_SESSION['lang']) ? $_SESSION['lang'] : $plxAdmin->aConf['default_lang'];
loadLang(PLX_CORE.'lang/'.$lang.'/admin.php');
# Hook Plugins
eval($plxAdmin->plxPlugins->callHook('AdminPrepend'));
?>
|