2
0
Fork 0
Iglou.eu_cms_old/Include/ErrorsManager.inc.php

31 lines
847 B
PHP

<?php
function declareError($arg, $err)
{
$outPut = readJson(cmsConfig('dbErrorsPath'), true);
switch ($err) {
case '404':
$outPut = contentLanguage($outPut[$err]);
$outPut = str_replace('[!PAGE_VAR!]', $arg, $outPut);
break;
case 'Nfound':
$outPut = contentLanguage($outPut[$err]);
$outPut = str_replace('[:NFOUND:]', $arg, $outPut);
break;
default:
exit('ErrorsManager.inc.php => Bad type error on '.$err);
break;
}
return ($outPut);
}
function phpChecker()
{
$actualPhp = phpversion();
if (version_compare($actualPhp, REQUIRED_PHP_VERSION, '<')) {
exit('Ouups => '.$actualPhp.', Your php version is too old. This script require PHP V: '.REQUIRED_PHP_VERSION.' or newer, sorry.');
}
}