500 error update for page
This commit is contained in:
parent
c90a0ca8ea
commit
aee2ab687c
11
500.php
Normal file
11
500.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<section style="margin: 80px 0;">
|
||||||
|
<div class="container">
|
||||||
|
<div class="error_page">
|
||||||
|
<div>
|
||||||
|
<h1>502</h1>
|
||||||
|
<p>Извините, возникла техническая проблема, свяжитесь с нами по телефона <a href="tel:8 8001112233">8 800 111 22 33</a></p>
|
||||||
|
</div>
|
||||||
|
<img src="/images/404.jpg" alt="502" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
@ -100,6 +100,29 @@ function get_ext_from_mime($mime)
|
|||||||
return isset($mime_map[ $mime ]) ? $mime_map[ $mime ] : false;
|
return isset($mime_map[ $mime ]) ? $mime_map[ $mime ] : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use Bitrix\Main\Diag\ExceptionHandlerFormatter;
|
||||||
|
|
||||||
|
class HttpExceptionHandlerOutput extends \Bitrix\Main\Diag\HttpExceptionHandlerOutput
|
||||||
|
{
|
||||||
|
public function renderExceptionMessage($exception, $debug = false)
|
||||||
|
{
|
||||||
|
if ($debug)
|
||||||
|
{
|
||||||
|
echo ExceptionHandlerFormatter::format($exception, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
global $APPLICATION;
|
||||||
|
$APPLICATION->RestartBuffer();
|
||||||
|
$APPLICATION->__view = [];
|
||||||
|
|
||||||
|
include($_SERVER["DOCUMENT_ROOT"] . "/local/templates/500/header.php");
|
||||||
|
include $_SERVER['DOCUMENT_ROOT'] . '/500.php';
|
||||||
|
include($_SERVER["DOCUMENT_ROOT"] . "/local/templates/500/footer.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AddEventHandler("main", "OnEpilog", "OnEpilogHandler", 1);
|
AddEventHandler("main", "OnEpilog", "OnEpilogHandler", 1);
|
||||||
function OnEpilogHandler()
|
function OnEpilogHandler()
|
||||||
{
|
{
|
||||||
@ -113,4 +136,6 @@ function OnEpilogHandler()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\Bitrix\Main\Application::getInstance()->getExceptionHandler()->setHandlerOutput(new HttpExceptionHandlerOutput());
|
||||||
|
|
||||||
?>
|
?>
|
||||||
8
local/templates/500/description.php
Normal file
8
local/templates/500/description.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?
|
||||||
|
$arTemplate = array (
|
||||||
|
'NAME' => 'Evolution 500',
|
||||||
|
'DESCRIPTION' => '',
|
||||||
|
'SORT' => '',
|
||||||
|
'TYPE' => '',
|
||||||
|
);
|
||||||
|
?>
|
||||||
4
local/templates/500/footer.php
Normal file
4
local/templates/500/footer.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
</main>
|
||||||
|
<script type="text/javascript">var _ba = _ba || []; _ba.push(["aid", "795284ccab80fb65bbd8aaf8a1472462"]); _ba.push(["host", "185.46.8.240"]); (function () { var ba = document.createElement("script"); ba.type = "text/javascript"; ba.async = true; ba.src = (document.location.protocol == "https:" ? "https://" : "http://") + "bitrix.info/ba.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ba, s); })();</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
82
local/templates/500/header.php
Normal file
82
local/templates/500/header.php
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
|
||||||
|
IncludeTemplateLangFile(__FILE__);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html><html lang="ru">
|
||||||
|
<head>
|
||||||
|
<? CJSCore::Init(array("jquery3")); ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var __cs = __cs || [];
|
||||||
|
__cs.push(["setCsAccount", "<?= COMAGIC_ACCOUNT; ?>"]);
|
||||||
|
</script>
|
||||||
|
<!-- Google Tag Manager -->
|
||||||
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||||
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||||
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||||
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||||
|
})(window,document,'script','dataLayer','<?= GTM_SITE_KEY; ?>');</script>
|
||||||
|
<!-- End Google Tag Manager -->
|
||||||
|
<? $APPLICATION->SetAdditionalCSS("/local/templates/evolution/css/style.css"); ?>
|
||||||
|
<? $APPLICATION->AddHeadScript('/local/templates/evolution/js/react.production.min.js'); ?>
|
||||||
|
<? $APPLICATION->AddHeadScript('/local/templates/evolution/js/react-dom.production.min.js'); ?>
|
||||||
|
<? $APPLICATION->AddHeadScript('/local/templates/evolution/js/babel.min.js'); ?>
|
||||||
|
|
||||||
|
<!--<script src="" crossorigin></script>-->
|
||||||
|
<!--<script src="" crossorigin></script>-->
|
||||||
|
<!--<script src=""></script>-->
|
||||||
|
|
||||||
|
<? $APPLICATION->ShowHead(); ?>
|
||||||
|
<title><? $APPLICATION->ShowTitle(); ?></title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
|
||||||
|
<meta name="msapplication-TileColor" content="#1C01A9" />
|
||||||
|
<meta name="msapplication-TileImage" content="/favicon/favicon_144.png" />
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="/favicon/favicon-16.png" sizes="16x16" />
|
||||||
|
<link rel="icon" type="image/png" href="/favicon/favicon-32.png" sizes="32x32" />
|
||||||
|
<link rel="icon" type="image/png" href="/favicon/favicon_96.png" sizes="96x96" />
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/favicon_57.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/favicon_72.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/favicon_144.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="64x64" href="/favicon/favicon_64.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/favicon_120.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/favicon_72.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/favicon_152.png" />
|
||||||
|
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:image" content="/favicon/favicon_152.png" />
|
||||||
|
<meta property="og:description" content="" />
|
||||||
|
|
||||||
|
<meta name="theme-color" content="#1C01A9" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Google Tag Manager (noscript) -->
|
||||||
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?= GTM_SITE_KEY; ?>"
|
||||||
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||||
|
<!-- End Google Tag Manager (noscript) -->
|
||||||
|
<header>
|
||||||
|
<? $APPLICATION->IncludeComponent("bitrix:menu", "evolution", Array(
|
||||||
|
"ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно
|
||||||
|
"CHILD_MENU_TYPE" => "left", // Тип меню для остальных уровней
|
||||||
|
"DELAY" => "N", // Откладывать выполнение шаблона меню
|
||||||
|
"MAX_LEVEL" => "1", // Уровень вложенности меню
|
||||||
|
"MENU_CACHE_GET_VARS" => array( // Значимые переменные запроса
|
||||||
|
0 => "",
|
||||||
|
),
|
||||||
|
"MENU_CACHE_TIME" => "3600", // Время кеширования (сек.)
|
||||||
|
"MENU_CACHE_TYPE" => "N", // Тип кеширования
|
||||||
|
"MENU_CACHE_USE_GROUPS" => "Y", // Учитывать права доступа
|
||||||
|
"ROOT_MENU_TYPE" => "top", // Тип меню для первого уровня
|
||||||
|
"USE_EXT" => "N", // Подключать файлы с именами вида .тип_меню.menu_ext.php
|
||||||
|
),
|
||||||
|
false
|
||||||
|
); ?>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<!--<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">-->
|
||||||
|
<? $APPLICATION->ShowPanel(); ?>
|
||||||
Loading…
x
Reference in New Issue
Block a user