set_page_title(); } public function set_page_title() { $locale = self::$locale; $sections = Admins::getInstance()->getAdminSections(); $pages = Admins::getInstance()->getAdminPages(); $is_current_page = Admins::getInstance()->getCurrentPage(); if (!empty($sections) && !empty($pages)) { $pages = flatten_array($pages); if (!empty($is_current_page)) { foreach ($pages as $page_data) { if ($page_data['admin_link'] == $is_current_page) { $page_title = $page_data['admin_title']; $page_section = $sections[$page_data['admin_page']]; $page_rights = $page_data['admin_rights']; return [ "title" => $page_section.$locale['global_201'].$page_title, "icon" => "$page_title", ]; } } } } return [ "title" => self::get_locale('artemis_admin'), "icon" => "PHP-Fusion 9", ]; } public static function get_locale($key = NULL) { return $key === NULL ? self::$locale : (isset(self::$locale[$key]) ? self::$locale[$key] : NULL); } public static function add_css($file) { if (file_exists(THEMES."admin_themes/Artemis/css/".$file)) { add_to_head(""); } } public static function get_title() { return self::$page_title; } public static function admin_language_switcher() { $locale = self::get_locale(); $language_opts = ''; if (count(fusion_get_enabled_languages()) > 1) { $language_opts = "\n"; } return $language_opts; } public static function set_static_variables() { $aidlink = fusion_get_aidlink(); $userdata = fusion_get_userdata(); if (file_exists(THEMES."admin_themes/Artemis/locale/".LANGUAGE.".php")) { $locale = fusion_get_locale('', THEMES."admin_themes/Artemis/locale/".LANGUAGE.".php"); } else { $locale = fusion_get_locale('', THEMES."admin_themes/Artemis/locale/English.php"); } if (!empty($locale) && empty(self::$locale)) { foreach ($locale as $locale_key => $locale_value) { self::$locale[$locale_key] = $locale_value; } } self::$userdata = $userdata; self::$aidlink = $aidlink; self::$user_drop = [ BASEDIR."edit_profile.php" => self::$locale['edit']." ".self::$locale['profile'], BASEDIR."profile.php?lookup=".self::$userdata['user_id'] => self::$locale['view']." ".self::$locale['profile'], "---" => "---", FUSION_REQUEST."&logout" => self::$locale['admin-logout'], BASEDIR."index.php?logout=yes" => self::$locale['logout'] ]; } public static function get_udrop() { return self::$user_drop; } public static function get_aidlink() { return self::$aidlink; } public static function get_userdata() { return self::$userdata; } }