<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Demotic</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="<?php echo ipFileUrl('Demotic/Gebtu/Core/assets/admin/admin.css'); ?>">
    <link rel="stylesheet" href="<?php echo ipFileUrl('Demotic/Gebtu/Admin/assets/login.css'); ?>">
    <link rel="shortcut icon" href="<?php echo ipFileUrl('Demotic/Gebtu/Admin/assets/img/favicon.png'); ?>">
</head>
<body>


<a href="./" class="logo-hieroglyphics" target="_blank">𓏞 𓏜 :: 𓂧 𓅓 𓏏 𓇋 𓎡 </a>
<div class="ip languageSelect">
    <?php echo $languageSelectForm->render(); ?>
</div>
<div class="verticalAlign"></div>
<div class="login">
    
    <?php
        //@TODO: This should probably go to Demotic\Functions.php
        function is_localhost() {
            $whitelist = array( '127.0.0.1', '::1' );
            if ( in_array( $_SERVER['REMOTE_ADDR'], $whitelist ) ) {
                return true;
            }  
        }

        if( is_localhost() == true ){
    ?>
        <div class="ip-alert ip-alert-danger ip-alert-dismissible">
            You are using <code>localhost</code> as host name. Some browsers have problems with sessions on hostnames that do not have a <code>.tld</code> in them. If you experience difficulties logging on, either configure your webserver to use a hostname with a dot in it, or use another browser.
        </div>
    <?php
        }
    ?>

    <?php echo $content; ?><br>
    <p style="text-align:center;">
        <a href="./">View Website &rarr;</a><br>
    </p>
</div>
<div class="loginFooter">
    Copyright 2022-<?php echo date("Y"); ?> by <a href="http://www.tuxedosoft.com/">Tuxedosoft</a>
</div>

<?php echo ipJs(); ?>
</body>
</html>
