<!DOCTYPE html>
<html>
<head>

    <?php echo $this->Html->charset(); ?>
    <title>
        Login - Portal Pracownika
    </title>
    <script>
        local_url = "<?php echo $local_url; ?>";
        url_prefix = "<?php echo $url_prefix; ?>";
    </script>
    <?php
    echo $this->Html->meta('csrfToken', $this->request->getAttribute('csrfToken'));
    echo $this->Html->meta('icon');

    echo $this->Html->css(
        array(
            '/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css',
            '/bower_components/AdminLTE/dist/css/AdminLTE.css',
            '/bower_components/AdminLTE/dist/css/skins/skin-blue.css',
            'animate',
            'main_asd123k',
            'cake'
        )
    );
    echo $this->Html->script(
        array(
            '/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js',
//            '/bower_components/AdminLTE/bootstrap/js/popper.min.js',
            '/bower_components/AdminLTE/plugins/jQueryUI/jquery-ui.min.js',
            '/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js',
            '/jquery-validation/jquery.validate.min',
            '/bower_components/AdminLTE/dist/js/app.js'
        )
    );
    ?>
</head>
<body class="hold-transition login-page">
<?php echo $this->Flash->render(); ?>

<div class="login-box" style="<?php echo !empty($przetwarzanie_danych) ? "width: 720px;" : ""?>">
    <div class="login-logo">
        <p>
            <?php
            if(isset($hello['bRodzajLogo']) && !empty($hello['bRodzajLogo'])) {
                switch($hello['bRodzajLogo']) {
                    case 'PNG':
                        ?>
                        <img src="data:image/png;base64,<?php echo $hello['bLogo'.$hello['bRodzajLogo']] ?>" height="50px" width="auto" />
                        <?php
                        break;
                    case 'SVG':
                        ?>
                        <svg xmlns="http://www.w3.org/2000/svg" height="50" width="50" viewBox="0 0 50 50" preserveAspectRatio>
                            <g>
                                <path id="path1" transform="rotate(0,24,24) translate(2.39249897003173,0) scale(1.5,1.5)  " fill="<?php echo $hello['bKolorPierwszegoPlanuLogaSVG']; ?>" d="<?php echo $hello['bLogoSVG']; ?>" />
                            </g>
                        </svg>
                        <?php
                        break;
                }
            }
            ?>
        </p>
        <p>
            <b><?php echo $helloLabel; ?></b>
        </p>
    </div>
    <div class="login-box-body">
        <?php echo $this->fetch('content'); ?>
    </div>

    <div style="font-size: 80%">
        <?php if(isset($hello['bLinkDoRegulaminu']) && !empty($hello['bLinkDoRegulaminu']) && isset($hello['bLinkDoRegulaminuNapis']) && !empty($hello['bLinkDoRegulaminuNapis'])) { ?>
            <a target="_blank" href="<?php echo $hello['bLinkDoRegulaminu'] ?>"><?php echo $hello['bLinkDoRegulaminuNapis'] ?></a><br>
        <?php }
        if(isset($hello['bLinkDoPolitykiPrywatnosci']) && !empty($hello['bLinkDoPolitykiPrywatnosci']) && isset($hello['bLinkDoPolitykiPrywatnosciNapis']) && !empty($hello['bLinkDoPolitykiPrywatnosciNapis'])) { ?>
            <a target="_blank" href="<?php echo $hello['bLinkDoPolitykiPrywatnosci'] ?>"><?php echo $hello['bLinkDoPolitykiPrywatnosciNapis'] ?></a><br>
        <?php }
        if(isset($hello['bLinkDoRODO']) && !empty($hello['bLinkDoRODO']) && isset($hello['bLinkDoRODONapis']) && !empty($hello['bLinkDoRODONapis'])) { ?>
            <a target="_blank" href="<?php echo $hello['bLinkDoRODO'] ?>"><?php echo $hello['bLinkDoRODONapis'] ?></a><br>
        <?php } ?>
    </div>
</div>

<script>
    $(function () {
        localStorage.setItem('menu_action', 'index');
        localStorage.setItem('last_message_listy_type', 'Odbiorcza');
    });
</script>

</body>
</html>
