AEOS Calvarium v0.5
This commit is contained in:
parent
57b531cb62
commit
1fa8b9e152
177 changed files with 2936 additions and 3386 deletions
30
lib/config.lib.php
Executable file → Normal file
30
lib/config.lib.php
Executable file → Normal file
|
|
@ -1,21 +1,22 @@
|
|||
<?php
|
||||
/* ***************************************************
|
||||
Listings des variables les plus utilisées sous AEOS.
|
||||
Listings des variables les plus utilis<EFBFBD>es sous AEOS.
|
||||
****************************************************/
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
date_default_timezone_set("Europe/Paris");
|
||||
|
||||
//Check Admin
|
||||
if (preg_match("/admin/", $_SERVER['SCRIPT_FILENAME']) || preg_match("/install/", $_SERVER['SCRIPT_FILENAME']))
|
||||
{
|
||||
$isAdmin = true;
|
||||
$subdir = "../";
|
||||
//Sécurisation
|
||||
foreach ($_GET as $a => $b){$_[$a] = $b;}
|
||||
foreach ($_POST as $a => $b){$_[$a] = $b;}
|
||||
}
|
||||
else
|
||||
{
|
||||
$isAdmin = false;
|
||||
$subdir = "";
|
||||
//Sécurisation
|
||||
foreach ($_GET as $a => $b){$_[$a] = CA20($b);}
|
||||
foreach ($_POST as $a => $b){$_[$a] = CA20($b);}
|
||||
}
|
||||
|
|
@ -40,14 +41,25 @@ for($i=0; $i<$nbPages; ++$i)
|
|||
$ordre_pages[$lecture_tmp['page']['ordre']['#text']] = $listing_pages[$i];
|
||||
}
|
||||
|
||||
// Lecture des utilisateurs si Admin
|
||||
if($isAdmin) $config = lecture_xml($subdir.'data/config.xml');
|
||||
else $config = lecture_xml($subdir.'data/config.xml', TRUE);
|
||||
|
||||
// Lecture des fichiers de bases
|
||||
$config = lecture_xml($subdir.'data/config.xml');
|
||||
$data_pages = $subdir.'data/pages/';
|
||||
if (isset($redirect)) $id=$redirect; else if(empty($_GET['id'])) $id=$config['configuration']['accueil']['#text']; else $id = $_GET['id'];
|
||||
$page = lecture_xml($subdir.'data/pages/'.$lecture_pages[$id].'.xml');
|
||||
|
||||
// Lecture des fichiers optionnels des modules
|
||||
$configModule = lecture_xml($subdir.'modules/'.$page['page']['type']['#text'].'/config.xml');
|
||||
|
||||
|
||||
// Langue
|
||||
require_once($subdir.'lang/'.detectLang().".php");
|
||||
//require_once($subdir.'lang/'.AEOS_LANG.".php");
|
||||
|
||||
// Admin
|
||||
if (isset($_['pid'])) $pid=$_['pid']; else $pid = 1;
|
||||
if (isset($_['sid'])) $sid=$_['sid']; else $sid = 1;
|
||||
?>
|
||||
$admin_url = '';
|
||||
if (isset($_['tab'])) $tab=$_['tab']; else $tab = "dashboard";
|
||||
$admin_url .= 'tab='.$tab;
|
||||
if (isset($_['opt'])) {$opt=$_['opt']; $admin_url .= '&opt='.$opt;} else $opt = NULL;
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue