400, 401, 403, 500, 404 DLE

404, 401, 400, 403, 500 DataLife Engine.

".htaccess" :

RewriteEngine On

:

ErrorDocument 400 http://site.ru/index.php?do=found&400
ErrorDocument 401 http://site.ru/index.php?do=found&401
ErrorDocument 403 http://site.ru/index.php?do=found&403
ErrorDocument 500 http://site.ru/index.php?do=found&500
ErrorDocument 404 http://site.ru/index.php?do=found&404


.

"engine/engine.php" :

switch ($do) {

:

case "found":
if(isset($_GET['400'])) {
$title=" (400)";
$e=400;
}elseif(isset($_GET['401'])) {
$title=" (401)";
$e=401;
}elseif(isset($_GET['403'])) {
$title=" (403)";
$e=403;
}elseif(isset($_GET['404'])) {
$title=" (404)";
$e=404;
}elseif(isset($_GET['500'])) {
$title=" (500)";
$e=500;
}else {
$title=" (404)";
$e=404;
}

$metatags['title'] = " - {$title}";

$tpl->load_template( $e.'.tpl' );
$tpl->compile( 'content' );
break;


400.tpl, 401.tpl, 403.tpl, 500.tpl, 404.tpl :)