@keyframes login_move { from {margin-left: 10%;margin-right: 10%;opacity:0.1} to {margin-left: 5%;margin-right: 5%;opacity:1} } div.container_login{ animation-name: login_move; animation-duration: 3s; } '; } 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': $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 = ''; $login_body_class = ''; // Overrides the default background with the defined by the user. if (!empty($config['login_background'])) { $background_url = 'images/backgrounds/'.$config['login_background']; $login_body_style = "style=\"background:linear-gradient(74deg, rgba(2, 2, 2, 0.333) 36%, transparent 36%), url('".$background_url."');\""; } // Support for Internet Explorer and Microsoft Edge browsers if (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Edge') !== false) { $login_body_class = "class='login_body_trident'"; } // 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 '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '').'
'; echo '
'; if (empty($process_error_message) && isset($mail)) { echo '
'; echo '
'; echo '
'; echo html_print_image('images/icono_logo_pandora.png', true, ['alt' => __('Password reset'), 'border' => 0]); echo '
'; echo '
'; echo '
'; echo '

'.__('INFO').'

'; echo '

'.__('An email has been sent to your email address').'

'; echo '
'; echo '
'; html_print_submit_button('Ok', 'reset_correct_button', false); echo '
'; echo '
'; echo '
'; echo '
'; } else if (isset($process_error_message) && !empty($process_error_message)) { echo '
'; echo '
'; echo '
'; echo html_print_image('images/icono_stop.png', true, ['alt' => __('Password reset'), 'border' => 0]); echo '
'; echo '
'; echo '
'; echo '

'.__('ERROR').'

'; echo '

'.$process_error_message.'

'; echo '
'; echo '
'; html_print_submit_button('Ok', 'reset_correct_button', false); echo '
'; echo '
'; echo '
'; echo '
'; } if (isset($correct_reset_pass_process)) { echo '
'; echo '
'; echo '
'; echo html_print_image('images/icono_logo_pandora.png', true, ['alt' => __('Password reset'), 'border' => 0]); echo '
'; echo '
'; echo '
'; echo '

'.__('SUCCESS').'

'; echo '

'.$correct_reset_pass_process.'

'; echo '
'; echo '
'; html_print_submit_button('Ok', 'final_process_correct_button', false); echo '
'; echo '
'; echo '
'; echo '
'; } if (isset($login_failed)) { $nick = get_parameter_post('nick'); $fails = db_get_value('failed_attempt', 'tusuario', 'id_user', $nick); $attemps = ($config['number_attempts'] - $fails); echo '
'; echo '
'; echo '
'; echo html_print_image('images/icono_stop.png', true, ['alt' => __('Login failed'), 'border' => 0]); echo '
'; echo '
'; echo '
'; echo '

'.__('ERROR').'

'; echo '

'.$config['auth_error'].'

'; echo '
'; if ($config['enable_pass_policy']) { echo '
'; echo '

Remaining attempts: '.$attemps.'

'; echo '
'; } echo '
'; html_print_submit_button('Ok', 'hide-login-error', false); echo '
'; echo '
'; echo '
'; echo '
'; } if ($login_screen == 'logout') { echo '
'; echo '
'; echo '
'; echo html_print_image('images/icono_logo_pandora.png', true, ['alt' => __('Logged out'), 'border' => 0]); echo '
'; echo '
'; echo '
'; echo '

'.__('Logged out').'

'; if (empty($config['logout_msg']) === true) { echo '

'.__('Your session has ended. Please close your browser window to close this %s session.', get_product_name()).'

'; } else { echo '

'.__($config['logout_msg']).'

'; } echo '
'; echo '
'; html_print_submit_button('Ok', 'hide-login-logout', false); echo '
'; echo '
'; echo '
'; echo '
'; } switch ($login_screen) { case 'error_dbconfig': case 'error_authconfig': if (!isset($config['rb_product_name_alt'])) { $title = __('Problem with %s database', get_product_name()); } else { $title = __('Problem with %s database', $config['rb_product_name_alt']); } $message = __( 'Cannot connect to the database, please check your database setup in the include/config.php file.

Probably your database, hostname, user or password values are incorrect or the database server is not running.' ).'

'; $message .= ''; $message .= ''.__('DB ERROR').':
'; $message .= db_get_last_error(); $message .= '
'; if ($error_code == 'error_authconfig') { $message .= '

'; $message .= __('If you have modified the auth system, the origin of this problem could be that %s cannot override the authorization variables from the config database. Please remove them from your database by executing:
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.

Most likely your database schema has been created but there are is no data in it, you have a problem with the database access credentials or your schema is out of date.

%s Console cannot find include/config.php or this file has invalid permissions and HTTP server cannot read it. Please read documentation to fix this problem.
', get_product_name() ).'

'; break; case 'error_noconfig': $title = __('No configuration file found'); $message = __( '%s Console cannot find include/config.php or this file has invalid permissions and HTTP server cannot read it. Please read documentation to fix this problem.', get_product_name() ).'

'; if (file_exists('install.php')) { $link_start = ''; $link_end = ''; } else { $link_start = ''; $link_end = ''; } $message .= sprintf(__('You may try to run the %sinstallation wizard%s to create one.'), $link_start, $link_end); break; case 'error_install': $title = __('Installer active'); $message = __( 'For security reasons, normal operation is not possible until you delete installer file. Please delete the ./install.php file before running %s Console.', get_product_name() ); break; case 'error_perms': $title = __('Bad permission for include/config.php'); $message = __( 'For security reasons, config.php must have restrictive permissions, and "other" users should not read it or write to it. It should be written only for owner (usually www-data or http daemon user), normal operation is not possible until you change permissions for include/config.php file. Please do it, it is for your security.' ); break; case 'homedir_bad_defined': $title = __('Bad defined homedir'); $message = __('In the config.php file in the variable $config["homedir"] = add the correct path'); break; case 'homeurl_bad_defined': $title = __('Bad defined homeurl or homeurl_static'); $message = __('In the config.php file in the variable $config["homeurl"] or $config["homeurl_static"] = add the correct path'); break; } if ($login_screen == 'error_authconfig' || $login_screen == 'error_emptyconfig' || $login_screen == 'error_install' || $login_screen == 'error_dbconfig' || $login_screen == 'error_noconfig' || $login_screen == 'error_perms' || $login_screen == 'homedir_bad_defined' || $login_screen == 'homeurl_bad_defined' ) { echo ''; } ui_require_css_file('dialog'); ui_require_css_file('jquery-ui.min', 'include/styles/js/'); ui_require_jquery_file('jquery-ui.min'); ui_require_jquery_file('jquery-ui_custom'); ?> 'forced_title_layer', 'class' => 'forced_title_layer', 'hidden' => true]); // html_print_div(array('id' => 'modal_alert', 'hidden' => true)); ?>