:root {'; if ($config['style'] === 'pandora') { echo '--login-background-color: rgba(255, 255, 255, 0.50);'; echo '--login-label-color: #545454;'; echo '--login-text-color: #000;'; $style_theme = 'white-theme'; } else { echo '--login-background-color: rgba(0, 0, 0, 0.8);'; echo '--login-label-color: #c5c5c5;'; echo '--login-text-color: #fff;'; $style_theme = ''; } echo '} '; if ($config['visual_animation']) { // form#login_form, div.login_data { echo ''; } if (!isset($login_screen)) { $login_screen = 'login'; } switch ($login_screen) { case 'login': $logo_link = 'http://www.pandorafms.com'; $logo_title = __('Go to %s Website', get_product_name()); break; case 'logout': case 'double_auth': case 'error_install': case 'error_authconfig': case 'error_dbconfig': case 'error_noconfig': case 'error_perms': case 'homedir_bad_defined': case 'homeurl_bad_defined': case 'disabled_access_node': $logo_link = 'index.php'; $logo_title = __('Go to Login'); break; default: error_reporting(0); $error_info = ui_get_error($login_screen); $logo_link = 'index.php'; $logo_title = __('Refresh'); break; } $splash_title = __('Splash login'); $url = '?login=1'; // These variables come from index.php if (!empty($page) && !empty($sec)) { foreach ($_GET as $key => $value) { $url .= '&'.safe_url_extraclean($key).'='.safe_url_extraclean($value); } } $login_body_style = ''; // Overrides the default background with the defined by the user. $background_url = 'images/backgrounds/background_pandora_console_keys.jpg'; if (empty($config['random_background']) === false) { $random_backgrounds = scandir($config['homedir'].'/images/backgrounds/random_backgrounds'); unset($random_backgrounds[0], $random_backgrounds[1]); $random_background = array_rand($random_backgrounds); $background_url = 'images/backgrounds/random_backgrounds/'.$random_backgrounds[$random_background]; $background_100 = 'background-size: cover !important; background-position: center !important; '; } if (empty($config['login_background']) === false) { $background_url = 'images/backgrounds/'.$config['login_background']; $background_100 = 'background-size: cover !important; background-position: center !important; '; } // Support for Internet Explorer and Microsoft Edge browsers if (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Edge') !== false) { $background_url = 'images/backgrounds/background_pandora_console_keys.jpg'; $background_100 = ''; } if (empty($config['background_opacity']) === false) { $opacity = $config['background_opacity']; } else { $opacity = 30; } if ($config['style'] === 'pandora') { $opacity_color = '255, 255, 255, .'; } else { $opacity_color = '0, 0, 0, .'; } $login_body_style = 'style="'.$background_100.'background: linear-gradient(rgba('.$opacity_color.$opacity.'), rgba('.$opacity_color.$opacity.")), url('".$background_url."');\""; // Get alternative custom in case of db fail. $custom_fields = [ 'custom_logo_login', 'custom_splash_login', 'custom_title1_login', 'custom_title2_login', 'rb_product_name', 'custom_docs_url', 'custom_support_url', ]; foreach ($custom_fields as $field) { if (!isset($config[$field])) { if (isset($config[$field.'_alt'])) { $config[$field] = $config[$field.'_alt']; $custom_conf_enabled = true; } } } // Get the custom icons. $docs_logo = ui_get_docs_logo(); $support_logo = ui_get_support_logo(); echo '
DELETE FROM tconfig WHERE token = "auth";', get_product_name()); } break; case 'error_emptyconfig': $title = __('Empty configuration table'); $message = __( 'Cannot load configuration variables from database. Please check your database setup in the include/config.php file.