<?php
if (isset($conexion)) {
?>
	<div id="buscar" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h4 class="modal-title"><i class='fa fa-search'></i> Buscar Productos</h4>
				</div>
				<div class="modal-body">

					<form class="form-horizontal">
						<div class="form-group row">
							<!--<div class="col-md-3">
								<div class="input-group">
									<select name='id_sucursal' id='id_sucursal' class="form-control" onchange="load(1);" <?php echo $est; ?>>
										<option value="">-- SUCURSAL --</option>
										<option value="">Todos</option>

										<?php
										$query_suc = mysqli_query($conexion, "select id_sucursal, nombre_sucursal from sucursales order by nombre_sucursal");
										while ($rr = mysqli_fetch_array($query_suc)) {
											if ($rr['id_sucursal'] == $sucursal_users) {
												echo '<option value="' . $rr['id_sucursal'] . '" selected>' . $rr['nombre_sucursal'] . '</option>';
											} else {
												echo '<option value="' . $rr['id_sucursal'] . '">' . $rr['nombre_sucursal'] . '</option>';
											}
										}
										?>
									</select>
								</div>
							</div>-->
							<div class="col-md-8">
								<div class="input-group">
									<input type="text" autocomplete="off" class="form-control" id="q" placeholder="BUSCAR CODIGO/NOMBRE/MARCA" onkeyup="load(1)">
									<span class="input-group-btn">
										<button type="button" class="btn btn-primary waves-effect waves-light" onclick="load(1)"><span class="fa fa-search"></span></button>
									</span>
								</div>
							</div>
							<div class="col-md-4">
								<div class="input-group">
									<select name='categoria' id='categoria' class="form-control" onchange="load(1);">
										<option value="">-- CATEGORIA --</option>
										<option value="">Todos</option>
										<?php

										$query_categoria = mysqli_query($conexion, "select * from lineas order by nombre_linea");
										while ($rw = mysqli_fetch_array($query_categoria)) {
										?>
											<option value="<?php echo $rw['id_linea']; ?>"><?php echo $rw['nombre_linea']; ?></option>
										<?php
										}
										?>
									</select>
								</div>
							</div>
							<div class="col-md-3">
								<div id="loader"></div><!-- Carga gif animado -->
							</div>
						</div>
					</form>
					<div class="outer_div"></div><!-- Datos ajax Final -->

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cerrar</button>
				</div>
			</div>
		</div>
	</div><!-- /.modal -->
<?php
}
?>