<?php if (isset($con)) { ?>
<div class="modal fade" id="myModalempleado2" 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> Editar empleado</h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal" method="post" id="editar_empleado" name="editar_empleado">
          <div id="resultados_ajax2"></div >
          <input type="hidden" id="mod_id" name="mod_id">

          <div class="form-group">
            <label for="tienda2" class="col-sm-3 control-label">Tienda</label>
            <div class="col-sm-8">
                <select class="form-control" id="tienda2" name="tienda2" required>
                    <option value="">-- Selecciona Tienda --</option>
                    <option value="">SEDE</option>
                    <?php 
                    $sql_t = mysqli_query($con, "SELECT id_tienda, nombre FROM tiendas ORDER BY nombre ASC");
                    while ($rw = mysqli_fetch_array($sql_t)) {
                        echo '<option value="'.$rw['id_tienda'].'">'.$rw['nombre'].'</option>';
                    }
                    ?>
                </select>
            </div>
          </div>

          <div class="form-group">
            <label for="firstname2" class="col-sm-3 control-label">Nombres</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" id="firstname2" name="firstname2" required>
            </div>
          </div>

          <div class="form-group">
            <label for="lastname2" class="col-sm-3 control-label">Apellidos</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" id="lastname2" name="lastname2" required>
            </div>
          </div>
          <div class="form-group">
            <label for="cedula2" class="col-sm-3 control-label">Cédula</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" id="cedula2" name="cedula2">
            </div>
          </div>
          <div class="form-group">
            <label for="fecha_ingreso2" class="col-sm-3 control-label">Fecha de ingreso</label>
            <div class="col-sm-8">
              <input type="date" class="form-control" id="fecha_ingreso2" name="fecha_ingreso2">
            </div>
          </div>

          <div class="form-group">
            <label for="cargo2" class="col-sm-3 control-label">Cargo</label>
            <div class="col-sm-8">
                <select name="cargo2" id="cargo2" 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="sueldo2" class="col-sm-3 control-label">Sueldo Diario</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" id="sueldo2" name="sueldo2" required>
            </div>
          </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="actualizar_datos">Actualizar datos</button>
      </div>
      </form>
    </div>
  </div>
</div>
<?php } ?>