<?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('reg01_id_registro_lote'); ?>: </b></h3>
                <h3 class="box-title" id="clave"><?php echo $_SESSION['identificador'] ?></h3>
            </div>
            <!-- Custom Tabs -->
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li  class="active" ><a  data-toggle="tab" href="<?php echo site_url('cuest/reg01/vista_reg01'); ?>" aria-expanded="true" style="background-color:#F0F0F0">Ident. Geog.</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg01_caratula');                ?>" aria-expanded="false">Caratula</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg02_datos_del_lote/');         ?>" aria-expanded="false">Reg02</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg02_ocup_i/');                 ?>" aria-expanded="false">Ocup. I</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg02_ocup_ii/');                ?>" aria-expanded="false">Ocup. II</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg02_ocup_iii/');               ?>" aria-expanded="false">Ocup. III</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg02_ocup_iv/');                ?>" aria-expanded="false">Ocup. IV</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg11_ocup_v/');                 ?>" aria-expanded="false">Ocup. V</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg03_uso_de_la_tierra/');       ?>" aria-expanded="false">Usos</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg04_cultivos_agricolas/');     ?>" aria-expanded="false">Cult. Agr.</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg05_produccion_ganadera/');    ?>" aria-expanded="false">Prod. Gan.</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg06_asistencia_crediticia/');  ?>" aria-expanded="false">Asist. Cred.</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg07_asistencia_tecnica/');     ?>" aria-expanded="false">Asist. Técn.</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg08_organizacion_productor/'); ?>" aria-expanded="false">Org. Prod.</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg09_viviendas/');              ?>" aria-expanded="false">Viviendas</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/reg10_poblacion_censo/');        ?>" aria-expanded="false">Pob. Censo</a></li>
                    <li class=""><a href="<?php echo site_url('cuest/reg01/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_reg01">
                            <!-- Bloque de Formulario-->
                            <div class="col-md-6">
                                <div class="box box-primary">
                                    <div class="box-body">
                                    <?php echo $message; ?>
                                        <?php echo form_open('/cuest/reg01/cambio_clave', array('class' => 'form-horizontal', 'id' => 'form-cambio_clave', 'onKeypress' => 'if(event.keyCode == 13) event.returnValue = false;')); ?>
                                        <table class="table table-striped table-hover">
                                            <thead>
                                                <tr>
                                                    <th></th>
                                                    <th></th>
                                                    <th>Cambio de clave</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <th><?php echo lang('reg01_dpto'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->dpto, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($dpto);?></td>
                                                </tr> 
                                                <tr>
                                                    <th><?php echo lang('reg01_distrito'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->distrito, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($distrito);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_barrio'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->barrio, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($barrio);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_colonia'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->colonia, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($colonia);?></td>
                                                    
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_area'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->area, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($area);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_ae'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->ae, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($ae);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_manzana'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->manzana, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($manzana);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_lote_a'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->lote_a, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($lote_a);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_lote_b'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->lote_b, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($lote_b);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_finca'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->finca, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($finca);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_padron'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->padron, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3" class="col-sm-3"><?php echo form_input($padron);?></td>
                                                </tr>
                                                <tr>
                                                    <th><?php echo lang('reg01_cuest'); ?>:</th>
                                                    <td><?php echo htmlspecialchars($reg01_info->cuest, ENT_QUOTES, 'UTF-8'); ?></td>
                                                    <td class="col-sm-3"><?php echo form_input($cuest);?></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' => 'button', 'id' => 'clave_submit', 'class' => 'btn btn-primary btn-flat', 'content' => 'Grabar cambios')); ?>
                                                    <?php echo anchor('monitoreo/panel_control/panel_control/control_operador', 'ATRAS', 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 AYUDA -->
                                        <?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('reg01_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="http://192.168.1.131/intranet2/fotos_cuest_prb/carousel_back.png">
                                            </a>
                                            <a href="#" class="derecha_flecha">
                                                <img src="http://192.168.1.131/intranet2/fotos_cuest_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="http://192.168.1.131/intranet2/fotos_cuest_prb/deleteico.png">
                                            </a>

                                            <a download="imagen_cuest" style="position:absolute;margin-left: 2%; left:0px; z-index:1; 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="http://192.168.1.131/intranet2/fotos_cuest_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 ?>">
                                                    <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 CUESTIONARIO</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_cuest" class="col-md-1 control-label">Foto:</label>
                                            <div class="col-md-1">
                                                <input class="btn btn-info" name="foto_cuest[]" id="foto_cuest[]" 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-body">
                                        <!--<iframe width="320" height="240" src="//e.issuu.com/embed.html#2435676/1234567" frameborder="0" ></iframe>-->
                                    </div>
                                </div>
                            </div>
                            <!-- Fin Bloque de Mapa -->

                            <!-- Fin bloque de Mapa-->
                        </div><!-- /.box-body -->
                    </div><!-- /.tab-pane -->
                </div><!-- /.tab-content -->
            </div><!-- nav-tabs-custom -->                          
        </div>
    </section>
</div>
