{DESCRIPTION} {CODE}
Chamilo Homepage';
$PoweredBy = 'Powered by Chamilo © '.date('Y');
/**
* English language variables.
*/
// Sections.
$SectionSystemRequirementsProblem = 'System requirements problem';
$SectionInstallation = 'Installation';
$SectionDatabaseUnavailable = 'Database is unavailable';
$SectionTechnicalIssues = 'Technical issues';
$SectionProtection = 'Protection measure';
// Error code.
$ErrorCode = 'Error code';
// Error code 1.
$IncorrectPhpVersionTitle = 'Incorrect PHP version';
$IncorrectPhpVersionDescription = 'Warning: we have detected that your version of PHP is %s1. To install Chamilo, you need to have PHP %s2 or superior. If you don\'t know what we\'re talking about, please contact your hosting provider or your support team.
%s3 Read the installation guide.';
// Error code 2.
$InstallationTitle = 'Chamilo has not been installed';
$InstallationDescription = 'Click to INSTALL Chamilo %s or read the installation guide';
// Error code 3.
// Error code 4.
// Error code 5.
$DatabaseUnavailableTitle = 'Database is unavailable';
$DatabaseUnavailableDescription = 'This portal is currently experiencing database issues. Please report this to the portal administrator. Thank you for your help.';
// Error code 6.
$AlreadyInstalledTitle = 'Chamilo has already been installed';
$AlreadyInstalledDescription = 'The system has already been installed. In order to protect its contents, we have to prevent you from starting the installation script again. Please return to the main page.';
// Unspecified error.
$TechnicalIssuesTitle = 'Technical issues';
$TechnicalIssuesDescription = 'This portal is currently experiencing technical issues. Please report this to the portal administrator. Thank you for your help.';
if (is_int($global_error_code) && $global_error_code > 0) {
if (class_exists('Template') && function_exists('api_get_configuration_value')) {
$theme = Template::getThemeFallback().'/';
} else {
$theme = 'chamilo';
}
$root_rel = '';
$installation_guide_url = $root_rel.'documentation/installation_guide.html';
$css_list = [
'public/build/vendor.css',
'public/build/css/app.css',
'public/build/css/base.css',
'public/build/css/themes/'.$theme.'/default.css',
];
$web_img = 'main/img';
$root_sys = str_replace('\\', '/', realpath(__DIR__.'/../../')).'/';
$css_def = '';
foreach ($css_list as $cssFile) {
$cssFile = $root_sys.$cssFile;
if (file_exists($cssFile)) {
$css_def .= file_get_contents($cssFile);
}
}
$global_error_message = [];
switch ($global_error_code) {
case 1:
$global_error_message['section'] = $SectionSystemRequirementsProblem;
$global_error_message['title'] = $IncorrectPhpVersionTitle;
$php_version = function_exists('phpversion') ? phpversion() : (defined('PHP_VERSION') ? PHP_VERSION : '');
$php_version = empty($php_version) ? '' : '(PHP '.$php_version.')';
$IncorrectPhpVersionDescription = str_replace('%s1', $php_version, $IncorrectPhpVersionDescription);
$IncorrectPhpVersionDescription = str_replace('%s2', REQUIRED_PHP_VERSION, $IncorrectPhpVersionDescription);
$pos = strpos($IncorrectPhpVersionDescription, '%s3');
if ($pos !== false) {
$length = strlen($IncorrectPhpVersionDescription);
$read_installation_guide = substr($IncorrectPhpVersionDescription, $pos + 3, $length);
$IncorrectPhpVersionDescription = substr($IncorrectPhpVersionDescription, 0, $pos);
$IncorrectPhpVersionDescription .= '
'.$read_installation_guide.'';
}
$global_error_message['description'] = $IncorrectPhpVersionDescription;
break;
case 2:
require __DIR__.'/../install/version.php';
$global_error_message['section'] = $SectionInstallation;
$global_error_message['title'] = $InstallationTitle;
if (($pos = strpos($InstallationDescription, '%s')) === false) {
$InstallationDescription = 'Click to INSTALL Chamilo %s or read the installation guide';
}
$read_installation_guide = substr($InstallationDescription, $pos + 2);
$versionStatus = (!empty($new_version_status) && $new_version_status != 'stable' ? $new_version_status : '');
$InstallationDescription = '
{DESCRIPTION} {CODE}