<?php 
include('../../configuracion.php');

$id = (isset($_POST["id"]))? $_POST["id"] : NULL;
$tabla = (isset($_POST["tabla"]))? $_POST["tabla"] : NULL;
$page = (isset($_POST["page"]))? $_POST["page"] : NULL;
$folder = (isset($_POST["folder"]))? $_POST["folder"] : NULL;
$campos = (isset($_POST["campos"]))? $_POST["campos"] : NULL;

$lsitacampos = explode(",",$campos);

$datos_eliminar = $db->row($tabla,$campos,"id='{$id}'");
foreach($lsitacampos as $k => $val){
    @unlink('../../imagenes/'.$folder.'/'.$lsitacampos[$k]);
    $datos = array(
    
        $lsitacampos[$k]	=> $db->string(''),

    );
    $db->update($tabla,$datos,"id='$id'");	
}


echo true;

?>