<?php
define('NTLCMS', 1);
$module = 'error';
include ('../system/start.php');
include ('../system/function.php');
include ('../system/antidos.php');
include ('../system/head.php');
################################################################################
if (isset($_GET['mistake']) && !filter_var($_GET['mistake'], FILTER_VALIDATE_INT) === false){
$errors = isset($_GET['mistake']) ? filter_var($_GET['mistake'], FILTER_SANITIZE_NUMBER_INT) : '0';
################################################################################
echo '<div class="title"><b>'.razd.' Ошибка '.$errors.'</b></div>';
################################################################################

?><style type="text/css">
h1 { font-size: 100px; color: #000000; margin: 1px 0 0 0;}
h2 { color: #DE6C5D; font-family: arial; font-size: 20px; font-weight: bold; letter-spacing: -1px; margin: -3px 0 39px;}
</style><?

    if ($errors == '400'){ echo '<div class="menu"><center><h1>400</h1><h2>Bad Request!</h2></center></div>'; }
elseif ($errors == '401'){ echo '<div class="menu"><center><h1>401</h1><h2>Unauthorized!</h2></center></div>'; }
elseif ($errors == '402'){ echo '<div class="menu"><center><h1>402</h1><h2>Payment Required!</h2></center></div>'; }
elseif ($errors == '403'){ echo '<div class="menu"><center><h1>403</h1><h2>Forbidden!</h2></center></div>'; }
elseif ($errors == '404'){ echo '<div class="menu"><center><h1>404</h1><h2>Not Found!</h2></center></div>'; }
elseif ($errors == '500'){ echo '<div class="menu"><center><h1>500</h1><h2>Internal Server Error!</h2></center></div>'; }
elseif ($errors == '502'){ echo '<div class="menu"><center><h1>502</h1><h2>Bad Gateway!</h2></center></div>'; }
} else {
echo '<div class="title"><center>Неизвестная ошибка</center></div>';
echo '<div class="menu"><center><h1>???</h1><h2>Unknown Error!</h2></center></div>';
}

echo '<div class="block"><i class="fa fa-home fa-fw"></i> '.(isset($active) ? '<a href="'.URL.'/cabinet">В кабинет</a>' : '<a href="'.URL.'">На главную</a>').'</div>';

include ('../system/foot.php');
?>