<?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="box-header with-border" style="background-color: #E6E6E6">
            </div>
            <!-- Custom Tabs -->
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li class=""><a href="<?php echo site_url('monitoreo/panel_control/panel_control/empate_principal');   ?>" aria-expanded="false">General</a></li>
                    <li class=""><a href="<?php echo site_url('monitoreo/panel_control/panel_control/empate_empatados');   ?>" aria-expanded="false">Empatados</a></li>
                    
                    <li  class="active" ><a  data-toggle="tab" href="<?php echo site_url('monitoreo/panel_control/panel_control/empate_sin_parcelas'); ?>" aria-expanded="true" style="background-color:#F0F0F0">Cuestionarios sin Parcelas</a></li>

                    <li class=""><a href="<?php echo site_url('monitoreo/panel_control/panel_control/empate_sin_cuestionarios');?>" aria-expanded="false">Parcelas sin Cuestionarios</a></li>
                </ul>
                <div class="tab-content" style="background-color:#F0F0F0">
                    <div id="tab_1" class="tab-pane active">
                        <div class="box-body" style="background-color:#F0F0F0" id="div_reg01">
                            <!-- Bloque de Formulario-->
                            <div class="col-md-12">
                                <div class="box box-primary">
                                    <div class="box-body">
                                        <table id="tabla_empate3" class="table table-striped table-hover">
                                            <thead>
                                                <tr>
                                                    <th><?php echo lang('empate_reg_dpto');                    ?></th>
                                                    <th><?php echo lang('empate_reg_distrito');                ?></th>
                                                    <th><?php echo lang('empate_reg_colonia');                 ?></th>
                                                    <th><?php echo lang('empate_reg_manzana');                 ?></th>
                                                    <th><?php echo lang('empate_reg_lote_a');                  ?></th>
                                                    <th><?php echo lang('empate_reg_lote_b');                  ?></th>
                                                    <th><?php echo lang('empate_reg_cuest');                   ?></th>
                                                    <th><?php echo lang('empate_reg_situacion_lote');          ?></th>
                                                    <th><?php echo lang('empate_reg_condicion_lote');          ?></th>
                                                    <th><?php echo lang('empate_reg_cultivo');                 ?></th>
                                                    <th><?php echo lang('empate_reg_produccion_ganadera');     ?></th>
                                                    <th><?php echo lang('empate_reg_asistencia_crediticia');   ?></th>
                                                    <th><?php echo lang('empate_reg_asistencia_tecnica');      ?></th>
                                                    <th><?php echo lang('empate_reg_organizacion');            ?></th>
                                                    <th><?php echo lang('empate_reg_nombre_proceso');          ?></th>
                                                    <th></th>
                                                </tr>
                                                <tr>
                                                <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-create_geocolonia')); ?>
                                                    <th><input id="dpto_cod" name="dpto_cod" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_dpto');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['dpto_cod'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['dpto_cod'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable autofocus></th>

                                                    <th><input id="dist_cod" name="dist_cod" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_distrito');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['dist_cod'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['dist_cod'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_cod" name="col_cod" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_colonia');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_cod'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_cod'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="id_codgeo" name="id_codgeo" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_manzana');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['id_codgeo'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['id_codgeo'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_lote_a');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_lote_b');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_cuest');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_situacion_lote');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_condicion_lote');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_cultivo');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_produccion_ganadera');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_asistencia_crediticia');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_asistencia_tecnica');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_organizacion');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                    placeholder="<?php echo lang('empate_reg_nombre_proceso');?>" 
                                                    value="<?php if (isset($_SESSION['arraywhere_geocolonia']['col_desc'])) 
                                                                 {  
                                                                    echo $_SESSION['arraywhere_geocolonia']['col_desc'];
                                                                 }else{
                                                                    echo '';
                                                                 } ?>"
                                                    enable></th>

                                                    <th><?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => 'buscar', 'id' => 'boton'));
                                                     ?></th>

                                                <?php echo form_close();?>
                                                </tr>
                                            </thead>
                                            <tbody class="muestra_geocolonias">
                                            <?php if (isset($v_empate_2) AND isset($_SESSION['arraywhereempate'])):?>
                                                <?php foreach ($v_empate_2 as $values):?>
                                                    <tr>
                                                        <td><?php echo htmlspecialchars($values->dpto,                  ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->distrito,              ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->colonia,               ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->manzana,               ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->lote_a,                ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->lote_b,                ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->cuest,                 ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->situacion_lote,        ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->condicion_lote,        ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->cultivo,               ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->produccion_ganadera,   ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->asistencia_crediticia, ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->asistencia_tecnica,    ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->organizacion,          ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td><?php echo htmlspecialchars($values->nombre_proceso,        ENT_QUOTES, 'UTF-8'); ?></td>
                                                        <td>
                                                            <?php echo anchor('cuest/reg01/vista_ident_geo/'.$values->id_registro_lote, '<i class="fa fa-pencil btn btn-xs bg-orange color-palette"></i>'); ?>
                                                            <?php echo '&nbsp;';?>
                                                            <?php echo anchor('man_espacial/geocolonias/geocolonias/delete/'.$values->id_registro_lote, lang('actions_delete')); ?>
                                                        </td>
                                                    </tr>
                                                <?php endforeach;?>
                                            <?php else:?>
                                                <tr>
                                                    <td colspan="17" align="center"><b>NO HAY RESULTADOS</b></td>
                                                </tr>
                                            <?php endif;?>
                                            </tbody>
                                        </table>
                                        <?php 
                                            if (isset($_SESSION['arraywhereempate'])) {
                                                echo $pagination; 
                                            }
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div><!-- /.box-body -->
                    </div><!-- /.tab-pane -->
                </div><!-- /.tab-content -->
            </div><!-- nav-tabs-custom -->                          
        </div>
    </section>
</div>
