<?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="filterable">
                <div class="col-md-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">
                                
                                <?php echo anchor(
                                    'man_espacial/colonias/colonias/create', 
                                    '<i class="fa fa-plus"></i> '. lang('colonias_create'), 
                                    array('class' => 'btn btn-block btn-primary btn-flat')
                                );?>
                            </h3>
                            <h4><?php echo $message;?></h4>
                        </div>
                        <div class="box-body">
                            <div style="overflow-x: scroll">
                            <table id="tabla" class="table table-striped table-hover">
                                <thead>
                                    <tr class="filters">
                                        <th><?php echo lang('colonias_dpto_cod');           ?></th>
                                        <th><?php echo lang('colonias_dist_cod');           ?></th>
                                        <th><?php echo lang('colonias_col_cod');            ?></th>
                                        <th><?php echo lang('colonias_col_desc');           ?></th>
                                        <th><?php echo lang('colonias_col_codgeo');         ?></th>
                                        <th><?php echo lang('colonias_resolucion_hab');     ?></th>
                                        <th><?php echo lang('colonias_fecha_hab');          ?></th>
                                        <th><?php echo lang('colonias_antecedentes');       ?></th>
                                        <th><?php echo lang('colonias_fecha_inscripcion');  ?></th>
                                        <th><?php echo lang('colonias_fecha_pericia');      ?></th>
                                        <th><?php echo lang('colonias_fecha_deslinde');     ?></th>
                                        <th><?php echo lang('colonias_action');             ?></th>
                                        <!-- 
                                        Reemplazar Acciones por una imagen para tener mejor diseño
                                        --> 
                                        <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" maxlength="2"
                                        placeholder="<?php echo lang('colonias_dpto_cod');?>" 
                                        value="<?php if (isset($_SESSION['arraywhere_colonias']['dpto_cod'])) 
                                                     {  
                                                        echo $_SESSION['arraywhere_colonias']['dpto_cod'];
                                                     }else{
                                                        echo '';
                                                     } ?>"
                                        enable autofocus></th>

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

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

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

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

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

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

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

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

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

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

                                        <th></th>
                                    <?php echo form_close();?>
                                    </tr>
                                </thead>
                                <tbody>                                    
                                    <?php foreach ($colonias as $values):?>
                                    <tr id="tdcol" >
                                        <td class="boton dpto" nowrap="true"><?php echo htmlspecialchars($values->dpto_cod,      ENT_QUOTES, 'UTF-8'); ?></td>                            
                                        <td class="boton distrito" nowrap="true"><?php echo htmlspecialchars($values->dist_cod,  ENT_QUOTES, 'UTF-8'); ?></td>                            
                                        <td class="boton colonia" nowrap="true"><?php echo htmlspecialchars($values->col_cod,    ENT_QUOTES, 'UTF-8'); ?></td>                     
                                        
                                        <td class="boton col_desc" nowrap="true"><?php echo htmlspecialchars($values->col_desc,  ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->col_codgeo,         ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->resolucion_hab,     ENT_QUOTES, 'UTF-8'); ?></td>

                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->fecha_hab,          ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->antecedentes,       ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->fecha_inscripcion,  ENT_QUOTES, 'UTF-8'); ?></td>

                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->fecha_pericia,      ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="boton" nowrap="true"><?php echo htmlspecialchars($values->fecha_deslinde,     ENT_QUOTES, 'UTF-8'); ?></td>

                                        <td>
                                            <?php echo anchor('man_espacial/colonias/colonias/edit/'.$values->gid, lang('actions_edit')); ?>
                                            <?php echo '&nbsp' ?>
                                            <?php echo anchor('man_espacial/colonias/colonias/ver/'.$values->gid, lang('actions_see')); ?>
                                            <?php 
                                                /*
                                                echo anchor('man_espacial/colonias/colonias/generar_excel_pericia/'.$values->dpto_cod.'/'.$values->dist_cod.'/'.$values->col_cod.'/', 'PERICIA'); 
                                                */
                                             ?>
                                            <?php 
                                                /*
                                                echo anchor('man_espacial/colonias/colonias/generar_pericia_completa_1_a_1/'.$values->dpto_cod.'/'.$values->dist_cod.'/'.$values->col_cod.'/'.$values->gid.'/','Generar Pericia'); 
                                                */
                                            ?>
                                        </td>
                                    </tr>
                                    <?php endforeach;?>
                                </tbody>
                            </table>
                            </div>
                            <?php
                            echo $pagination; 
                        ?>
                        </div>
                        
                        <div class="box-body col-sm-8">
                            <table id="tabla" class="table table-striped table-hover">
                                <thead class="acciones_cabecera">
                                    
                                </thead>
                                <tbody class="acciones_cuerpo">                                    
                                    
                                </tbody>
                            </table>
                        </div>
                        <div class="box-body col-sm-8"> 
                            <div id="resultado">                                
                            </div> 
                        </div>                            
                        <div class="box-body col-sm-8"> 
                            <div id="avance">                               
                            </div> 
                        </div>                            
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
            
            
