From what I understand, you will have a list of pdf files, and you want to see, modify and approve and when you give one of those buttons perform that action for that pdf , in that case we would change a couple of things to speed up, it would look like this:
<tr id="documentos"> //le agrego un id a los tr para poder acceder al evento click dentro de el
<td><?php echo $extraido['id_prod'] ?></td>
<td><?php echo $extraido['nom_empre'] ?></td>
<td><?php echo $extraido['nom_prod'] ?></td>
<td><?php echo $extraido['f_creacion'] ?></td>
<td><?php echo $extraido['f_modificacion'] ?></td>
<td><?php echo $vistos ?></td>
//a cada boton le agrego como id el id_prod mas -mod si es modificar, -ver si es ver , y -apro si es aprobaciones
<td><button class="btn btn-primary btn-sm" name="" id="<?php $extraido['id_prod']."-mod" ?>">Modificar</button></td>
<td><button class="btn btn-default btn-sm" name="ver" id="<?php $extraido['id_prod']."-ver" ?>">ver</button></td>
<td><button class="btn btn-default btn-sm" name="" id="<?php $extraido['id_prod']."-apro" ?>">Aprobaciones</button></td>
</tr>
then with javascript, I manage the button presses, and I send the request to the server with the id of the product and the action, it would be like this:
//importando jquery
$('#documentos button').click(function(){
var id_doc = $(this).prop('id').split('-')[0] // aqui capturo el id_prod que se selecciono la accion
var ruta = '',accion='';
if($(this).prop('id').split('-')[1] == 'ver'){
ruta = '/ver',accion='ver'
}else if($(this).prop('id').split('-')[1] == 'apro'){
ruta = '/aproba',accion='aprobaciones'
} else if($(this).prop('id').split('-')[1] == 'mod'){
ruta = '/mod',accion='modificar'
}
if(accion == 'ver'){ //si la acción es ver redirijo a esa ruta sino hago la petición.
location.href = '/visor.php?id_p' + id_doc // aqui cuando es accion ver envio a visor.php pasandole en la ruta en la variable id_p el id del documento
}else{
$.ajax({
url:ruta,
type:'POST', // puede ser POST o GET , eso depende de lo que esperes en el servidor
data:{ id_producto:id_doc, accion:accion}, // enviando al server por ejemplo, a la ruta /ver un json { id_producto:5698, accion: 'modificar' }
}).done(function(data){ //el .done es por si envías datos del servidor luego de cumplir la petición , y si mandas información viene en data.
console.log('Datos:',data)
})
}
})