<?php
	session_start();
    $usuario = $_SESSION['usuario'];
    $idusuario = $_SESSION['idusuario'];
	$permiso = $_SESSION['permiso'];    
    $id_registro = $_SESSION['id_registro'];	
    include("conex.php");
	
	$fechaactual=date('Y-m-d');
	if(isset($_SESSION['ingreso']) && $_SESSION['ingreso']=='YES')
	{
		if ($id_registro == 0 )
		{
			?>

				<!DOCTYPE html> 
				<html>
					<head>
						<meta http-equiv="refresh" content="0;url=registroCliente.php">
						<title> SGO</title>
						<script language="javascript">
							window.location.href = "registroUsuario.php"
						</script>
					</head>
				</html>
				
			<?php
		}
		else
		{
			
			?> 
			<!DOCTYPE html>
			<html lang="en">
				<head>
					<meta charset="utf-8">
					<meta http-equiv="X-UA-Compatible" content="IE=edge">
					<meta name="viewport" content="width=device-width, initial-scale=1">
					<meta name="description" content="">
					<meta name="author" content="">
					<meta name="viewport" content="width=device-width, initial-scale=1">
					<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
					<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
					<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
					<title> SGO</title>
					<link rel="shortcut icon" href="../../resources/img/icon.ico">
					<link href="../../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
					<link href="../../vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
					<link href="../../dist/css/sb-admin-2.css" rel="stylesheet">
					<link href="../../vendor/morrisjs/morris.css" rel="stylesheet">
					<link href="../../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
					<!--<link rel="stylesheet" type="text/css" href="../../resources/media/css/datatables.bootstrap.min.css"/>-->
					<style>
						img 
						{
							content: ' ';
							display: block;
							position: absolute;
							left: 10;
							top: 0;
							width: 83%;
							height: 100%;
							z-index: 0;
							opacity: 1;
							background-image: url('../../resources/img/mesa_trabajo2.png');
							background-repeat: no-repeat;
							background-position: 50% 0;
							background-size: cover;
						}
					</style>
				<?php
				if ($permiso == 1)
				{	
					?>
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>
						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">                    
									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												
												<li>
													<a href="#"><i class="fa fa-wrench fa-fw"></i> Perfil<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">
														
														<li>
															<a href="actucontra.php">Cambiar contraseña</a>
														</li>
														<li>
															<a href="">Notificaciones</a>
														</li>
														
													</ul>
												</li> 
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div id="page-wrapper">
									<div class="row">
										<div class="col-lg-12 col-md-12">
											<h4> Usuario Cliente: <?php echo $usuario?></h4><hr>
										</div>
										<!-- /.col-lg-12 -->
									</div>
									<!-- /.row -->
									<div class="row ">
										<!-- inicio body-->

										<!--ANUNCIO DE WEB EN CONSTRUCCION --> 
										<div class="col-lg-6 col-md-6">
											<div class="panel panel-WHITE">
												<div class="panel-heading">
													<div class="row">
														
														<img src="../../imagen/web_construccion2.jpg" alt="Chania" width="300" height="200">							
													</div>
												</div>
											</div>
										</div>  
										<!--FIN ANUNCIO DE WEB EN CONSTRUCCION -->					
									</div>
								</div>
							</div>
						</body>	
					<?php
				}
								//if($id_registro == 0  and $permiso==25){//COMPARA SI TIENE PERFIL DE TECNICO Y AUN NO REGISTRA DATOS
				if($permiso==2 or $permiso==777)
				{
					?>
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>
						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">                    
									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
												<!--<li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">												
												<li>
														<a href="#"><i class="fa fa-files-o fa-fw"></i> BODEGAS<span class="fa arrow"></span></a>
														<ul class="nav nav-second-level">
															<li>
																<a href="#"><i class="fa fa-files-o fa-fw"></i> Quito<span class="fa arrow"></span></a>
																<ul class="nav nav-third-level">
																	<li>
																		<a href="../../views/pages/dapPatioQuito.php"><i class="fa fa-file-o "></i> DAP</a>																	
																	</li>
																	<li>
																		<a href="../../views/pages/simplePatioQuito.php"><i class="fa fa-file-o "></i> Simple</a>
																	</li>
																</ul>																
															</li>
															<li>
																<a href="#"><i class="fa fa-files-o fa-fw"></i> Guayaquil<span class="fa arrow"></span></a>
																<ul class="nav nav-third-level">
																	<li>
																		<a href="../../views/pages/dapPatioGuayaquil.php"><i class="fa fa-file-o "></i> DAP</a>																	
																	</li>
																	<li>
																		<a href="../../views/pages/simplePatioGuayaquil.php"><i class="fa fa-file-o "></i> Simple</a>																	
																	</li>
																</ul>
																
															</li>														
														</ul>
													</li>
											
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> CLIENTES<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Automotriz<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">
																<li>
																	<a href="marca.php"><i class="fa fa-file-o "></i> Marcas</a>
																</li>
															</ul>
														</li>														
													</ul>
												</li>												
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="../../views/pages/dai_simple.php"><i class="fa fa-table"></i> Registro de vehículos previo ingreso</a>															
														</li>
														<li>
															<a href="../../views/pages/dai70_simple.php"><i class="fa fa-check-square-o"></i> Guía y Tarja</a>																	
														</li>
														
														<li>
															<a href="../../views/pages/bateria.php"><i class="fa fa-calendar-o"></i> Medición de Batería</a>																	
														</li>
														<li>
															<a href="../../views/pages/impronta.php"><i class="fa fa-list-alt"></i> Improntas</a>																	
														</li>
														<li>
															<a href="../../views/pages/lavada.php"><i class="fa fa-tint"></i> Lavada</a>																	
														</li>
														<li>
															<a href="../../views/pages/inspeccionpds.php"><i class="fa fa-file-text-o"></i> Inspección PDS</a>																	
														</li>
														<li>
															<a href="../../views/pages/alistamiento_pdi.php"><i class="fa fa-cog"></i> Alistamiento PDI</a>																	
														</li>
														<li>
															<a href="../../views/pages/reparacion.php"><i class="fa fa-wrench"></i> Reparación</a>																	
														</li>
														<li>
															<a href="../../views/pages/accesorizacion.php"><i class="fa fa-star"></i> Accesorización</a>																	
														</li>
														<li>
															<a href="../../views/pages/adicionales.php"><i class="fa fa-check-circle"></i> Adicionales</a>																	
														</li>
														<li>
															<a href="../../views/pages/recibe_conforme.php"><i class="fa fa-sign-language"></i> Recibe Conforme</a>																	
														</li>
														<li>
															<a href="../../views/pages/despacho.php"><i class="fa fa-car"></i> Despacho</a>																	
														</li>
														<li>
															<a href="../../views/pages/trazabilidad.php"><i class="fa fa-sort-amount-asc"></i> Trazabilidad</a>																	
														</li>
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Reportes<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">
																<li>
																	<a href="../../views/pages/finalizados_simple.php"><i class="fa fa-files-o fa-fw"></i> Finalizados</a>	
																</li>
																<li>
																	<a href="../../views/pages/reporte_novedad_simple.php"><i class="fa fa-sort-amount-asc"></i> Reporte de Novedades</a>																	
																</li>	
																<li>
																	<a href="../../views/pages/i_general_s.php"><i class="fa fa-sort-amount-asc"></i> Inventario</a>																	
																</li>
																<li>
																	<a href="../../views/pages/reporte_bateria_g.php"><i class="fa fa-sort-amount-asc"></i> Reporte Bateria General</a>																	
																</li>
																<li>
																	<a href="../../views/pages/reporte_pds_g.php"><i class="fa fa-sort-amount-asc"></i> Reporte PDS General</a>																	
																</li>
															</ul>
														</li>	
													</ul>
												</li>											
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> DAP <span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Solicitud Previa<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">
																<li>
																	<a href="solicitud_previa.php"><i class="fa fa-file-o "></i> Ingresar</a>
																</li>
															</ul>
														</li>														
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> DAI 70<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">																
																<li>
																	<a href="dai70.php"><i class="fa fa-files-o fa-fw"></i> Guía y Tarja</a>																	
																</li>																
															</ul>
														</li>														
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Factura Informativa<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">
																<li>
																	<a href="facturainformativa.php"><i class="fa fa-files-o fa-fw"></i> Generar Factura Informativa</a>
																</li>																
																<li>
																	<a href="nacionalizacion.php"><i class="fa fa-files-o fa-fw"></i> Nacionalización</a>
																</li>																
																<li>
																	<a href="directa.php"><i class="fa fa-files-o fa-fw"></i> Nacionalización Directa</a>
																</li>																
															</ul>
														</li>														
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> DAI 10<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">														
																<li>
																	<a href="nacionalizados.php"><i class="fa fa-files-o fa-fw"></i> Nacionalizados</a>
																</li>														
															</ul>
														</li>														
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Facturación<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">
																<li>
																	<a href="facturacion.php"><i class="fa fa-files-o fa-fw"></i> Cuentas por Cobrar<span class="fa arrow"></span></a>
																</li>																
															</ul>
														</li>
														
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Reportes<span class="fa arrow"></span></a>
															<ul class="nav nav-third-level">
																<li>
																	<a href="../../views/pages/finalizados.php"><i class="fa fa-files-o fa-fw"></i> Finalizados</a>	
																</li>
																<li>
																	<a href="../../views/pages/repor_novedad.php"><i class="fa fa-sort-amount-asc"></i> Reporte de Novedades</a>																	
																</li>	
																<li>
																	<a href="../../views/pages/trazabilidad.php"><i class="fa fa-sort-amount-asc"></i> Trazabilidad</a>																	
																</li>
																<li>
																	<a href="../../views/pages/i_general.php"><i class="fa fa-sort-amount-asc"></i> Inventario</a>																	
																</li>	
															</ul>
														</li>														
													</ul>
												</li>
												<?php
												if($permiso==777)
												{
													?>
													<ul class="nav nav-first-level">
														<li>
															<a href="#"><i class="fa fa-files-o fa-fw"></i> Administración<span class="fa arrow"></span></a>
															<ul class="nav nav-second-level">
																<li>
																	<a href="usuario.php"><i class="fa fa-file-o "></i> Usuarios</a>
																</li>
																<li>
																	<a href="#"><i class="fa fa-files-o fa-fw"></i> Inventario Empresas<span class="fa arrow"></span></a>
																	<ul class="nav nav-third-level">
																		<li>
																			<a href="../../views/pages/tarja_toyota.php"><i class="fa fa-files-o fa-fw"></i> TOYOTA</a>																					
																		</li>
																		<li>
																			<a href="../../views/pages/tarja_distrivehic.php"><i class="fa fa-files-o fa-fw"></i> DISTRIVEHIC</a>																					
																		</li>
																		<li>
																			<a href="../../views/pages/tarja_szk.php"><i class="fa fa-files-o fa-fw"></i> SZK</a>																					
																		</li>
																		<li>
																			<a href="../../views/pages/tarja_nexum.php"><i class="fa fa-files-o fa-fw"></i> NEXUMCORP</a>																					
																		</li>
																		<li>
																			<a href="../../views/pages/tarja_teojama.php"><i class="fa fa-files-o fa-fw"></i> TEOJAMA</a>																					
																		</li>
																	</ul>
																</li>
															</ul>
														</li>
													</ul>

													<?php
												}
												?>
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div id="page-wrapper">									
									<div class="row">										 
										<div class="col-lg-12 col-md-12">
											<div class="panel panel-WHITE">
												<div class="panel-heading">
													<div class="panel panel-success">
														<div class="panel-heading">DAP</div>
														<div class="panel-body">
															<div class="row">
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-yellow">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-database fa-3x"></i>
																				</div>

																				<div class="col-xs-8 text-center">
																					<h3>DAI 70</h3>
																				</div>

																			   <div class="col-xs-2 text-right">
																					<div class="huge"><?php 
                                                                                        $contn = "SELECT DISTINCT d.iddatadai 
                                                                                                    FROM tb_datadai AS d
                                                                                                    INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                                    WHERE 
                                                                                                    d.condicion = 1 
                                                                                                    AND sp.condicion = 1
                                                                                                    AND d.dai = 70
                                                                                                    AND d.id_estado > 1 AND d.id_estado < 9"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
                                                                                        ?>

																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-green">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-database fa-3x"></i>
																				</div>

																				<div class="col-xs-8 text-center">
																					<h3>DAI 10</h3>
																				</div>

																			   <div class="col-xs-2 text-right">
																					<div class="huge"><?php 
																					            $contn = "SELECT DISTINCT d.iddatadai 
                                                                                                    FROM tb_datadai AS d
                                                                                                    INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                                    WHERE 
                                                                                                    d.condicion = 1 
                                                                                                    AND sp.condicion = 1
                                                                                                    AND d.dai = 10
                                                                                                    AND d.id_estado > 1 AND d.id_estado < 9";
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
																								?>																					
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-yellow">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-paper-plane fa-2x"></i>
																				</div>

																				<div class="col-xs-8 text-center">
																					<h3>DAI 70 UIO</h3>
																				</div>

																			   <div class="col-xs-2 text-right">
																					<div class="huge"><?php 
                                                                                        $contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 70
                                                                                        AND d.id_estado > 1 AND d.id_estado < 9 
                                                                            			and d.id_bodega = 1"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
                                                                                        ?>
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-green">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-paper-plane fa-2x"></i>
																				</div>

																				<div class="col-xs-8 text-center">
																					<h3>DAI 10 UIO</h3>
																				</div>

																			   <div class="col-xs-2 text-right">
																					<div class="huge"><?php 
																					    $contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 10
                                                                                        AND d.id_estado > 1 AND d.id_estado < 9 
                                                                            			and d.id_bodega = 1"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
																								?>
																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-yellow">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-ship fa-3x"></i>
																				</div>

																				<div class="col-xs-8 text-center">
																					<h3>DAI 70 GYE</h3>
																				</div>

																			   <div class="col-xs-2 text-right">
																					<div class="huge"><?php 
                                                                                        $contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 70
                                                                                        AND d.id_estado > 1 AND d.id_estado < 9 
                                                                            			and d.id_bodega = 2"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
                                                                                        ?>
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-green">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-ship fa-3x"></i>
																				</div>

																				<div class="col-xs-8 text-center">
																					<h3>DAI 10 GYE</h3>
																				</div>

																			   <div class="col-xs-2 text-right">
																					<div class="huge"><?php 
																					$contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 10
                                                                                        AND d.id_estado > 1 AND d.id_estado < 9 
                                                                            			and d.id_bodega = 2"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
																								?>
																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-red">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-3">
																					<i class="fa fa-clock-o fa-3x"></i>
																				</div>

																				<div class="col-xs-6 text-center">
																					<h6>DAI POR VENCER</h6>
																				</div>

																			   <div class="col-xs-3 text-right">
																					<div class="huge"><?php
																								$fecha_actual= date("Y");
																								$id=0;
																								$perfil = "SELECT sp.fecha 
																								FROM tb_solicitudprevia as sp
																								WHERE sp.condicion =1 
																								";																											
																								$per = mysqli_query($conn,$perfil);
																								while($row = mysqli_fetch_array($per))
																									{																							  
																										$fecha = new DateTime($row['fecha']); 
																										$hoy = new DateTime();
																										$edad = $hoy->diff($fecha);
																										if(($edad->d)>=305)
																										{
																											$id++;
																										}
																										
																									}																								
																								echo $id;																								
																								?>
																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																
																<div class="col-lg-6 col-md-6">
																	<div class="panel panel-red">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-3">
																					<i class="fa fa-clock-o fa-3x"></i>
																				</div>

																				<div class="col-xs-6 text-center">
																					<h6>FACTURA INFORMATIVA</h6>
																				</div>

																			   <div class="col-xs-3 text-right">
																					<div class="huge"><?php
																								$fecha_actual= date("Y");
																								$id=0;
																								$perfil = "SELECT sp.fecha 
																								FROM tb_solicitudprevia as sp
																								WHERE sp.condicion =1 
																								";																											
																								$per = mysqli_query($conn, $perfil);
																								while($row = mysqli_fetch_array($per))
																									{																							  
																										$fecha = new DateTime($row['fecha']); 
																										$hoy = new DateTime();
																										$edad = $hoy->diff($fecha);
																										if(($edad->d)>=305)
																										{
																											$id++;
																										}
																										
																									}																								
																								echo $id;																								
																								?>
																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>  
										
										<div class="col-lg-12 col-md-12">
											<div class="panel panel-WHITE">
												<div class="panel-heading">
													<div class="panel panel-primary">
														<div class="panel-heading">SIMPLE</div>
														<div class="panel-body">
															<div class="row">
																<div class="col-lg-4 col-md-4">
																	<div class="panel panel-info">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-database fa-3x"></i>
																				</div>
																				<div class="col-xs-6 text-center">
																					<h6><br>DAI SIMPLE</h6>
																				</div>
																			   <div class="col-xs-1 text-right">
																					<div class="huge"><?php 
																				        $contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 'Simple'
                                                                                        AND d.id_estado > 9 AND d.id_estado < 22"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
																						?>
																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
																		
																<div class="col-lg-4 col-md-4">
																	<div class="panel panel-info">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-paper-plane fa-2x"></i>
																				</div>
																				<div class="col-xs-6 text-center">
																					<h6><br>DAI SIMPLE UIO</h6>
																				</div>
																				<div class="col-xs-3 text-right">
																					<div class="huge"><?php 
																				        $contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 'Simple'
                                                                                        AND d.id_estado > 9 AND d.id_estado < 22
                                                                                        and d.id_bodega = 1"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
																						?>
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>								
																																
																<div class="col-lg-4 col-md-4">
																	<div class="panel panel-info">
																		<div class="panel-heading">
																			<div class="row">
																				<div class="col-xs-2">
																					<i class="fa fa-ship fa-3x"></i>
																				</div>
																				<div class="col-xs-6 text-center">
																					<h6><br>DAI SIMPLE GYE</h6>
																				</div>
																				<div class="col-xs-3 text-right">
																					<div class="huge"><?php 
																					$contn = "SELECT DISTINCT d.iddatadai 
                                                                                        FROM tb_datadai AS d
                                                                                        INNER JOIN tb_solicitudprevia AS sp ON sp.idsolicitudprevia = d.id_solicitudprevia
                                                                                        WHERE 
                                                                                        d.condicion = 1 
                                                                                        AND sp.condicion = 1
                                                                                        AND d.dai = 'Simple'
                                                                                        AND d.id_estado > 9 AND d.id_estado < 22
                                                                                        and d.id_bodega = 2"; 
                                                                                        $rn = mysqli_query($conn, $contn); 
                                                                                        $rcountn = mysqli_num_rows($rn); 
                                                                                        echo $rcountn;
																								?>																						
																					</div>
																				</div>
																			</div>
																		</div>
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div> 
										</div>																				
									</div>
								</div>								
							</div>							
						</body>						
					<?php
					
				}
				
				
				if ($permiso == 3)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">												
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div id="page-wrapper">									
									<div class="row ">										
										<div class="col-lg-12 col-md-12">
											<div class="panel panel-WHITE">
												<div class="panel-heading">
													<div class="row">
														<div  class="col-md-12 col-md-offset-0">    
															<table id="dai" class="table table-hover" cellspacing="0" width="100%">
																<thead>
																	<tr class="info"> 																																									
																		<th>Nº Item</th>																			
																		<th>Marca</th>																			
																		<th>Modelo</th>										
																		<th>Nº de Chasis</th>																										
																		<th>Nº de Motor</th>																										
																		<th>Color</th>																										
																		<th>Estado</th>																										
																		<th> </th>									
																	</tr>
																</thead>
																<tbody>
																	<!--en esta area se carga en una matriz la tabla solicitud-->
																</tbody>
															</table>        
														</div>																					
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->					
					<?php
				}														
				if ($permiso == 4)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> DAI 70<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="dai_dap.php"><i class="fa fa-files-o fa-fw"></i> Buscar</a>															
														</li>														
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				if ($permiso == 5)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														
														<li>
															<a href="../../views/pages/impronta_simple.php"><i class="fa fa-list-alt"></i> Improntas</a>																	
														</li>														
														
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				
				if ($permiso == 6)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														
														<li>
															<a href="../../views/pages/lavada_simple.php"><i class="fa fa-tint"></i> Lavada</a>																	
														</li>
														<li>
															<a href="../../views/pages/repor_l_diario.php"><i class="fa fa-tint"></i> Reporte diario</a>																	
														</li>
														<li>
															<a href="../../views/pages/repor_l_total.php"><i class="fa fa-tint"></i> Reporte total</a>																	
														</li>
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
								
				if ($permiso == 7)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														
														<li>
															<a href="../../views/pages/pds_simple.php"><i class="fa fa-file-text-o"></i> Inspección PDS</a>																	
														</li>													
														
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				
				
				if ($permiso == 8)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="../../views/pages/reparacion_simple.php"><i class="fa fa-wrench"></i> Reparación</a>																	
														</li>														
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				if ($permiso == 9)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="../../views/pages/accesorizacion_simple.php"><i class="fa fa-star"></i> Accesorización</a>																	
														</li>
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				if ($permiso == 10)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="../../views/pages/baterias.php"><i class="fa fa-calendar-o"></i> Medición de Batería</a>																	
														</li>
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				if ($permiso == 11)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="../../views/pages/dai70_simple.php"><i class="fa fa-check-square-o"></i> Guía y Tarja</a>																	
														</li>
														<li>
															<a href="../../views/pages/baterias.php"><i class="fa fa-calendar-o"></i> Medición de Batería</a>																	
														</li>
														<li>
															<a href="../../views/pages/impronta_simple.php"><i class="fa fa-list-alt"></i> Improntas</a>																	
														</li>
														<li>
															<a href="../../views/pages/lavada_simple.php"><i class="fa fa-tint"></i> Lavada PDS</a>																	
														</li>
														<li>
															<a href="../../views/pages/pds_simple.php"><i class="fa fa-file-text-o"></i> Inspección PDS</a>																	
														</li>
														<li>
															<a href="../../views/pages/supervisor.php"><i class="fa fa-cog"></i> Alistamiento PDI</a>																	
														</li>
														<li>
															<a href="../../views/pages/lavada_pdi.php"><i class="fa fa-tint"></i> Lavada PDI</a>																	
														</li>														
														<li>
															<a href="../../views/pages/reparacion_simple.php"><i class="fa fa-wrench"></i> Reparación</a>																	
														</li>
														<li>
															<a href="../../views/pages/accesorizacion.php"><i class="fa fa-star"></i> Accesorización</a>																	
														</li>
														<li>
															<a href="../../views/pages/accesorizacion_s.php"><i class="fa fa-star-o"></i> Accesorizar</a>																	
														</li>
														<li>
															<a href="../../views/pages/adicionales.php"><i class="fa fa-check-circle"></i> Adicionales</a>																	
														</li>
														<li>
															<a href="../../views/pages/recibe_conforme.php"><i class="fa fa-sign-language"></i> Recibe Conforme</a>																	
														</li>
													</ul>
												</li>
												<li>
													<a href="dai_dap.php"><i class="fa fa-files-o fa-fw"></i> Tarja</a>													
												</li>
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				if ($permiso == 12)
				{
					?>					
						<body>
							<div id="wrapper">
								<!-- Navigation -->
								<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
									<div class="navbar-header">
										<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
											<span class="sr-only">Toggle navigation</span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
											<span class="icon-bar"></span>
										</button>						
										<a class="navbar-brand" href="index.php" >LATKIC S.A.</a>       
									</div>
									<!-- /.navbar-header -->
									<ul class="nav navbar-top-links navbar-right">									   
										<li class="dropdown">
											<a class="dropdown-toggle" data-toggle="dropdown" href="#">
												<i class="fa fa-user fa-fw"></i> En linea <?php echo $usuario; ?> <i class="fa fa-caret-down"></i>
											</a>
											<ul class="dropdown-menu dropdown-user">
											<!--    <li><a href="actualizarCliente.php"><i class="fa fa-user fa-fw"></i> Perfil de usuario</a>
												</li> -->
												<li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraciones</a>
												</li>
												<li class="divider"></li>
												<li><a href="javascript: void(0)" onclick="cerrar();"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a>                        
												</li>
											</ul>
											<!-- /.dropdown-user -->
										</li>
										<!-- /.dropdown -->
									</ul>
									<!-- /.navbar-top-links -->
									<div class="navbar-default sidebar" role="navigation">
										<div class="sidebar-nav navbar-collapse">
											<ul class="nav" id="side-menu">						
												<li>
													<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Principal</a>
												</li>
												<li>
													<a href="#"><i class="fa fa-files-o fa-fw"></i> SIMPLE<span class="fa arrow"></span></a>
													<ul class="nav nav-second-level">														
														<li>
															<a href="../../views/pages/despacho.php"><i class="fa fa-car"></i> Despacho</a>																	
														</li>
														<li>
															<a href="../../views/pages/finalizados_simple.php"><i class="fa fa-files-o fa-fw"></i> Finalizados</a>	
														</li>
													</ul>
												</li>												
											</ul>
										</div>
										<!-- /.sidebar-collapse -->
									</div>
									<!-- /.navbar-static-side -->
								</nav>
								<div  id="page-wrapper">
									<div class="row">
										<img>										
									</div>
								</div>
							</div>
						</body>						
						<!-- /#page-wrapper -->						
					<?php
				}
				?>
			</html>
			<?php
		}
	}
	else
	{
		?>
			<!DOCTYPE html> 
			<html>
				<head>
					<meta http-equiv="refresh" content="0;url=../../views/index.php">
					<title>SGO</title>
					<script language="javascript">
						window.location.href = "../../views/index.php"
					</script>
				</head>
				<body>
					Go to <a href="../../views/index.php">../../views/index.php</a>
				</body>
			</html>
		<?php

	}
		?>
	<script src="../../resources/js/jquery-1.10.2.js"></script>
	<script src="../../vendor/jquery/jquery.min.js"></script>
	<script src="../../resources/js/bootstrap.js"></script>
	<script src="../../vendor/metisMenu/metisMenu.min.js"></script>
	<script src="../../vendor/raphael/raphael.min.js"></script>  
	<script src="../../dist/js/sb-admin-2.js"></script>
	<script src="../../resources/media/js/jquery.dataTables.min.js"></script>
	<script src="../../resources/media/js/dataTables.bootstrap.min.js"></script>
	<script src="../../resources/js/menu_garita.js"></script>
	

