<?php
    defined('BASEPATH') OR exit('No direct script access allowed');
    
?>
<style type="text/css">
    
 
.luz_azul {
    background: #65bcee !important ; /*abddfa*/
}

 

.luz_naranja {
    background: #ffb94d !important ;   /*ffcd7f*/
}
</style>



<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_index_colonia" class="table table-striped table-hover">
                                <thead>
                                    <tr class="filters">
                                        <th></th>
                                        <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 width="50"><?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 width="100"><?php echo lang('colonias_action');             ?></th>
                                        <!-- 
                                        Reemplazar Acciones por una imagen para tener mejor diseño
                                        --> 
                                         
                                    </tr>
                                    <tr>
                                    <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-create_geocolonia')); ?>
                                    <th></th>
                                        <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="resolucion_hab" name="resolucion_hab" type="text" class="form-control" 
                                        placeholder="<?php echo lang('colonias_resolucion_hab');?>" 
                                        value="<?php if (isset($_SESSION['arraywhere_colonias']['resolucion_hab'])) 
                                                     {  
                                                        echo $_SESSION['arraywhere_colonias']['resolucion_hab'];
                                                     }else{
                                                        echo '';
                                                     } ?>"
                                        enable></th>

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

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

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

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

                                        <th><?php echo form_button(array('type' => 'submit', 'class' => 'glyphicon glyphicon-search btn btn-primary btn-flat', '' => '', 'id' => 'boton'));
                                                 ?>
                                                  <input type="hidden" id="xusuario" value="<?php echo $_SESSION['user_id']; ?>">      
                                                 </th>       
                                    <?php echo form_close();?>
                                    </tr>
                                </thead>
                                <tbody>                                    
                                    <?php foreach ($colonias as $values):?>
                                    <tr id="tdcol" style="cursor:pointer;">
                                        <td class="boton usuario" nowrap="true"><?php //echo htmlspecialchars($_SESSION['user_id'],      ENT_QUOTES, 'UTF-8'); ?></td> 
                                        <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_i,       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')); 
                                                     // echo '&nbsp'  

                                                    echo anchor('man_espacial/colonias/Mantenimiento/mantenimiento_colmen/'.$values->gid, '<i class="btn btn-xs bg-green color-palette">Mant.</i>'); 
                                                     //echo '&nbsp'                                                        
                                                    echo anchor('man_espacial/colonias/colonias/edit/'.$values->gid, lang('actions_edit')); 
                                                     //echo '&nbsp' 

                                                    echo anchor('man_espacial/parcelas/parcelas/vercolonias_ol/'.$values->gid, lang('actions_visor')); 

                                            ?>                                                              

                                            <!--?php 
                                                    echo anchor('man_espacial/colonias/Mantenimiento/colonia_mantenimiento/'.$values->gid, '<i class="btn btn-xs bg-orange color-palette">Mant.</i>'); 
                                            ?-->
                                            <!--?php 
                                                    echo anchor('man_espacial/colonias/colonias/vercolonia/'.$values->gid, lang('actions_visor')); 
                                            ?-->                                            
                                            <?php 
                                            /*
                                                    echo anchor('man_espacial/colonias/colonias/vercolonia/'.$values->gid, '<i title="Ver Expediente" class="fa fa-info-circle btn btn-xs bg-blue color-palette"></i>',array('disabled' => TRUE)); 
                                            */
                                            ?>                                            
                                            <?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>
            
            
