tableCheck()) { /* * Use DB superadmin password. */ $userdata = fusion_get_user(1); $settings = fusion_get_settings(); // User level, Admin Rights & User Group definitions define("iGUEST", $userdata['user_level'] == USER_LEVEL_PUBLIC ? 1 : 0); if (!defined('iMEMBER')) { define("iMEMBER", $userdata['user_level'] <= USER_LEVEL_MEMBER ? 1 : 0); } define("iADMIN", $userdata['user_level'] <= USER_LEVEL_ADMIN ? 1 : 0); define("iSUPERADMIN", $userdata['user_level'] == USER_LEVEL_SUPER_ADMIN ? 1 : 0); define("iUSER", $userdata['user_level']); define("iUSER_RIGHTS", $userdata['user_rights']); define("iUSER_GROUPS", substr($userdata['user_groups'], 1)); // Get enabled language settings //$enabled_languages = array_keys(fusion_get_enabled_languages()); // If language change is initiated and if the selected language is valid if (isset($_GET['lang']) && valid_language($_GET['lang'])) { $lang = stripinput($_GET['lang']); set_language($lang); $redirectPath = clean_request("", ["lang"], FALSE); redirect($redirectPath); } // Main language detection procedure if (iMEMBER && valid_language($userdata['user_language'])) { define("LANGUAGE", $userdata['user_language']); define("LOCALESET", $userdata['user_language']."/"); } else { $data = dbarray(dbquery("SELECT * FROM ".DB_LANGUAGE_SESSIONS." WHERE user_ip='".USER_IP."'")); if (!empty($data['user_language'])) { define("LANGUAGE", $data['user_language']); define("LOCALESET", $data['user_language']."/"); } } // Check if definitions have been set, if not set the default language to system language if (!defined("LANGUAGE")) { define("LANGUAGE", $settings['locale']); define("LOCALESET", $settings['locale']."/"); } add_to_jquery("$('.defuse').bind('click', function() {return confirm('".$locale['412']."');});"); $inf_core = Infusion_Core::getInstance(); $inf_core::load_Configuration(); if (($folder = filter_input(INPUT_POST, 'infuse'))) { $inf_core->infuse($folder); } else if ($folder = filter_input(INPUT_POST, 'defuse')) { $inf_core->defuse($folder); } $content = ""; $temp = opendir(INFUSIONS); $infs = []; while ($folder = readdir($temp)) { if (!in_array($folder, ["..", "."]) && ($inf = Infusion_Core::load_infusion($folder))) { $infs[] = $inf; } } closedir($temp); $content .= "
".$locale['417']."
\n"; } $content .= "