<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 }?>
    
        <div class="container-fluid"><!--    login-light    --> 
        	<div style="margin-top:25px;" class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4">
            	<div class="box-white-shadow ">
            		<div class="block-content" align="center">
            			<img src="<?php echo base_url().'assets/img/auth/logo-painel.png'?>" alt="logo blog view brasil" class="img-responsive" />
            		</div>    
            	</div>		
            </div>
            
            <div id="loginbox" style="margin-top:15px;" class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4"> 
                <div id="card" style="width:100%">
                    <div class="front"> 
                        <div class="box-white-shadow ">                   
                            <div class="panel panel-primary no-margin" >
                                <div class="panel-heading">
                                    <div class="panel-title">Painel Administrativo </div>
                                    <div class="sign-up">
                                        <a href="#" class="click-change-view">Esqueci a senha</a>
                                        <?php if($allow_registration) { ?>
                                            <a href="<?php e(base_url('#meublog')); ?>">
                                                | Cadastre-se
                                            </a>
                                        <?php } ?>
                                    </div>
                                </div>     
                                    
                                <div id="login-message"></div>
                
                                <div style="padding-top:30px" class="panel-body" >                          
                                    <form id="login_form" class="form-horizontal" role="form" method="post" action="<?php echo base_url().'auth/login'?>">
                                                            
                                        <input type="hidden" name="data-send" value="0">
                                                
                                        <div style="margin-bottom: 25px" class="input-group col-md-8 col-md-offset-2" >
                                            <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                            <input id="login-username"  type="text" class="form-control" name="username" value="" placeholder="username ou e-mail" autocomplete="off" >                                        
                                        </div>
                                            
                                        <div style="margin-bottom: 10px" class="input-group col-md-8 col-md-offset-2">
                                            <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                            <input id="login-password" type="password" class="form-control" name="password" placeholder="senha">
                                        </div>
                                          
                                        <!--<div style="margin-bottom: 10px" class="input-group col-md-8 col-md-offset-2 text-right">
                                            <a href="#" class="click-change-view">Esqueci a senha</a>
                                        </div> -->
                                         
                                        <div class="captcha input-group content_login col-xs-12 col-md-8 col-md-offset-2" <?php if (!$show_captcha) echo 'style="display:none"'; ?>>
                            				<div id="gcaptcha"></div>
                        				</div>
                                        
                                        <div style="margin-bottom: 10px" class="checkbox col-md-8 col-md-offset-2 no-padding">
                                            <label>
                                                <input id="login-remember" type="checkbox" name="remember" value="1"> Mantenha-me conectado
                                            </label>
                                        </div>
                                        <div style="margin-top:10px" class="form-group">
                                            <!-- Button -->    
                                            <div class="col-sm-12 col-md-8 col-md-offset-2 controls">
                                                <button type="submit" class="btn btn-primary btn-block">
                                                    <i class="fa fa-sign-in" aria-hidden="true"></i>
                                                    Entrar
                                                </button>
                                            </div>
                                        </div>
            							<!-- 
        								<?php if ($this->config->item('allow_registration', 'tank_auth')) { ?>
                                        <div class="form-group">
                                            <div class="col-md-12 control">
                                                <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
                                                    Ainda não tem uma conta cadastrada? 
                                                    <a href="#" onClick="$('#loginbox').hide(); $('#signupbox').show(); return false;">
                                                        Acesse aqui.
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                        <?php } ?>
                                         -->   
                                    </form>  
                                </div>                    
                            </div>
                        </div> 
                        <div id="footer" style="padding-right: 0; padding-left: 0; margin-top:15px;" class="mainbox col-xs-12 col-sm-12 col-md-12 col-lg-12"> 
                            <div class="box-white-shadow">
                            	<div class="block-content" align="center">
                            		Developed by <a href="http://viewbrasil.com.br/" target="_blank">ViewBrasil - Soluções Web</a>
                            	</div>
                            </div>
                        </div>                       
                    </div> 
                    <div class="back" style="display:none;">
                        <div class="box-white-shadow ">                   
                            <div class="panel panel-primary no-margin" >
                                <div class="panel-heading">
                                    <div class="panel-title">Esqueci a Senha</div>
                                    <div class="sign-up"><a href="#" class="click-change-view2">Entrar</a></div>
                                </div>     
                                          
                                <div style="padding-top:30px" class="panel-body" >
                          
                                    <form id="password-recovery" class="form-horizontal" role="form" method="post">
                                                                                                        
                                        <div style="margin-bottom: 25px" class="input-group col-md-8 col-md-offset-2" >
                                            <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                            <input id="login-username" type="text" class="form-control" name="email" value="" placeholder="seu e-mail" autocomplete="off">                                        
                                        </div>
                                        <!--    
                                        <div style="margin-bottom: 10px" class="input-group col-md-8 col-md-offset-2">
                                            <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                            <input id="login-password" type="password" class="form-control" name="password" placeholder="senha">
                                        </div>
                                                              
                                        <div class="captcha input-group content_login col-xs-12 col-md-8 col-md-offset-2" <?php if (!$show_captcha) echo 'style="display:none"'; ?>>
                            				<div id="gcaptcha"></div>
                        				</div>
                                         
                                        <div style="margin-bottom: 10px" class="checkbox col-md-8 col-md-offset-2 no-padding">
                                            <label>
                                              <input id="login-remember" type="checkbox" name="remember" value="1"> Mantenha-me conectado
                                            </label>
                                        </div>
                                        --> 
                                        <div style="margin-top:10px" class="form-group">
                                            <!-- Button -->
        
                                            <div class="col-sm-12 col-md-8 col-md-offset-2 controls">
                                                <button type="submit" class="btn btn-primary btn-block">
                                                    <i class="fa fa-paper-plane-o" aria-hidden="true"></i>
                                                    Enviar
                                                </button>
                                            </div>
                                        </div>
            							<!-- 
        								<?php if ($this->config->item('allow_registration', 'tank_auth')) { ?>
                                        <div class="form-group">
                                            <div class="col-md-12 control">
                                                <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
                                                    Ainda não tem uma conta cadastrada? 
                                                <a href="#" onClick="$('#loginbox').hide(); $('#signupbox').show(); return false;">
                                                    Acesse aqui.
                                                </a>
                                                </div>
                                            </div>
                                        </div>
                                        <?php }?> 
                                         -->  
                                    </form>  
                                </div>            
                            </div>  
                        </div>                        
                        <div id="footer" style="padding-right: 0; padding-left: 0; margin-top:15px;" class="mainbox col-xs-12 col-sm-12 col-md-12 col-lg-12"> 
                            <div class="box-white-shadow">
                            	<div class="block-content" align="center">
                            		Developed by <a href="http://viewbrasil.com.br/" target="_blank">ViewBrasil - Soluções Web</a>
                            	</div>
                            </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>
         <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>