<?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"><?php echo $_SESSION['identificador'] ?></h3>
			</div>
			<!-- Custom Tabs -->
			<div class="nav-tabs-custom">
				<ul class="nav nav-tabs">
					<li class=""><a href="<?php echo site_url('cuest/reg01/vista_ident_geo/'.$_SESSION['identificador']); ?>" aria-expanded="false">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="active"><a data-toggle="tab" href="<?php echo site_url('cuest/reg01/reg09_viviendas/');        ?>" aria-expanded="true" style="  background-color: #F0F0F0">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>
				<!-- Contenido de la pestaña -->
				<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-12">
								<div class="box box-primary">
									<div class="box-header with-border">
										<h3 class="box-title"><?php echo lang('reg09_capitulo_d_vivienda'); ?></h3>
									</div>
									<?php 
									if (is_array($_SESSION['errores_cuestionario']) && array_key_exists('reg09_viviendas', $_SESSION['errores_cuestionario']))
								    {
								       	if ($_SESSION['errores_cuestionario']['reg09_viviendas'] != NULL) {
	                                	
	                                	    echo '<pre>';
	                                	    echo '<h4><b>Errores</b></h4>';
		
	                                	    foreach ($_SESSION['errores_cuestionario']['reg09_viviendas'] as $key => $value)	 {
	                                	        echo '<h5>'.$value.'</h5><br>';
	                                	    } 
	                                	echo '</pre>';
	                                	}
								    }
	                                ?>
                                        <div id="pop" style="display: none;">
                                            <button type="button" class="btn btn-info" id="hide_fotos">Ocultar Fotos</button>
                                                <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>

                                                    
                                                    <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; ?>
                                                <input id="cantidad_fotos" type="hidden" value="<?php echo $_SESSION['cant_fotos'] ?>" />
                                            </div>
                                        </div>
                                        <button type="button" class="foto_tbn btn btn-info" id="show_fotos">Ver Fotos</button>

									<?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-edit_user')); ?>
									<!-- Primer bloque -->
									<div class="box-body">
										<div class="col-md-7">
											<div class="form-group">
												<?php echo lang('reg09_v01', 'v01', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php 
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v01"'; 
													echo form_dropdown('v01', $v01, $v01_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v01_esp', 'v01_esp', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($v01_esp); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v02', 'v02', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v02"'; 
													echo form_dropdown('v02', $v02, $v02_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v02_esp', 'v02_esp', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($v02_esp); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v03', 'v03', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v03"'; 
													echo form_dropdown('v03', $v03, $v03_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v03_esp', 'v03_esp', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($v03_esp); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v04', 'v04', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v04"'; 
													echo form_dropdown('v04', $v04, $v04_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v05a', 'v05_a', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v05_a"'; 
													echo form_dropdown('v05_a', $v05_a, $v05_a_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v05b', 'v05b', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v05_b"'; 
													echo form_dropdown('v05_b', $v05_b, $v05_b_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v06', 'v06', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v06"'; 
													echo form_dropdown('v06', $v06, $v06_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v07', 'v07', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v07"'; 
													echo form_dropdown('v07', $v07, $v07_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v07_esp', 'v07_esp', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($v07_esp); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v08', 'v08', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v08"'; 
													echo form_dropdown('v08', $v08, $v08_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v09', 'v09', array('class' => 'col-sm-10 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-2">
													<?php  
													$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v09"'; 
													echo form_dropdown('v09', $v09, $v09_sel,$attribute); ?>
												</div>
											</div>
										</div>
										<div class="col-md-5">
											<div class="form-group">
												<?php echo lang('reg09_v1001', 'v1001', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1001"'; 
														echo form_dropdown('v1001', $v1001, $v1001_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1002', 'v1002', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1002"'; 
														echo form_dropdown('v1002', $v1002, $v1002_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1003', 'v1003', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1003"'; 
														echo form_dropdown('v1003', $v1003, $v1003_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1004', 'v1004', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1004"'; 
														echo form_dropdown('v1004', $v1004, $v1004_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1005', 'v1005', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1005"'; 
														echo form_dropdown('v1005', $v1005, $v1005_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1006', 'v1006', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1006"'; 
														echo form_dropdown('v1006', $v1006, $v1006_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1007', 'v1007', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1007"'; 
														echo form_dropdown('v1007', $v1007, $v1007_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1008', 'v1008', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1008"'; 
														echo form_dropdown('v1008', $v1008, $v1008_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1009', 'v1009', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1009"'; 
														echo form_dropdown('v1009', $v1009, $v1009_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1010', 'v1010', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1010"'; 
														echo form_dropdown('v1010', $v1010, $v1010_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1011', 'v1011', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1011"'; 
														echo form_dropdown('v1011', $v1011, $v1011_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1012', 'v1012', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1012"'; 
														echo form_dropdown('v1012', $v1012, $v1012_sel,$attribute); ?>
												</div>
											</div>
											<div class="form-group">
												<?php echo lang('reg09_v1013', 'v1013', array('class' => 'col-sm-8 control-label', 'style' => 'display: inline-block;text-align: left;')); ?>
												<div class="col-sm-4">
													<?php  
														$attribute = 'class="selectpicker show-tick form-control" title="Fuera de rango" id="v1013"'; 
														echo form_dropdown('v1013', $v1013, $v1013_sel,$attribute); ?>
												</div>
											</div>
											<hr></hr>
											<div class="form-group">
												<?php echo lang('reg09_total_m', 'total_m', array('class' => 'col-sm-2 control-label', 'style' => 'display: inline-block;text-align: right;')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($total_m); ?>
												</div>
												<?php echo lang('reg09_total_h', 'total_h', array('class' => 'col-sm-2 control-label', 'style' => 'display: inline-block;text-align: right')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($total_h); ?>
												</div>
												<?php echo lang('reg09_total_p', 'total_p', array('class' => 'col-sm-2 control-label', 'style' => 'display: inline-block;text-align: right;')); ?>
												<div class="col-sm-2">
													<?php 
														echo form_input($total_p); ?>
												</div>
											</div>
										</div>
										<hr></hr>
										<!-- Sección botones -->
										<div class="form-group">
											<div class="col-sm-offset-1 col-sm-10" align="center">
												<div class="btn-group">
													<?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>
													<?php echo anchor('monitoreo/panel_control/panel_control/control_operador', 'ATRAS', array('class' => 'btn btn-default btn-flat')); ?>
												</div>
											</div>
										</div><!-- Fin sección botones -->
									</div><!-- Fin primer bloque -->
									<?php echo form_close();?>
								</div>
							</div><!-- /.box-body -->
							<!-- Fin Bloque Formulario -->
						</div><!-- /.tab-pane -->
					</div><!-- /.tab-content -->
				</div>
				<!-- Fin de contenido de la pestaña -->
			</div>
		</div>
	</section>
</div>
