<script>
    function printDiv(nombreDiv) {
        var contenido = document.getElementById(nombreDiv).innerHTML;
        var contenidoOriginal = document.body.innerHTML;

        document.body.innerHTML = contenido;

        window.print();

        document.body.innerHTML = contenidoOriginal;
    }
</script>
<div class="row">
    <div class="col-sm-8 d-grid">
        <button class="btn btn-lg btn-primary" onclick="printDiv('acta')">Imprimir Acta</button>
    </div>
</div>
<br>
<div class="row">
    <div class="col-sm-8 bg-white" id="acta">
        <div class="row">
            <div class="col-sm-12 text-center">
                <br>
                <h6><?php echo $proc[0]->proc_nombre; ?></h6>
                <h6><?php echo $iiee[0]->iiee_nombre; ?></h6>
                <h5>ACTA ELECTORAL</h5>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 text-center">
                <br>
                <h1>ESCRUTINIO</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <br>
                <table class="table table-bordered table-hover">
                    <thead>
                        <tr>
                            <th width="10%">Nro</th>
                            <th width="65%">Lista</th>
                            <th width="15%">Foto</th>
                            <th width="10%">Votos</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $cont = 1; ?>
                        <?php foreach ($result as $reg) { ?>
                            <tr>
                                <td><?php echo $cont++; ?></td>
                                <td><?php echo $reg->list_nombre; ?></td>
                                <td>
                                    <img
                                        src="<?php echo site_url("gradient-able/listas/" . $reg->list_foto); ?>"
                                        alt=""
                                        width="100%">
                                </td>
                                <td><?php echo $reg->conteo; ?></td>
                            </tr>
                        <?php } ?>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 text-end">
                <?php $fecha = explode(" ", $fecha); ?>
                <h6>Fecha: <?php echo $fecha[0]; ?></h6>
                <h6>Hora: <?php echo $fecha[1]; ?></h6>
                <br>
            </div>
        </div>
    </div>
</div>