$q = "SELECT *, date(dataCad) as dataCad FROM hist_midia WHERE id = :id";
$stmt = $conn->prepare($q);
$stmt->bindParam(':id', $id);
$stmt->execute();
$r = $stmt->fetchAll();
foreach ($r as $value) {?>
/*if($value["imagem"]){?>
" alt="" />
}*/?>
$embVideo = str_replace("https://drive.google.com/file/d/", "", $value['link']);
$embVideo = str_replace("/view?usp=sharing", "", $embVideo);
$embVideo = str_replace("/view?usp=share_link", "", $embVideo);
?>
if($value['link']){?>
}?>
/*
*/?>
if($value['galeria']){?>
include("owl.php");?>
}?>
if($value['pdf']){?>
Abrir PDF
}?>
if($value['doc']){?>
Abrir Documento
}?>
}?>