file($FileName); //$FileInfo->close(); return($Result); } chdir('../..'); include('global.php'); $DbResult = $Database->select('SystemFile', '*', 'Id='.addslashes($_GET['Id'])); if($DbResult->num_rows > 0) { $DbRow = $DbResult->fetch_assoc(); Header('Content-Type: '.DetectMimeType($DbRow['Name'])); Header('Content-Disposition: attachment; filename="'.$DbRow['Name'].'"'); echo(file_get_contents($Config['UploadFileFolder'].'/'.$DbRow['Id'])); } else echo('Soubor nenalezen!'); ?>