<?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">
                <h3 class="box-title"><b><?php echo lang('lotes_gid'); ?>: </b> </h3>
                <h3 class="box-title" id="clave">
                <?php echo $_SESSION['identificador']; ?> 
                <?php echo anchor('man_espacial/in_temp/in_temp/verparcela/'.$lotes_info->gid, lang('actions_visor')); 
                ?>                                              
                <!--Colonia: <b-->
                <!--?php //echo $_SESSION['descripcion_colonia']; ?> </b> </h3-->
            </div>
            <!-- Custom Tabs -->
            <div  class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li  id="Tab_Ubi" name= "Tab_Ubi" class="active" ><a  data-toggle="tab" href="<?php echo site_url('ficha_catastral/lotes/ident_geo/lotes_ident_geo/'.$lotes_info->gid.'/E'); ?>" aria-expanded="true" style="background-color:#F0F0F0">Ubicación Geo.</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/datos_lote/lotes_datos_lote/'.$lotes_info->gid.'/E');                ?>" aria-expanded="false">Datos Lote</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/caract_terreno/lotes_caract_terreno/'.$lotes_info->gid.'/E');      ?>" aria-expanded="false">Caracteristicas Terreno</a></li>
                    /*<li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg02_ocup_i/');                 ?>" aria-expanded="false">Ocup. I</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg02_ocup_ii/');                ?>" aria-expanded="false">Ocup. II</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg02_ocup_iii/');               ?>" aria-expanded="false">Ocup. III</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg02_ocup_iv/');                ?>" aria-expanded="false">Ocup. IV</a></li>*/
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg11_ocup_v/');                 ?>" aria-expanded="false">Ocup. V</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg03_uso_de_la_tierra/');       ?>" aria-expanded="false">Usos</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg04_cultivos_agricolas/');     ?>" aria-expanded="false">Cult. Agr.</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg05_produccion_ganadera/');    ?>" aria-expanded="false">Prod. Gan.</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg06_asistencia_crediticia/');  ?>" aria-expanded="false">Asist. Cred.</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg07_asistencia_tecnica/');     ?>" aria-expanded="false">Asist. Técn.</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg08_organizacion_productor/'); ?>" aria-expanded="false">Org. Prod.</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg09_viviendas/');              ?>" aria-expanded="false">Viviendas</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg10_poblacion_censo/');        ?>" aria-expanded="false">Pob. Censo</a></li>
                    <li class=""><a href="<?php echo site_url('ficha_catastral/lotes/reg12_poblacion_actual/');       ?>" aria-expanded="false">Pob. Actual</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_lotes">
                            <!-- Bloque de Formulario-->
                            <div class="col-md-6">
                                <div class="box box-primary">
                                    <div class="box-header with-border">
                                        <h3 class="box-title"><?php echo lang('lotes_vista_codcat'); ?></h3>
                                    </div>
                                    <div class="box-body">
                                    <?php echo $message; ?>
                                        <!--?php //echo form_open('/ficha_catastral/lotes/cambio_clave', array('class' => 'form-horizontal', 'id' => 'form-cambio_clave', 'onKeypress' => 'if(event.keyCode == 13) event.returnValue = false;')); ?-->
                                        <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-edit_user')); ?>

                                        <table class="table table-striped table-hover">
                                            <thead>
                                                <tr>
                                                  <th></th>
                                                </tr>
                                            </thead>
                                            <tbody>

                                                <tr>
                                                    <th><?php echo lang('lotes_gid'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->gid, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($gid);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('lotes_cod_cat'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->cod_cat, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($cod_cat);?></td>
                                                </tr>
                                                
                                                <tr>
                                                    <th><?php echo lang('lotes_cod_dep'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->departamento, ENT_QUOTES, 'UTF-8'); ?></td>

                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Departamento" id="lista_departamento" name="lista_departamento" ';
                                                            echo form_dropdown('lista_departamento', $l_departamento, $departamento_sel, $attribute);?></td>

                                                </tr> 
                                                <tr>
                                                    <th><?php echo lang('lotes_cod_prov'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->provincia, ENT_QUOTES, 'UTF-8'); ?></td>
                                           
                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Provincia" id="lista_provincia" name="lista_provincia" ';
                                                        echo form_dropdown('lista_provincia', $l_provincia, $provincia_sel, $attribute); ?></td>                    

                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('lotes_cod_muni'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->municipio, ENT_QUOTES, 'UTF-8'); ?></td>
                                                   
                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Municipio" id="lista_municipio" name="lista_municipio" ';
                                                    echo form_dropdown('lista_municipio', $l_municipio, $municipio_sel, $attribute); ?></td>                           
                                                </tr>


                                                <tr>
                                                    <th><?php echo lang('lotes_cod_ru'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->cod_ru, ENT_QUOTES, 'UTF-8'); ?></td>

                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Radio Urbano" id="lista_radio_urbano" name="lista_radio_urbano" ';
                                                    echo form_dropdown('lista_radio_urbano', $l_radio_urbano, $radio_urbano_sel, $attribute);?></td>
                                                    
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('lotes_cod_zonaho'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->cod_zonaho, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Zona Homogenea" id="lista_zona_homogenea" name="lista_zona_homogenea" ';
                                                    echo form_dropdown('lista_zona_homogenea', $l_zona_homogenea, $zona_homogenea_sel, $attribute);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('lotes_cod_dist'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->cod_dist, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Distrito" id="lista_distrito" name="lista_distrito" ';
                                                    echo form_dropdown('lista_distrito', $l_distrito, $distrito_sel, $attribute);?></td>
                                                </tr>   

                                                <tr>
                                                    <th><?php echo lang('lotes_cod_manz'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->cod_manz, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td><?php $attribute = 'class="form-control selectpicker" title="Manzana" id="lista_manzana" name="lista_manzana" ';
                                                    echo form_dropdown('lista_manzana', $l_manzana, $manzana_sel, $attribute);?></td>
                                                </tr>
                                                
                                                <tr>
                                                    <th><?php echo lang('lotes_lote'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->lote, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3" class="col-sm-3"><?php echo form_input($lote);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('lotes_id_epsg'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($lotes_info->id_epsg, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td><?php $attribute = 'class="form-control selectpicker" title="EPSG" id="lista_epsg" name="lista_epsg" ';
                                                    echo form_dropdown('lista_epsg', $l_epsg, $epsg_sel, $attribute);?></td>
                                                </tr> 
                                                                                      

                                            </tbody>
                                        </table>
                                        <hr>
                                        <!-- Bloque Botones -->
                                        <div class="form-group">
                                            <div <div class="col-md-offset-1 col-md-10" align="center">
                                                <div class="btn-group">
                                                    <!--?php echo form_button(array('type' => 'submit', 'id' => 'btn_submit', 'class' => 'btn btn-primary btn-flat', 'content' => 'AAA', 'style' => 'visibility: hidden')); ?-->

                                                    <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>                                                    

                                                    <!--?php echo form_button(array('type' => 'button', 'id' => 'clave_submit', 'class' => 'btn btn-primary btn-flat', 'content' => 'Grabar cambios')); ?-->

                                                    <?php echo anchor($_SESSION['url_anterior'], 'Atras', array('class' => 'btn btn-default btn-flat')); ?>
                                                    <?php echo anchor(site_url('ficha_catastral/lotes/lotes/index'), 'Index', array('class' => 'btn btn-default btn-flat')); ?>



                                                    
                                                </div>
                                                <div class="pull-right">
                                                    <?php echo form_button(array('type' => 'button', 'id' => 'eliminar_reg', 'class' => 'btn btn-danger btn-flat', 'content' => 'Eliminar registro')); ?>
                                                </div>
                                            </div>
                                        </div>

                                        <!-- FIN Bloque botones -->
                                        <?php echo form_close(); ?>

                                        <!-- Bloque AYUDA 
                                        <div class="col-sm-7">
                                            <div class="panel panel-danger" >
                                                <div class="panel-heading">Ayuda</div>
                                                <div class="panel-body">
                                                    <table id="tabla" class="table table-striped    table-hover">
                                                        <thead style="font-size: 12px">
                                                            <tr>
                                                                <th>Simbolo</th>
                                                                <th>Significado</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody style="font-size: 12px">
                                                            <tr>
                                                                <td>A-Z</td>
                                                                <td>Sólo acepta letras mayúsculas</td>
                                                            </tr>
                                                            <tr>
                                                                <td>0-9</td>
                                                                <td>Sólo acepta números enteros</td>
                                                            </tr>
                                                            <tr>
                                                                <td>A-Z 0-9</td>
                                                                <td>Sólo acepta letras mayúsculas y números enteros</td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div> -->
                                        <!-- FIN Bloque AYUDA -->
                                    </div>
                                </div>
                            </div>


                            <!-- Bloque de foto-->
                            <!--div class="col-md-6">
                                <div class="box box-info">
                                    <div class="box-header with-border">
                                        <h3 class="box-title"><?php echo lang('lotes_vista_foto'); ?></h3>
                                    </div>
                                    <div class="box-body" style="overflow: scroll;">
                                        <div id="carrusel">
                                            <?php if ($_SESSION['cant_fotos'] != 0): ?>
                                            <a href="#" class="izquierda_flecha">
                                                <img src="<?php echo base_url()?>/fotos_ficha_catastral_prb/carousel_back.png">
                                            </a>
                                            <a href="#" class="derecha_flecha">
                                                <img src="<?php echo base_url()?>/fotos_ficha_catastral_prb/carousel_next.png">
                                            </a>
                                            <a style="position:absolute;margin-right:-7%; right:0px; z-index:1; top:6%; margin-top:-2px;opacity: 0.5;cursor: pointer;" onMouseOver="this.style.opacity= 5" onMouseOut="this.style.opacity= 0.5" onclick="eliminar_imagen()" class="eliminar_img">
                                                <img width="40%" height="40%" src="<?php echo base_url()?>/fotos_ficha_catastral_prb/deleteico.png">
                                            </a>

                                            <a download="imagen_ficha_catastral" style="position:absolute;margin-left: 2%; left:0px; z-index:10; top:4%; margin-top:-2px;opacity: 0.5;cursor: pointer;" onMouseOver="this.style.opacity= 5" onMouseOut="this.style.opacity= 0.5" class="descargar_img">
                                                <img width="20%" height="20%" src="<?php echo base_url()?>/fotos_ficha_catastral_prb/downloadicon.png">
                                            </a>    
                                        
                                            <div class="carrusel" style="left: 0px;">
                                                <?php
                                                    $i = 0;
                                                    foreach ($_SESSION['array_fotos'] as $value):
                                                ?>
                                                <div class="product" id="product_<?php echo ($i) ?>">
                                                    <th><?php echo $value['id_foto']; ?>:</th>
                                                    <a href="<?php echo $value['ruta'] ?>" rel="shadowbox">
                                                        <img class="img_carrusel" alt="Sin imagen" id="<?php echo $value['id_foto'] ?>" src="<?php echo $value['ruta'] ?>" height="280px" width="500px">

                                                    </a>
                                                </div>
                                            
                                                <?php
                                                    $i = $i + 1; 
                                                    endforeach; 
                                                ?>
                                            </div>

                                            <?php else: ?>
                                                <h1>NO HAY FOTOS PARA ESTE ficha_catastralIONARIO</h1>
                                            <?php endif; ?>
                                        </div>
                                        <input id="cantidad_fotos" type="hidden" value="<?php echo $_SESSION['cant_fotos'] ?>" />
                                    </div>
                                </div>
                            </div-->
                            <!-- Fin bloque de Foto-->
                            <!-- Bloque de Importacion de Fotos -->
                            <!--div class="col-md-6">
                                <div class="box box-info">
                                    <div class="box-body">
                                        <h3><b><?php echo $message;?></b></h3>
                                        <?php echo form_open_multipart(current_url()) ?>
                                        <div class="form-group">
                                            <label for="name_file" class="col-md-1 control-label">Nombre:</label>
                                            <div class="col-md-11">
                                                <input class="form-control" type="text" name="name_file" size="100" length="100" value="">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="foto_ficha_catastral" class="col-md-1 control-label">Foto:</label>
                                            <div class="col-md-1">
                                                <input class="btn btn-info" name="foto_ficha_catastral[]" id="foto_ficha_catastral[]" multiple type="file"/>
                                            </div>
                                        </div>
                                        <br>
                                        <br>
                                        <br>
                                        <div class="form-group">
                                            <div <div class="col-md-offset-1 col-md-10" align="center">
                                                <div class="btn-group">
                                                    <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => 'Importar Foto')); ?>
                                                </div>
                                            </div>
                                        </div>
                                        <?php echo form_close(); ?>
                                    </div>
                                </div>
                            </div-->
                            <!-- Fin Bloque de Importacion de Fotos -->
                            <!-- Bloque de Mapa -->
                            <div class="col-md-6">
                                <div class="box box-info">
                                    <div class="box-header with-border">
                                            <h3 class="box-title"><?php echo lang('lotes_vista_mapa'); ?></h3>
                                            
                                    </div>
                                    <div class="box-body">
                                        <!--<iframe width="320" height="240" src="//e.issuu.com/embed.html#2435676/1234567" frameborder="0" ></iframe>-->
                                        <div id="map" style="height: 400px"></div>
                                            
                                    </div>
                                </div>
                            </div>
                            <!-- Fin bloque de Mapa-->
                            <div class="col-md-6">
                                <div class="box box-info">
                                        <div class="box-body">
                                       
                                        <div id="jsonpredio" style="height: 200px"></div>
                                        
                                    </div>
                                </div>
                            </div>
                            <!-- Fin bloque de Mapa-->
                        </div><!-- /.box-body -->
                    </div><!-- /.tab-pane -->
                </div><!-- /.tab-content -->
            </div><!-- nav-tabs-custom -->                          
        </div>
    </section>
</div>
<script type="text/javascript" src="<?php echo base_url('js/mapa.js?'.time())?>"></script>


