<?php

if (version_compare(PHP_VERSION, '5.4.0', '<')) {
    header('X-Error-Message: PHP version 5.4 or above is required', true, 500);
    die('PHP version 5.4 or above is required');
}

include_once '.autoload.php';

use Axioma\Lang as lang;
use Axioma\Utils as utils;

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php lang::init(); ?>
    <title><?php echo _('Сервер лицензий ГИС Аксиома'); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Cache-control" content="max-age=60" />
    <link rel="stylesheet" href="css/style.css" type="text/css"/>
    <link rel="stylesheet" href="css/jquery-ui.css" type="text/css"/>
    <link rel="stylesheet" href="css/datatables.min.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="js/cleave.min.js"></script>
    <script type="text/javascript" src="js/luxon.min.js"></script>
    <script type="text/javascript" src="js/datatables.min.js"></script>
    <script type="text/javascript" src="js/datetime-luxon.js"></script>
    <script type="text/javascript" src="js/datatables.ip-address.min.js"></script>
</head>
<body>

<div id="headerDiv">
    <table style="width:100%; height:100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td id="logoDiv">
                <a href="https://axioma-gis.ru/" target="_blank" title="<?php echo _('Сайт ГИС Аксиома'); ?>">
                <img src="<?php echo lang::logoPath(); ?>" />
                </a>
            </td>
            <td id="titleDiv">
                <?php echo _('Сервер лицензий ГИС Аксиома') . ' ' . _('Версия') . ' ' . Axioma\Server\App::version(); ?>
            </td>
        </tr>
    </table>
</div>
<div id="content">
<?php
if (empty($_REQUEST['page'])) {
    $_REQUEST['page'] =
        !file_exists(Axioma\Config::configPath()) || !utils::checkPhpRequirements() ? 'install' : 'status';
}
require $_REQUEST['page'] . '.php';
?>
</div>
</body>
</html>
