<script type="text/javascript">
    var sitekey = '<?php e($public_key); ?>';
</script>
<?php
   $message = $this->session->flashdata('message');
   if (!empty($message)) {
?>
<div class="modal fade modal-message">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span>
                    <span class="sr-only">Close</span>
                </button>
                <h4 class="modal-title"></h4>
            </div>
            <div class="modal-body">
                <?php if (validation_errors() != null) { echo validation_errors(); } ?>
                    <?php echo $message; ?>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<?php } ?>

<section class="h-100">
    <div class="container h-100">
        <div class="row justify-content-md-center h-100">
            <div class="card-wrapper">
                <div class="brand text-center">
                    <h1 style="color: #003859;">Conversão</h1>
                </div>
                <!--
                <div class="brand">
                    <img src="<?php //echo base_url().'assets/img/comdono/logo-full.png'?>" alt="painel comdono" class="img-responsive" />
                </div>
                -->
                <div id="card">
                    <div class="front">
                        <div class="card fat">
                            <div class="card-body">
                                <h4 class="card-title text-center">Painel Administrativo</h4>
                                <form id="login_form" class="form-horizontal my-login-validation" role="form" method="post" action="<?php echo base_url().'auth/login'?>" novalidate="">
                                    <div id="login-message"></div>
                                    <input type="hidden" name="data-send" value="0">
                                    <div class="form-group mb-0">
                                        <label for="email"><i class="fa fa-user-circle fa-md mr-2"></i>E-mail ou Login</label>
                                        <input type="text" class="form-control" name="username" value="" autofocus="" required="required">
                                        <div class="invalid-feedback">
                                            E-mail inválido
                                        </div>
                                    </div>

                                    <div class="form-group pt-3">
                                        <label for="password">
                                            <i class="fa fa-lock fa-lg mr-1"></i>
                                            Senha
                                            <a href="#" class="float-right click-change-view">
    											Esqueceu sua senha?
    										</a>
                                        </label>
                                        <div style="position:relative" id="eye-password-0">
                                            <input id="login-password" type="password" class="form-control" name="password" data-eye="" style="padding-right: 60px;" required="required">
                                            <div class="invalid-feedback">
                                                A senha é obrigatória
                                            </div>
                                            <input type="hidden" id="passeye-0">
                                            <div class="btn btn-primary btn-sm" id="passeye-toggle-0" style="position: absolute; right: 10px; top: 7px; padding: 2px 7px; font-size: 12px; cursor: pointer;"></div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="custom-checkbox custom-control">
                                            <input type="checkbox" name="remember" id="login-remember" class="custom-control-input" value="1">
                                            <label for="login-remember" class="custom-control-label">Mantenha-me Conectado</label>
                                        </div>
                                    </div>
        
                                    <div class="captcha input-group content_login col mb-3" <?php if (!$show_captcha) {echo 'style="display:none"';} ?>> 
                    				    <div id="gcaptcha"></div>
                    				</div>

                                    <div class="form-group m-0">
                                        <button type="submit" class="btn btn-primary btn-block">
                                            <i class="fa fa-sign-in fa-lg mr-2"></i>
                                            Entrar
                                        </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="footer col-12 col-md-12 mt-3 px-0">
                            <div class="cp-footer p-4">
                                Copyright © <?php e(date("Y")); ?> - View Brasil
                            </div>
                        </div>
                    </div>
                    <div class="back" style="display:none;">
                        <div class="card fat">
                            <div class="card-body pb-4 pt-4">
                                <div class="panel panel-primary no-margin">
                                    <div class="panel-heading">
                                        <h4 class="card-title text-center">Esqueci Minha Senha</h4>
                                    </div>
                                    <div class="panel-body">
                                        <form id="password-recovery" class="form-horizontal" role="form" method="post">
                                            <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                            <label for="email" class="w-100"><i class="fa fa-envelope fa-md mr-2"></i>
                                                E-mail
                                                <a href="#" class="click-change-view2 mt-0 pr-1">Voltar</a>
                                            </label>
                                            <input id="login-username" type="text" class="form-control" name="email" value="" placeholder="seu e-mail" autocomplete="off" required="required">
                                            <div class="invalid-feedback">
                                                E-mail inválido
                                            </div>
                                            <div class="form-group mt-4 mb-0">
                                                <div class="w-100 px-0 controls d-flex align-items-center">
                                                    <button type="submit" class="btn btn-primary btn-block">
                                                        <i class="fa fa-paper-plane-o" aria-hidden="true"></i> Enviar
                                                    </button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="footer col-12 col-md-12 mt-3 px-0">
                            <div class="cp-footer p-4">
                                Copyright © <?php e(date("Y")); ?> - View Brasil
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <?php if ($this->config->item('allow_registration', 'tank_auth')) { ?>
            <div id="signupbox" style="display:none; margin-top:15px" class="mainbox col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
                <div class="box-white-shadow ">
                    <div class="panel panel-primary no-margin">
                        <div class="panel-heading">
                            <div class="panel-title">Criar Conta</div>
                            <div style="float:right; font-size: 85%; position: relative; top:-10px"><a id="signinlink" href="#" onclick="$('#signupbox').hide(); $('#loginbox').show()">Acessar</a></div>
                        </div>
                        <div class="panel-body">
                            <form id="signupform" action="<?php echo base_url().'auth/register'; ?>" class="form-horizontal" role="form" method="post">
                                <div id="signupalert" style="display:none" class="alert alert-danger">
                                    <p>Error:</p>
                                    <span></span>
                                </div>
                                <div class="form-group">
                                    <!-- <label for="firstname" class="col-md-4 control-label">Nome</label> -->
                                    <div class="col-md-8 col-md-offset-2">
                                        <input type="text" class="form-control" name="nome" placeholder="Nome" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!-- <label for="lastname" class="col-md-4 control-label">Sobrenome</label> -->
                                    <div class="col-md-8 col-md-offset-2">
                                        <input type="text" class="form-control" name="sobrenome" placeholder="Sobrenome" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!-- <label for="email" class="col-md-4 control-label">E-mail</label> -->
                                    <div class="col-md-8 col-md-offset-2">
                                        <input type="text" class="form-control" name="email" placeholder="Endereço de E-mail" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!-- <label for="icode" class="col-md-4 control-label">Login</label> -->
                                    <div class="col-md-8 col-md-offset-2">
                                        <input type="text" class="form-control" name="username" placeholder="Nome de Usuário - Login" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!-- <label for="password" class="col-md-4 control-label">Senha</label> -->
                                    <div class="col-md-8 col-md-offset-2">
                                        <input type="password" class="form-control" name="password" placeholder="Senha" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!-- <label for="password" class="col-md-4 control-label">Senha</label> -->
                                    <div class="col-md-8 col-md-offset-2">
                                        <input type="password" class="form-control" name="confirm_password" placeholder="Confirmar Senha" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!-- Button -->
                                    <div class="col-md-offset-2 col-md-8">
                                        <input type="submit" id="btn-signup" class="btn btn-primary btn-block" value="Criar Conta">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <?php } ?>
        </div>
    </div>
</section>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>