<?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/puntos/puntos/create', 
                                      //'<i class="fa fa-plus"></i> '. lang('puntos_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('puntos_dpto');                 ?></th>
                                        <th><?php echo lang('puntos_distrito');             ?></th>
                                        <th><?php echo lang('puntos_colonia');              ?></th>
                                        <th><?php echo lang('puntos_mz_agr');               ?></th>
                                        <th><?php echo lang('puntos_lote_agr');             ?></th>
                                        <th><?php echo lang('puntos_benef');                ?></th>
                                        <th><?php echo lang('puntos_codigo');               ?></th>
                                        <th><?php echo lang('puntos_obs');                  ?></th>
                                        <th><?php echo lang('puntos_formulario');           ?></th>
                                        <th><?php echo lang('puntos_foto');                 ?></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" name="dpto" type="text" class="form-control" maxlength="2"
                                        placeholder="<?php echo lang('puntos_dpto');?>" 
                                        value="<?php if (isset($_SESSION['arraywhere_puntos']['dpto'])) 
                                                     {  
                                                        echo $_SESSION['arraywhere_puntos']['dpto'];
                                                     }else{
                                                        echo '';
                                                     } ?>"
                                        enable autofocus></th>

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

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

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

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

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

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

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

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

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

                                        <th><input id="foto" name="foto" type="text" class="form-control" 
                                        placeholder="<?php echo lang('puntos_foto');?>" 
                                        value="<?php if (isset($_SESSION['arraywhere_puntos']['foto'])) 
                                                     {  
                                                        echo $_SESSION['arraywhere_puntos']['foto'];
                                                     }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 ($puntos as $values):?>
                                    <tr id="tdcol" >
                                        <td class="botonfinca dpto" nowrap="true"><?php echo htmlspecialchars($values->dpto,      ENT_QUOTES, 'UTF-8'); ?></td>                            
                                        <td class="botonfinca distrito" nowrap="true"><?php echo htmlspecialchars($values->distrito,  ENT_QUOTES, 'UTF-8'); ?></td>                            
                                        <td class="botonfinca colonia" nowrap="true"><?php echo htmlspecialchars($values->colonia,    ENT_QUOTES, 'UTF-8'); ?></td>                     
                                        
                                        <td class="botonfinca mz_agr" nowrap="true"><?php echo htmlspecialchars($values->mz_agr,  ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="botonfinca" nowrap="true"><?php echo htmlspecialchars($values->lote_agr,     ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="botonfinca" nowrap="true"><?php echo htmlspecialchars($values->benef,        ENT_QUOTES, 'UTF-8'); ?></td>

                                        <td class="botonfinca" nowrap="true"><?php echo htmlspecialchars($values->codigo,       ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="botonfinca" nowrap="true"><?php echo htmlspecialchars($values->obs,          ENT_QUOTES, 'UTF-8'); ?></td>
                                        <td class="botonfinca" nowrap="true"><?php echo htmlspecialchars($values->formulario,   ENT_QUOTES, 'UTF-8'); ?></td>

                                         <td class="botonfinca" nowrap="true"><?php echo htmlspecialchars($values->foto,        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/verpunto/'.$values->gid, lang('actions_visor')) ?>                                            
                                            <?php //echo anchor('man_espacial/puntos/puntos/ver/'.$values->gid, lang('actions_see')); ?>
                                            
                                        </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>
            
            
