<?php
/*
Copyright (C) 2008 by oscim   Project lossim  [ 15.09.2009, 09:17:59] @oscim
// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
ENCODE UTF-8
*/
error_reporting(E_ALL);
require("../include/sys_config.php"); // general
require("config/sys_config.php"); // spe admin
require("config/sys_path.php"); // spe admin
var_config_cst($_PX_config,'');
require_once ("../include/sys_config_modules.php");
var_config_cst(module_actif_dyn($_PX_config_module),'PX_config_module');
require("config/sys_folder.php");
var_config_cst($folder,'');
// var_config_cst($filename,'');
require("../include/sys_tbl_sql.php");
var_config_cst($TBL,'');
require ('../'.TBL_CONFIG_GEN);
var_config_cst(@$_Config_gen,'CG');
_prefix_chemin();
require("include/inc/nett_acen.inc");
require("include/class/class.files.php");
require("include/class/class.HDAcache.php");
require("include/class/class.constructeur.php");
require(ADD_PATH_ADMIN._FORM_LIB_LIB_FROM);
$lg=appel_lang();
## Appel du fichier perso de lutilisateur
if(!@include ("config/users/".$_SESSION['hash_acces_utilisateur'].".inc")) redirect();
$_user_perso_= $_perso_; // reatributoin des droit utilisateur
var_config_cst($_perso_,'_user_perso_');

if (!is_register_session('cache_expire')) {
  add_in_session('messageToStack',  (isset($_perso_['duree_session']) ? $_perso_['duree_session']: '38000' ) );
}

// $_SESSION['cache_expire']= (isset($_perso_['duree_session'])) ? $_perso_['duree_session']: '38000';
if (!isset($_GET['page_admin'])) { /* Prise en charge sans htaccess*/
  $retour_dest=NewFct('extract_nom',"");
  $page_admin=$dest=(!isset($retour_dest['file'])) ? $retour_dest['file']: 'admin';
} else $dest=$page_admin;

/* Tempalte admin */
if (defined('_USER_PERSO__THEME') && file_exists('template/'._USER_PERSO__THEME))define('TEMPLATE_ADMIN',_USER_PERSO__THEME);
else define('TEMPLATE_ADMIN',THEME_ADMIN);
define_img();

## init,array js_init Tableau transportant element pour js ecrit dynamiquement en fin de page
$function_js_init=$js_lib=array();

/* LAng */
reset($lg);
while($r=each($lg))
  if ($r['value']['lang'] == trim(_USER_PERSO__PREF_LANGUAGE)){
    define('LANG_POST',$r['key']);
    define('LANG_ADMIN',$r['value']['lang']);
  }

  /**linguistique generaux */
$reponse=@include("./include/language/".LANG_ADMIN.".php");
if (!$reponse)require ("./include/language/french.php");
##   linguistique de la page appelé.
$reponse=@include("./include/language/".LANG_ADMIN."/".$page_admin.".php");
if (!$reponse)require ("./include/language/french/".$page_admin.".php");



/// constrcuteur de page
$cstr=new constructeur($page_admin);
/// obj  posts
$cstr->_add_class('db',_BO_CLASS .'class.db.php');
$cstr->_add_class('db_lang',_BO_CLASS .'class.db_lang.php');
// $cstr->_add_class('view_posts',_BO_CLASS .'class.view_posts.php');
$cstr->_add_class('table_block',_BO_CLASS .'class.table_block.php');
$cstr->_add_class('message_stack',_BO_CLASS .'class.message_stack.php');

$cstr->_add_var('lg',$lg);


//! prepa

foreach($_POST as $k => $v){
  $post[$k]=$v;
}
foreach($_GET as $k => $v){
  $post[$k]="$v";
}

?>