first commit
This commit is contained in:
45
web/errors/unavailable/bootstrap.php
Normal file
45
web/errors/unavailable/bootstrap.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if (SF_ENVIRONMENT == 'dev')
|
||||
{
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
|
||||
require_once SF_ROOT_DIR . '/lib/stSimpleThemeHelper.class.php';
|
||||
require_once SF_ROOT_DIR . '/lib/stSimpleLanguageHelper.class.php';
|
||||
|
||||
$cache = stSimpleShopDataCache::getInstance();
|
||||
$themeHelper = new stSimpleThemeHelper($cache);
|
||||
$language = new stSimpleLanguageHelper($cache);
|
||||
|
||||
$phpVersion = floatval(phpversion());
|
||||
|
||||
$shopLockData = $cache->get('shop_lock_data', array());
|
||||
$lockTranslation = null;
|
||||
|
||||
foreach (array($language->getLanguage(), $language->getBaseLanguage()) as $currentLanguage)
|
||||
{
|
||||
if (isset($shopLockData[$currentLanguage]))
|
||||
{
|
||||
$lockTranslation = $shopLockData[$currentLanguage];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($lockTranslation)
|
||||
{
|
||||
$title = $lockTranslation['title'];
|
||||
$description = $lockTranslation['description'];
|
||||
$image = $lockTranslation['image'] ? '/' . $lockTranslation['image'] : $themeHelper->getImage('error/page_error.png');
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = $language->translate('Przepraszamy.');
|
||||
$description = $language->translate('Strona chwilowo niedostępna.');
|
||||
$image = $themeHelper->getImage('error/page_error.png');
|
||||
}
|
||||
|
||||
http_response_code(503);
|
||||
|
||||
require_once __DIR__ . '/template.php';
|
||||
41
web/errors/unavailable/template.php
Normal file
41
web/errors/unavailable/template.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @var stSimpleThemeHelper $themeHelper
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="title" content="Sklep chwilowo niedostępny">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo $title ?></title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $themeHelper->getCss('error.css') ?>">
|
||||
</head>
|
||||
<body>
|
||||
<div id="box_error500">
|
||||
<div id="box_error500_left">
|
||||
<img src="<?php echo $image ?>" alt="">
|
||||
</div>
|
||||
<div id="box_error500_right">
|
||||
<?php if (SF_APP == 'backend' && ($phpVersion < 5.6 || $phpVersion > 7.5)): ?>
|
||||
<div class="txt_red">
|
||||
Serwer nie spełnia wymagań technicznych.<br>
|
||||
Wymagana wersja PHP to <b>5.6.x - 7.4.x</b> (aktualnie ustawiona wersja PHP na serwerze <b><?php echo phpversion() ?>)</b>
|
||||
</div>
|
||||
<?php elseif (SF_APP == 'backend' && $phpVersion >= 7.2 && !stLock::isPHP72Ready()): ?>
|
||||
<div class="txt_red">
|
||||
Przejście na wersje <b>PHP 7.2.x</b> lub wyższą wymaga w pierwszej kolejności uaktualnienia szyfrowania danych w sklepie.<br>
|
||||
W przypadku skonfigurowanego <b>Harmonogramu zadań</b> operacja zostanie przeprowadzona automatycznie w innym wypadku możesz wykonać tą operację ręcznie wchodząc do <b>Konfiguracja -> Harmonogram zadań</b> i klikając przycisk <b>Uruchom ręcznie</b>.
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="txt_red">
|
||||
<?php echo $title ?>
|
||||
</div>
|
||||
<div class="txt">
|
||||
<?php echo $description ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user