<?php
if (isset($con))
{
?>
<!-- Modal -->
	<div class="modal fade" id="myModalempleado" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
		  		<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel"><i class='glyphicon glyphicon-edit'></i> Agregar nuevo empleado</h4>
		  		</div>
		  		<div class="modal-body">
					<form class="form-horizontal" method="post" id="guardar_empleado" name="guardar_empleado">
						<div id="resultados_ajax"></div>
						<div class="form-group">
							<label for="tienda" class="col-sm-3 control-label">Tienda</label>
							<div class="col-sm-8">
				   				<select name="tienda" id="tienda" class="form-control">
                  					<option value="">---Seleccione una Tienda---</option>
				  					<option value="">SEDE</option>
                  					<?php 
              							$count_query= mysqli_query($con, "SELECT * FROM tiendas");
		      							while($dato= mysqli_fetch_array($count_query))
										{
			  								$estado=$dato['nombre'];
			  								$id_estado=$dato['id_tienda'];
			  								?>
                  							<option value="<?php echo $id_estado ?>"><?php echo $estado ?></option>
                  					<?php } ?>
                  				</select>
				  				<input type="hidden" id="mod_id" name="mod_id">
							</div>
			  			</div>
			  			<div class="form-group">
							<label for="firstname" class="col-sm-3 control-label">Nombres</label>
							<div class="col-sm-8">
				  				<input type="text" class="form-control" id="firstname" name="firstname" placeholder="Nombres" required>
							</div>
			  			</div>
			  			<div class="form-group">
							<label for="lastname" class="col-sm-3 control-label">Apellidos</label>
							<div class="col-sm-8">
				  				<input type="text" class="form-control" id="lastname" name="lastname" placeholder="Apellidos" required>
					</div>
				</div>
				<div class="form-group">
					<label for="cedula" class="col-sm-3 control-label">Cédula</label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="cedula" name="cedula" placeholder="Cédula de identidad">
					</div>
				</div>
				<div class="form-group">
					<label for="fecha_ingreso" class="col-sm-3 control-label">Fecha de ingreso</label>
					<div class="col-sm-8">
						<input type="date" class="form-control" id="fecha_ingreso" name="fecha_ingreso" value="<?php echo date('Y-m-d'); ?>">
					</div>
				</div>
							</div>
			  			</div>
						<div class="form-group">
							<label for="cargo" class="col-sm-3 control-label">Cargo</label>
              				<div class="col-sm-8">
				 				<select name="cargo" id="cargo" class="form-control">
                  					<option value="">---Seleccione un cargo---</option>
                					<option value="GERENCIA">GERENCIA</option>
			  						<option value="ADMINISTRADOR">ADMINISTRADOR</option>
              						<option value="SUPERVISOR DE TIENDA">SUPERVISOR DE TIENDA</option>
              						<option value="VENDEDOR">VENDEDOR</option>
			  						<option value="PANADERO">PANADERO</option>                  						
									<option value="DELIVERY">DELIVERY</option>
				  					<option value="ALMACEN">ALMACEN</option>
                  					<option value="PREPARADOR">PREPARADOR</option>
				  					<option value="ASISITENTE GERENTE">ASISITENTE GERENTE</option>
                 				</select>
                  			</div>
              			</div>
			   			<div class="form-group">
							<label for="sueldo" class="col-sm-3 control-label">Sueldo Diario</label>
							<div class="col-sm-8">
				  				<input type="text" class="form-control" id="sueldo" name="sueldo" placeholder="Sueldo Diario" required>
							</div>
			  			</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
							<button type="submit" class="btn btn-primary" id="guardar_datos">Guardar datos</button>
		  				</div>
		  			</form>
				</div>
	  		</div>
		</div>
	</div>
<?php
}
?>