<!-- area de los script-->
<script>
    //funcion cerrar seciones
    function cerrar()
    {
        $.ajax({
            url:'../../controllers/usuario.php',
            type:'POST',
            data:"boton=cerrar"
        }).done(function(resp){
            location.href ='index.php'
        });
    }
</script>

<!-- Modal dai 70-->
<div class="modal fade" id="dai70" role="dialog">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">DAI 70</h4>
			</div>			
				<div  class="col-md-12 col-md-offset-0">    
					<table id="dai1" class="table table-hover" cellspacing="0" width="100%">
						<thead>
							<tr class="info"> 																																									
								
								<th>DAI</th>	
								<th>Marca</th>																			
								<th>Modelo</th>
								<th>Nº de Chasis</th>																										
								<th>Nº de Motor</th>																										
								<th>Color</th>																										
							
							</tr>
						</thead>
						<tbody>
								<!--en esta area se carga en una matriz la tabla solicitud-->
						</tbody>
					</table>        
				</div>
			
			<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
    </div>
</div>
<!-- Modal dai 10-->
<div class="modal fade" id="dai10" role="dialog">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">DAI 10</h4>
			</div>
			
				<div  class="col-md-12 col-md-offset-0">    
					<table id="dai2" class="table table-hover" cellspacing="0" width="100%">
						<thead>
							<tr class="info"> 																																									
								
								<th>DAI</th>	
								<th>Marca</th>																			
								<th>Modelo</th>
								<th>Nº de Chasis</th>																										
								<th>Nº de Motor</th>																										
								<th>Color</th>																										
							
							</tr>
						</thead>
						<tbody>
								<!--en esta area se carga en una matriz la tabla solicitud-->
						</tbody>
					</table>        
				</div>
			
			<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
    </div>
