<?php
   header('X-Frame-Options: SAMEORIGIN');
   header("X-XSS-Protection: 1; mode=block");
?>
<!doctype html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="pragma" content="no-cache" />
        <title><?php echo Config::get('backoffice.title'); ?></title>
        <!-- FAVICON -->
        <link href="<?php echo Config::get('backoffice.favicon'); ?>" rel="shortcut icon">
        <!-- CSS -->
        <link href="<?php echo Config::get('path.backoffice.css_path'); ?>/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" >
        <link href="<?php echo Config::get('path.backoffice.css_path'); ?>/style.css" rel="stylesheet" type="text/css" media="screen" >

        <!-- Recaptcha -->
        <script src='https://www.google.com/recaptcha/api.js'></script>
    </head>
    <body>
        <div id="login" class="container">
            <img src="<?php echo Config::get('path.backoffice.images_path'); ?>/logo.png" alt="logo" class="logo" />
            <div id="login_box">
                <div id="login_wrapper">
                    <?php echo $errors->first('error', '<p class="message login-error-message">:message</p>'); ?>

                    <div class="clear"></div>
                    <?php echo Form::open(array('url' => 'admin/login')); ?>

                    <div class="form-group <?=$errors->first('username', 'has-error')?>">
                        <label class="control-label" for="email">Username</label>
                        <?php echo Form::text('username', null, array('id' => 'username', 'class' => 'form-control login_input input')); ?>

                    </div>
                    <div class="clear"></div>
                    <div class="form-group <?=$errors->first('password', 'has-error')?>">
                        <label class="control-label" for="password">Password</label>
                        <?php echo Form::password('password', array('id' => 'password', 'class' => 'form-control login_input input')); ?>

                    </div>
                    <div class="form-group">
                        <div class="g-recaptcha" data-sitekey="6Ldi5TMUAAAAAEwwflaNqZX9dm_iLA1iSwGrfy4V" data-size="normal"></div>
                    </div>
                    <div class="clear"></div>
                    <div class="fright">
                        <?php echo Form::submit('Login', array('class' => 'btn btn-primary btn-block')); ?>

                    </div>
                    <?php echo Form::close(); ?>

                </div><!-- END login_wrapper -->
            </div>
            <!-- END login_box -->
            <a href="http://www.eae.pt" class="powered pull-right">
                <img src="<?php echo Config::get('path.backoffice.images_path'); ?>/powered.jpg" alt="powered_by_EAE" class="fright" />
            </a>
        </div>
    </body>
</html>
