Files
Chamilo/custompages/index-unlogged-dist.php
T
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

57 lines
1.8 KiB
PHP

<?php
/* For licensing terms, see /license.txt */
/**
* Redirect script.
*/
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
require_once __DIR__.'/language.php';
$template = new Template(get_lang('SignIn'), false, false, false, false, true, true);
/**
* Homemade micro-controller.
*/
if (isset($_GET['loginFailed'])) {
if (isset($_GET['error'])) {
switch ($_GET['error']) {
case 'account_expired':
$error_message = get_lang('AccountExpired');
break;
case 'account_inactive':
$error_message = get_lang('AccountInactive');
break;
case 'user_password_incorrect':
$error_message = get_lang('InvalidId');
break;
case 'access_url_inactive':
$error_message = get_lang('AccountURLInactive');
break;
default:
$error_message = get_lang('InvalidId');
}
} else {
$error_message = get_lang('InvalidId');
}
}
if (isset($error_message)) {
$template->assign('error', $error_message);
}
$flash = Display::getFlashToString();
Display::cleanFlashMessages();
if (api_get_setting('allow_registration') === 'true') {
$urlRegister = api_get_path(WEB_CODE_PATH).'auth/inscription.php?language='.api_get_interface_language();
$template->assign('url_register', $urlRegister);
}
$urlLostPassword = api_get_path(WEB_CODE_PATH).'auth/lostPassword.php?language='.api_get_interface_language();
$template->assign('url_lost_password', $urlLostPassword);
$template->assign('mgs_flash', $flash);
$layout = $template->get_template('custompage/login.tpl');
$content = $template->fetch($layout);
$template->assign('content', $content);
$template->display_blank_template();