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 .= "
\n"; $content .= renderNotices(getNotices()); if ($infs) { $content .= "
\n"; $content .= "\n"; foreach ($infs as $i => $inf) { $content .= "
\n"; $content .= "
\n"; $content .= "
\n"; if ($inf['status'] > 0) { if ($inf['status'] > 1) { $content .= form_button('infuse', $locale['416'], $inf['folder'], ['class' => 'btn-info m-t-5 btn-sm infuse', 'icon' => 'fa fa-cube']); } else { $content .= form_button('defuse', $locale['411'], $inf['folder'], ['class' => 'btn-default btn-sm m-t-5 defuse', 'icon' => 'fa fa-trash']); } } else { $content .= form_button('infuse', $locale['401'], $inf['folder'], ['class' => 'btn-primary btn-sm m-t-5 infuse', 'icon' => 'fa fa-magnet']); } $content .= "
\n"; $content .= "
".$inf['name']."
".trimlink($inf['description'], 30)."
\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "
\n
\n"; } } else { $content .= "

".$locale['417']."

\n"; } $content .= "
\n
\n"; self::$step = [ 1 => [ 'class' => 'pull-right btn-success', 'name' => 'step', 'label' => self::$locale['setup_0120'], 'value' => self::STEP_EXIT ], ]; } else { redirect(FUSION_REQUEST); } } return $content; } }