<html>
  
<div class="modal fade" id="editar<?php echo $proveedor['ID']; ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"
  data-bs-backdrop="static" data-bs-keyboard="false">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h1 class="modal-title fs-5" id="exampleModalLabel">Editar Datos de la Empresa</h1>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">


     <form method="POST" action="./controladores/Proveedor/edit.php">
              <div class="form-group">
                    <label for="recipient-name" class="col-form-label">ID Proveedor</label>
                     <input type="" name="id" class="form-control" value="<?php echo $proveedor['ID']; ?>" readonly onmousedown="return false;">
              </div>

              <div class="form-group">
                  <label for="recipient-name" class="col-form-label">Nombre de la Empresa</label>
                  <input type="text" name="editname" class="form-control" value="<?php echo $proveedor['Nombre_Empresa']; ?>" required="true">
               
              </div>
            <div class="form-group">
                  <label for="recipient-name" class="col-form-label">RIF de la Empresa</label>
                  <input type="text" name="rif" class="form-control" value="<?php echo $proveedor['Rif_Empresa']; ?>" required="true">
            </div>
            <div class="form-group">
                  <label for="recipient-name" class="col-form-label">Producto que Provee</label>
                  <select class="form-select" aria-label="Default select example" name="producto" id="producto" required>
                                  <?php
                                     include '../../Clases/db.php';
                                        $conn= new conn();
                                        $conex= $conn->crearconn();
                                        $consulta = "SELECT * FROM categoria where Estado = 1";
                                        $ejecutar=mysqli_query($conex,$consulta) or die (mysqli_error($conex)); 
                                  ?>
                                    
                                      <option></option>
                                      <?php  foreach($ejecutar as $opciones){  ?>
                      
                                      <option value="<?php echo $opciones['ID'] ?>" ><?php echo $opciones['Nombre'] ?></option>
                                  <?php } ?>
                   </select>
            </div>    
        
            <div class="modal-footer">
              <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
              <button type="submit" class="btn btn-primary btne" >Guardar</button>
            </div>
          </form>  
       </div>
    </div>
  </div>
</div>


<div class="modal fade" id="eliminar<?php echo $proveedor['ID']; ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"
  data-bs-backdrop="static" data-bs-keyboard="false">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">
                ¿Realmente deseas eliminar este proveedor ?
            </h4>
      </div>
      <div class="modal-body">
      <form method="POST" action="./controladores/Proveedor/delet_prove.php">
        <input type="hidden" name="id" value="<?php echo $proveedor['ID']; ?>">
            <strong style="text-align: center !important"> 
            <?php echo $proveedor['Nombre_proveedor']; ?>
        
            </strong>

      
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-danger btnel">Borrar</button>
      </div>
       </form>
     </div> 
    </div>
  </div>
</div>
 </html>