<?php
$min = '5.6.04'; $max = '7.4.0'; if (version_compare(PHP_VERSION, $min, '<') || version_compare(PHP_VERSION, $max, '>=')) { $exception = new \Exception('PHP_VERSION_NOT_COMPATIBILITY'); } if (!isset($exception)) { return true; } $errorMessage = ''; switch($exception->getMessage()) { case 'PHP_VERSION_NOT_COMPATIBILITY': $errorMessage = 'Current PHP version is not supported. Control panel requirements are:<br/><strong>PHP version 5.6, 7.0, 7.1, 7.2, 7.3.</strong><br/><br/>Please contact your hosting provider and kindly ask them to switch your PHP version up to the recommended version.'; break; case 'INSTALLATION_FOLDER_EXISTS': $errorMessage = 'To ensure operation of the control panel, the <strong>mt-install</strong> folder should be deleted. Please delete it from your server.'; break; case 'DATABASE_CONNECTION_ERROR': $errorMessage = 'Failed to connect to database. Please contact your hosting provider for additional help.'; break; default: $errorMessage = $exception->getMessage(); break; } $now = time(); ?>
<!DOCTYPE html>
<html ng-app="install">
<head>
    <meta charset="utf-8">

    <title>Control Panel</title>

    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="copyright" content=""/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href='//fonts.googleapis.com/css?family=Open+Sans:400,600,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="./css/style.css?t=<?php echo $now?>">
    <style type="text/css">
        .version-php-app {
            text-align: center;
            color: #fff;
        }
        .version-php-app .popup {
            position: absolute;
            top: 50%;
            left: 50%;
            -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
            text-align: center;
            color: #fff;
            width: 312px;
            height: auto;
            background-color: #c12525;
            border: 1px #aa1313 solid;
            padding: 25px 40px;
            box-sizing: border-box;
            box-shadow: inset 0 0 0 1px #cb3e3e;
        }

        .version-php-app .icon {
            height: 35px;
            background-image: url('data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAACQAAAAjCAYAAAD8BaggAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPA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TVQ4IkbSH0bOB/+HOty3/7RTv9cCwPrFI7H7IVlNoJ2l8BBgBhH2dK1FZ3eAAAAABJRU5ErkJggg==');
            background-position: top center;
            background-repeat: no-repeat;
        }

        .version-php-app h1 {
            font-size: 24px;
            font-weight: normal;
            padding: 11px 0;
        }

        .version-php-app .error-text {
            font-size: 13px;
            line-height: 17px;
        }

    </style>
</head>
<body class="guest-app version-php-app">

<div class="popup">
    <div class="icon"></div>
    <h1>Server error</h1>
    <div class="error-text">
        <?php echo $errorMessage?>
    </div>
</div>
</body>
</html>
<?php
if (class_exists(Moto\System\Log::class)) { Moto\System\Log::critical('SERVER_ERROR : [ ' . $exception->getCode() . ' ] ' . $exception->getMessage()); } die(); 