<?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.'USOS DE SUELO'; ?>
        <?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/createusos', 
                                    '<i class="fa fa-plus"></i> '. lang('usos_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('usos_uso');           ?></th>
                                        <th><?php echo lang('usos_nombre_uso');           ?></th>
                                        <th><?php echo lang('usos_r');            ?></th>
                                        <th><?php echo lang('usos_g');           ?></th>
                                        <th><?php echo lang('usos_b');         ?></th>
                                        <th width="100"><?php echo lang('usos_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="uso" name="uso" type="text" class="form-control" maxlength="10"
                                        placeholder="<?php echo lang('usos_uso');?>" 
                                        value="<?php if (isset($_SESSION['arraywhere_colonias']['uso'])) 
                                                     {  
                                                        echo $_SESSION['arraywhere_colonias']['uso'];
                                                     }else{
                                                        echo '';
                                                     } ?>"
                                        enable autofocus></th>

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

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

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

                                        <th><input id="b" name="b" type="text" class="form-control" maxlength="3" 
                                        placeholder="<?php echo lang('usos_b');?>" 
                                        value="<?php if (isset($_SESSION['arraywhere_colonias']['b'])) 
                                                     {  
                                                        echo $_SESSION['arraywhere_colonias']['b'];
                                                     }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 ($usos 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 uso" nowrap="true"><?php echo htmlspecialchars($values->uso,      ENT_QUOTES, 'UTF-8'); ?></td>                            
                                        <td class="boton nombre_uso" nowrap="true"><?php echo htmlspecialchars($values->nombre_uso,  ENT_QUOTES, 'UTF-8'); ?></td>                            
                                        <td class="boton r" nowrap="true"><?php echo htmlspecialchars($values->r,    ENT_QUOTES, 'UTF-8'); ?></td>                     
                                        
                                        <td class="boton g" nowrap="true"><?php echo htmlspecialchars($values->g,  ENT_QUOTES, 'UTF-8'); ?></td>
                                        
                                        <td class="boton b" nowrap="true"><?php echo htmlspecialchars($values->b,  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/verusos/'.$values->uso, lang('actions_see')); 
                                                     // echo '&nbsp'  
                                                       
                                                    echo anchor('man_espacial/colonias/colonias/editusos/'.$values->uso, lang('actions_edit')); 
                                                     //echo '&nbsp' 

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

                                            ?>                                                              

                                                                                  
                                        </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>
            
            
