<?php
defined('BASEPATH') OR exit('No direct script access allowed');

?>

            <div class="content-wrapper">
                <section class="content-header">
                    <?php echo $pagetitle; ?>
                    <?php echo $breadcrumb; ?>
                </section>
                <section class="content">
                    <div class="row">
                        <div class="col-md-4">
                             <div class="box">
                                <div class="box-header with-border">
                                    <h3 class="box-title">Información Colonias</h3>
                                </div>
                                <div class="box-body">
                                    <table class="table table-striped table-hover">
                                        <tbody>
                                            <tr>
                                                <th><?php echo 'Departamento'; ?></th>
                                                <td><?php echo htmlspecialchars($col_info->dpto_cod,      ENT_QUOTES, 'UTF-8'); ?></td>
                                            </tr>
                                            <tr>
                                                <th><?php echo 'Distrito'; ?></th>
                                                <td><?php echo htmlspecialchars($col_info->dist_cod,            ENT_QUOTES, 'UTF-8'); ?></td>
                                            </tr>
                                            <tr>
                                                <th><?php echo 'Colonia'; ?></th>
                                                <td><?php echo htmlspecialchars($col_info->col_cod,               ENT_QUOTES, 'UTF-8'); ?></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <hr>
                                    <div class="form-group">
                                        <div <div class="col-md-offset-1 col-md-10" align="center">
                                            <div class="btn-group">
                                                <?php echo anchor('man_espacial/fincas/colonias_fincas/index/', 'ATRAS', array('class' => 'btn btn-default btn-flat')); ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                         </div>
                        <div class="col-md-8">
                             <div class="box">
                                <div class="box-header with-border">
                                    <h3 class="box-title">Mantenimiento - Fincas</h3>
                                </div>
                                <?php if (isset($message)): ?>
                                    <pre>
                                        <?php echo $message;?>  
                                    </pre>    
                                <?php endif ?>
                                <div class="box-body">
                                    <div class="col-md-12">
                                        <table id="tabla" class="table table-striped table-hover">
                                            <thead>
                                                <tr class="filters">
                                                    <th><?php echo 'Finca';             ?></th>
                                                    <th><?php echo 'Padrón';            ?></th>
                                                    <th><?php echo 'Sup. Legal';        ?></th>
                                                    <th><?php echo 'Sup. Gis';          ?></th>
                                                    <th><?php echo 'Observación';       ?></th>
                                                    <th><?php echo 'Antecedente';       ?></th>
                                                    <th><?php echo 'Fecha Inscrip.';    ?></th>
                                                    <th></th>
                                                </tr>
                                            </thead>
                                            <tbody>                                    
                                                <?php foreach ($fincas as $values):?>
                                                <tr>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->finca,         ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->padron,        ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->sup_legal,     ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->sup_gis,       ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->observacio,    ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->antecedente,   ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td  nowrap="true"><?php echo htmlspecialchars($values->fecha_inscrip, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td>
                                                        <?php echo anchor('man_espacial/fincas/colonias_fincas/mant_fincas/'.$values->gid,'<i class="btn btn-xs bg-blue color-palette">MANT</i>'); ?>
                                                    </td>
                                                </tr>
                                                <?php endforeach;?>
                                            </tbody>
                                        </table>
                                    </div>
                                    

                                    <hr>
                                    
                                    <!-- Sección botones -->
                                    <div class="form-group">
                                        <div <div class="col-sm-offset-0 col-sm-12" align="center">
                                            <div class="">
                                                <?php echo anchor('man_espacial/fincas/colonias_fincas/eliminar_shapes/'.$dpto['value'].'/'.$distrito['value'].'/'.$colonia['value'], 'Eliminar Datos Espaciales', array('class' => '   btn btn-danger btn-flat')); ?>

                                                <?php echo '&nbsp;';?>

                                               <!-- <a href="#" id='verparcela' onclick="existe_grafico(<?php //echo "'".$expe_info[0]['expe_id_expediente']."'".','.$expe_info[0]['expe_gestion'] ?>)">
                                                    <i title="Ver Parcela" class="btn btn-primary btn-flat  fa fa-map">&nbsp;VISOR</i>
                                                </a>-->

                                                <br>
                                                <?php echo '&nbsp;';?>
                                                <?php echo form_open_multipart('man_espacial/fincas/colonias_fincas/importar_fincas', array('class' => 'form-horizontal', 'id' => 'form-importar_shapes')); ?>

                                                    <input id="shapes[]" name="shapes[]" type="file" class="file-loading" webkitdirectory directory>

                                                    <?php echo form_input($dpto);?>
                                                    
                                                    <?php echo form_input($distrito);?>

                                                    <?php echo form_input($colonia);?>
                                                   
                                                    <?php echo form_input(array('type' =>'hidden',
                                                                                'name' =>'gid',
                                                                                'value'=>$col_info->gid)
                                                                         );
                                                    ?>

                                                    <?php echo form_button(array('type' => 'submit','onclick' => 'importar_fincas()', 'class' => 'btn btn-success btn-flat', 'content' => ' Importar SHAPE ', 'id' => 'boton'));?>

                                                <?php echo form_close(); ?>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- Fin sección botones -->
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
