Changeset 147
- Timestamp:
- 01/19/06 23:45:47 (3 years ago)
- Files:
-
- devel/_files/download.php (modified) (3 diffs)
- devel/_files/icon.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/_files/download.php
r146 r147 34 34 $if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']); 35 35 36 $tstamp = filemtime( $file->location);36 $tstamp = filemtime(path . $file->location); 37 37 $lm = gmdate("D, d M Y H:i:s", $tstamp) . " GMT"; 38 38 … … 48 48 49 49 // Then output some appropriate headers and send the file data! 50 $mimetype = run("files:mimetype:determine", $file->location);50 $mimetype = run("files:mimetype:determine",path . $file->location); 51 51 if ($mimetype == false) { 52 52 $mimetype = "application/octet-stream"; … … 61 61 header('Content-Disposition: attachment'); 62 62 } 63 readfile( $file->location);63 readfile(path . $file->location); 64 64 65 65 } devel/_files/icon.php
r45 r147 1 1 <?php 2 2 3 // Download script 4 // Usage: http://URL/{username}/files/{folder_id}/{file_id}/{filename} 3 // Icon script 5 4 6 5 // Run includes … … 29 28 $if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']); 30 29 31 $tstamp = filemtime( $file->location);30 $tstamp = filemtime(path . $file->location); 32 31 $lm = gmdate("D, d M Y H:i:s", $tstamp) . " GMT"; 33 32 … … 49 48 } 50 49 if ($mimetype == "image/jpeg" || $mimetype == "image/png") { 51 $icon = url . "units/phpthumb/phpThumb.php?w=90&src=" . urlencode( $file->location);50 $icon = url . "units/phpthumb/phpThumb.php?w=90&src=" . urlencode(path . $file->location); 52 51 $mimetype = "image/jpeg"; 53 52 } else {
