//Init Languange
$lang = new Lang($WebSetting['lang']);
$lang->activateLangSession();
$lang->activateGetSetLang();
//pr($lang);
//pr($_SESSION);
$selected_lang = Lang::getLang();
if (!isset($selected_lang) || $selected_lang == "" || is_object($selected_lang)) {
    $selected_lang = "en";
}
//pr($selected_lang);
//echo "lang/".strtolower($selected_lang).".php";
require_once "lang/" . strtolower($selected_lang) . ".php";
//get globals
$db = $init->getDB();
$params = $init->getParams();
$template = $init->getTemplate();
//theme selection
if (strpos($_GET['url'], 'EfiHome') !== false || $_GET['url'] == "index") {
    $themepath = 'adminlte2';
} else {
    $themepath = ThemeItem::getTheme();
}
$init->setThemeDynamic($themepath);
//include the functions
foreach ($files2Load as $file) {
    //penambahan mold
    if (strpos($file, 'BPlugin') && strpos($file, 'functions.php')) {
        require_once $file;
    }
    //echo $file;echo "<br>";