Changeset 498 for trunk/Common/File.php
- Timestamp:
- Mar 3, 2013, 6:02:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/File.php
r438 r498 53 53 global $Config; 54 54 55 $DbResult = $this->Database->select('File', '*', 'Id='.addslashes($ _GET['Id']));55 $DbResult = $this->Database->select('File', '*', 'Id='.addslashes($Id)); 56 56 if($DbResult->num_rows > 0) 57 57 { 58 58 $DbRow = $DbResult->fetch_assoc(); 59 Header('Content-Type: '.$this->DetectMimeType($ DbRow['Name']));59 Header('Content-Type: '.$this->DetectMimeType($this->System->FilesDir.'/'.$DbRow['Name'])); 60 60 Header('Content-Disposition: attachment; filename="'.$DbRow['Name'].'"'); 61 echo(file_get_contents($ Config['Web']['UploadFileFolder'].'/'.$DbRow['Id'].'_'.$DbRow['Name']));61 echo(file_get_contents($this->System->FilesDir.'/'.$DbRow['Name'])); 62 62 } else echo('Soubor nenalezen!'); 63 63 }
Note:
See TracChangeset
for help on using the changeset viewer.