<?php $this->load->view('template/head.php'); ?>
<?php $this->load->view('template/header_admin.php'); ?>
<body>
    <div class="container">
        <?php
         $form_data = ['name'  => 'reporte-por-agencia',
           'id'    => 'reporte-por-agencia', 'class' => 'registro-form'];
        ?>
        <div class="row">
            <div class="container">
                <h1 style="text-align: center; margin-top: 50px;"><?= $titulo ?></h1>
            </div>
        </div>
        <div class="row contenedor-form" style="margin-top: 40px; text-align: center;">
            <div class="col-lg-5 col-md-5" style="margin: 0 auto; float: none;">
                <?php echo form_open('informes/resumen_votacion_usuario_registro', $form_data); ?>
                <div class="form-group input-type" style="width: 100%;"> 
                    <?php echo form_label('Seleccione el Usuario', 'COD_AGENCIA', ['class' => 'control-label']); ?>
                    <div class="input-group" style="width: 100%;">
                        <div class="input-group-addon">
                            <i class="fa fa-home"></i>
                        </div>
                        <select name="COD_AGENCIA"  id="COD_AGENCIA" class="form-control" required>
                            <option value=" ">Seleccione</option>
                            <?php    if ($this->session->userdata('COD_PERFIL') !== 3) {?>
                            <option value="0">TODOS</option>
                            <?php } ?>
                             
                            <?php foreach ($usuarios as $agen): ?>
                                 <option style="font-weight: bold;" value="<?= $agen->COD_USUARIO ?>">
                                     <?= $agen->TEX_USUARIO.' - '.$agen->TEX_NOMUSUA ?></option>
                             <?php endforeach; ?>
                        </select> 
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-5 col-md-5" style="margin: 0 auto; float: none;">
                <div class="input-group submit-forms">
                    <?php echo form_submit('submit', 'Ver Reporte', "class='btn btn-default' style='padding: 6px;'"); ?>
                </div> 
            </div>
        </div>
    </div>

    <?php echo form_close(); ?>

    <?php
     $data_view['loajs'] = $load_js;
     $this->load->view('template/footer.php', $data_view);
    ?>


