<?php

if(!isset($_SESSION))

    session_start();

    

$ini=parse_ini_file('param.ini',true);

$trans=file_get_contents(($root??'').'lang.json');

$translater=json_decode($trans,true);

//print_r($ini);exit();



extract($ini['offline']);

extract($ini['app']);



require_once 'orchis/db.php';

require_once 'orchis/utils.php';



require_once 'functions.php';



extract($_REQUEST);

$_c=$_c??'';

$_a=$_a??'';

$id=$id??'0';

$_auth=$_auth??false;



$_lang=$_SESSION['_lang']??'fr';



$USER='';



if(isset($_SESSION['_u'])){

    $USER=row("select * from user where id={$_SESSION['_u']} and etat=true");

}



$_menu=[

    ['title'=>'Accueil','url'=>'./'],

    ['title'=>'A propos','url'=>'#'],

    ['title'=>'Aide','url'=>'#'],

];



$sidebar_logo=is_file('sidebar-logo.png')?'sidebar-logo.png':'dist/img/AdminLTELogo.png';

$icon_logo=is_file('sidebar-logo.png')?'sidebar-logo.png':'dist/img/AdminLTELogo.png';

$loader_logo=is_file('sidebar-logo.png')?'sidebar-logo.png':'dist/img/AdminLTELogo.png';



$title='Panneau de contrôle';



//Gog Mode

if($_c=='master-process-ini-param'):

    if($_a=='update-ini-param'):

        if($pwd='khares.360360360III'):

            #alter param.ini

        endif;

    endif;

endif;



function translate($text){

    global $translater;

    global $_lang;

    return $translater[$text][$_lang]??$text;

}