</div>

<!-- Modal dai 70 uio-->
<div class="modal fade" id="dai70uio" role="dialog">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">DAI 70 QUITO</h4>
			</div>
			
				<div  class="col-md-12 col-md-offset-0">    
					<table id="dai3" class="table table-hover" cellspacing="0" width="100%">
						<thead>
							<tr class="info"> 																																									
								
								<th>DAI</th>	
								<th>Marca</th>																			
								<th>Modelo</th>
								<th>Nº de Chasis</th>																										
								<th>Nº de Motor</th>																										
								<th>Color</th>																										
							
							</tr>
						</thead>
						<tbody>
								<!--en esta area se carga en una matriz la tabla solicitud-->
						</tbody>
					</table>        
				</div>
			
			<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
    </div>
</div>

<!-- Modal dai 10 uio-->
<div class="modal fade" id="dai10uio" role="dialog">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">DAI 10 QUITO</h4>
			</div>
			
				<div  class="col-md-12 col-md-offset-0">    
					<table id="dai4" class="table table-hover" cellspacing="0" width="100%">
						<thead>
							<tr class="info"> 																																								
								
								<th>DAI</th>	
								<th>Marca</th>																			
								<th>Modelo</th>
								<th>Nº de Chasis</th>																										
								<th>Nº de Motor</th>																										
								<th>Color</th>																										
							
							</tr>
						</thead>
						<tbody>
								<!--en esta area se carga en una matriz la tabla solicitud-->
						</tbody>
					</table>        
				</div>
			
			<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
    </div>
