mirror of
https://github.com/YunoHost-Apps/pluxml_ynh.git
synced 2024-09-03 20:16:02 +02:00
67 lines
No EOL
2.3 KiB
PHP
67 lines
No EOL
2.3 KiB
PHP
<?php
|
|
# ------------------ BEGIN LICENSE BLOCK ------------------
|
|
#
|
|
# This file is part of PluXml : http://www.pluxml.org
|
|
#
|
|
# Copyright (c) 2010-2015 Stephane Ferrari and contributors
|
|
# Copyright (c) 2008-2009 Florent MONTHEL and contributors
|
|
# Copyright (c) 2006-2008 Anthony GUERIN
|
|
# Licensed under the GPL license.
|
|
# See http://www.gnu.org/licenses/gpl.html
|
|
#
|
|
# ------------------- END LICENSE BLOCK -------------------
|
|
|
|
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'));
|
|
|
|
?>
|