<? $this->load->view('template/header_c'); ?>
    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Ingreso de Usuarios</h3>
                    </div>
                    <div class="panel-body">
						<?php  
                                $this->load->helper('form');
								$attributes = array('role' => 'form');
                                echo form_open('main/login_validation',$attributes); 
								$val_errors = validation_errors();
                                if (isset($errors) or $val_errors!='') {
									echo "<div class='alert alert-danger'>";		
									echo $val_errors;
									if (isset($errors)) {foreach ($errors as $a => $b) { echo $b; }}
									echo "</div>";
                                }
                        
                                //echo $this->db->last_query();
								
                                echo"<fieldset>";
								echo "<div class='form-group'>";
								$data = array('name' => 'username', 'class'=>'form-control', 'placeholder'=>'Usuario o EMail','autofocus');
								echo form_input($data);
                                echo"</div>";

								echo "<div class='form-group'>";
								$data = array('name' => 'password', 'class'=>'form-control', 'placeholder'=>'Contraseña');
								echo form_password($data);
                                echo"</div>";

								$data = array('name' => 'login_submit', 'class'=>'btn btn-lg btn-primary btn-block', 'value'=>'Ingresar');
                                echo form_submit($data);

                                echo form_close();
                        
                        ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

<? $this->load->view('template/footer_c'); ?>