</div>


<!-- Modal dai 70 gye-->
<div class="modal fade" id="dai70gye" role="dialog">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">DAI 70 GUAYAQUIL</h4>
			</div>
			
				<div  class="col-md-12 col-md-offset-0">    
					<table id="dai5" class="table table-hover" cellspacing="0" width="100%">
						<thead>
							<tr class="info"> 																																								
								
								<th>DAI</th>	
								<th>Marca</th>																			
								<th>Modelo</th>
								<th>Nº de Chasis</th>																										
								<th>Nº de Motor</th>																										
								<th>Color</th>																										
							
							</tr>
						</thead>
						<tbody>
								<!--en esta area se carga en una matriz la tabla solicitud-->
						</tbody>
					</table>        
				</div>
			
			<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
    </div>
</div>


<!-- Modal dai 10 gye-->
<div class="modal fade" id="dai10gye" role="dialog">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">DAI 10 GUAYAQUIL</h4>
			</div>
			
				<div  class="col-md-12 col-md-offset-0">    
					<table id="dai6" class="table table-hover" cellspacing="0" width="100%">
						<thead>
							<tr class="info"> 																																								
								
								<th>DAI</th>	
								<th>Marca</th>																			
								<th>Modelo</th>
								<th>Nº de Chasis</th>																										
								<th>Nº de Motor</th>																										
								<th>Color</th>																										
							
							</tr>
						</thead>
						<tbody>
								<!--en esta area se carga en una matriz la tabla solicitud-->
						</tbody>
					</table>        
				</div>
			
			<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
    </div>
</div>


