<?php
	
	session_start();

	/* Connect To Database*/
	require_once ("config/db.php");//Contiene las variables de configuracion para conectar a la base de datos
	require_once ("config/conexion.php");//Contiene funcion que conecta a la base de datos
	
	$active_facturas="";
	$active_productos="active";
	$active_clientes="";
	$active_usuarios="";	
	$title="INVENTARIO | FONTUR";
	
	
?>
<!DOCTYPE html>
<html lang="en">
<script src="scripts/functions.js"></script>
<script src="scripts/prefixfree.min.js"></script>
<script src="scripts/jquery.dataTables.js"></script>
<script src="scripts/jquery-ui-1.10.3.custom.js"></script>
<script src="scripts/jquery-barcode.js"></script>

<head>
	<?php include("head.php");?>
</head>
<body onLoad="">

<div class="container" style="width:90%">
	<div class="panel panel-info">
		<div class="panel-heading">
		
		<?php 
	$est="General";
	?>
			<h4><i class='glyphicon glyphicon-search'></i> Consultar Respuestos <?php echo $est;?></h4>
		</div>
		<div class="panel-body">
			<?php
			
			include("modal/ubicaciones.php");
			?>
			<form class="form-horizontal" role="form" id="datos" method="post">
				
				<div class="form-group row">
					<div class="table-responsive" align="center">
						<table class="table">
   			       			<tr>
							    <td align="right">Estado o Tienda</td>
								<td align="left" class="col-md-4"><select class="form-control" id="est" name="est" onchange='load(1);'/>
	 			          			<option value="">Consolidado</option>
									
						  			<?php 
              						$count_query= mysqli_query($con, "SELECT * FROM `tiendas`");
		     						while($dato= mysqli_fetch_array($count_query))
									{
			 							$tienda=$dato['nombre'];
			  							?>
                  						<option value="<?php echo $tienda; ?>"><?php echo $tienda; ?></option>
                  					<?php 
									}	 
						  			?>
                          			</select> 
								</td>
								<td></td>
							</tr>
						</table>
						<table class="table">
							<tr  class="info">
							
		       					<td align="right">Rubro</td>
        			    		<td><select class="form-control" id="rub" name="rub" onchange='load(1);'/>
	 			          			<option value="">---Seleccione una opcion---</option>
						  			<?php 
              						$count_query= mysqli_query($con, "SELECT * FROM `products` GROUP BY `tipo_producto`");
		     						while($dato= mysqli_fetch_array($count_query))
									{
			 							$rubro=$dato['tipo_producto'];
			  							?>
                  						<option value="<?php echo $rubro; ?>"><?php echo $rubro; ?></option>
                  					<?php 
									}	 
						  			?>
                          			</select> 
								</td>
			            		<td align="right">Marca</td>
        			    		<td><select class="form-control" id="marca" name="marca" onchange='load(1);'/>
	 			          			<option value="">---Seleccione una opcion---</option>
						  			<?php 
              						$count_query= mysqli_query($con, "SELECT * FROM `products` GROUP BY `marca`");
		     						while($dato= mysqli_fetch_array($count_query))
									{
			 							$marca=$dato['marca'];
			  						?>
                  						<option value="<?php echo $marca; ?>"><?php echo $marca; ?></option>
                  					<?php 
									} 
						  			?>
                          			</select> 
								</td>
						 		<td align="right">Presentacion</td>
        			    		<td><select class="form-control" id="presentacion" name="presentacion" onchange='load(1);'/>
	 			          			<option value="">---Seleccione una opcion---</option>
						  			<?php 
              						$count_query= mysqli_query($con, "SELECT * FROM `products` GROUP BY `status_producto`");
		     						while($dato= mysqli_fetch_array($count_query))
									{
			 							$presentacion=$dato['status_producto'];
			  							?>
                  						<option value="<?php echo $presentacion; ?>"><?php echo $presentacion; ?></option>
                  					<?php 
									} 
						  			?>
                          			</select> 
								</td>
								<td align="right">Descripcion</td>
								<td><input type="text" class="form-control" id="q" name="q" placeholder="Nombre del producto" onkeyup='load(1);'>
								</td>
								
        					</tr>
                		</table>
            		</div>
				</div>		
			</form>
			<div id="resultados"></div><!-- Carga los datos ajax -->
			<div class='outer_div'></div><!-- Carga los datos ajax -->
			
  		</div>
	</div>
</div>
<hr>
<?php
include("footer.php");
?>
<script type="text/javascript" src="js/catalogo.js"></script>
</body>
</html>

