<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<?php $this->load->view('template/head.php'); ?>
<?php $this->load->view('template/header_admin.php'); ?>
<style>
body {background-color: #ffffff !important;}
</style>
<div class="row">
    <div class="col-lg-12 col-md-12">
        <a class="btn btn-danger btn-sm" href="<?= base_url('sincronizacion')?>">Regresar</a>
    </div>
</div>
<section class="row contenedor-titulo">
<h3 class="titulo"><?= $titulo ?></h3> 
</section>
<section class="row contenedor">
<div class="col-lg-10 col-md-10">
<?php // if (isset($permisos['sincronizacion']['sincronizacion_descargar'])): ?>
<div class="row">
<form action="<?= base_url('sincronizacion/ejecutar') ?>" id="ejecutar-sincronizacion" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="archivo">Archivo plano</label>
<input type="file" name="archivo" id="archivo">
</div>
<input type="submit" name="cargar" value="Pre sincronizar archivo" class="btn btn-success">
</form>
</div>  
<br>
<?php if (isset($arr_log)):?>
<div class="row">
    <div class="col-lg-12 col-md-12">
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>Cod proceso</th>
                <th>Total registros</th>
                <th>Total registrados</th>
                <th>Total no registrados</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><?= @$cod_proceso ?></td>
                <td><?= @$total_registros ?></td>
                <td><?= @$total_registrados  ?></td>
                <td><?= @$total_no_registrados  ?></td>
            </tr>
        </tbody>
    </table>    
    </div>
</div> 
<br>
   <div class="row">
        <div class="col-lg-12 col-md-12">
            <h4 class="text-center">Detalle</h4>
        </div>
    </div>
<div class="row">
    <div class="col-lg-12 col-md-12">
    <table class="table table-bordered">
        <thead>
            <th>Instancia</th>
            <th>Id candidato</th>
            <th>Id participante</th>
            <th>Fec voto</th>
            <th>Ip</th>
        </thead>
        <tbody>
            <?php foreach ($arr_log as $key => $log): ?>
            <tr>
                <td><?= $log['ID_INSTAN'] ?></td>
                <td><?= $log['ID_CANDID'] ?></td>
                <td><?= $log['NUM_IDETER'] ?></td>
                <td><?= $log['FEC_PROVOT'] ?></td>
                <td><?= $log['TEX_IPORIG'] ?></td>
               <!--  <td><?php // ($log['BOL_REGIS'])?'<b class="text-success">Registrado</b>':'<b class="text-danger">No registrado</b>' ?></td> -->
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
</div>
</div>
<?php endif; ?>
<?php //endif; ?>

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