<?php
if (isset($_GET['file'])) {
    $query = "SELECT * FROM filegallery_line WHERE id=".$_GET['file']."";
    $result = @mysqli_query($GLOBALS['mysql_con'], $query);
    $file = @mysqli_fetch_assoc($result)['filename'];
    // echo $file;
?>
    <div id="overlayPDF">
        <div id="closeOverlay">schließen</div>
        <div id="overlayContentPDF">
            <embed src="<?php echo "/userdata/".$file; ?>" type="application/pdf" width="100%" height="100vh">
        </div>
    </div>
<?php
}
?>