div.container_login { animation: container_login 3s ease; } @keyframes container_login { 0% { transform: scale(.9); opacity: 0.1; } 100% { transform: scale(1); opacity: 1; } } '; } 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: 100% 100% !important; '; } if (empty($config['login_background']) === false) { $background_url = 'images/backgrounds/'.$config['login_background']; $background_100 = 'background-size: 100% 100% !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; } $login_body_style = 'style="'.$background_100.'background: linear-gradient(rgba(0,0,0,.'.$opacity.'), rgba(0,0,0,.'.$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.