Statistics: Posted by tiaz1988 — Tue Jul 26, 2016 7:46 pm — Replies 3 — Views 817
Statistics: Posted by tiaz1988 — Fri Jul 08, 2016 3:45 pm — Replies 1 — Views 555
Statistics: Posted by tiaz1988 — Fri Jul 01, 2016 6:55 pm — Replies 4 — Views 6765
Statistics: Posted by tiaz1988 — Tue Jun 14, 2016 11:46 pm — Replies 4 — Views 828
<?phpinclude('core/inc/init.inc.php');if (isset($_GET['file_id'])) { $file_id = (int) $_GET['file_id']; $file = mysql_query("SELECT file_name, file_expiry FROM files WHERE file_id={$file_id}"); if (mysql_num_rows($file) != 1) { echo "Sorry, the file you have requested does not exist or has been deleted."; } else { $row = mysql_fetch_assoc($file); if ($row['file_expiry'] < time()) { echo "Sorry, This file has now expired. Please <a href='mailto:#?subject=Expired File'>contact</a> the administrator for more details."; } else { header('Content-Description: File Transfer'); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"{$row['file_name']}\""); header('Expires: 0'); header('Pragma: no-cache'); header('Content-Length: ' . filesize('core/files/'.$row['file_name'])); readfile('core/files/'. $row['file_name']); } } $file = mysql_query("SELECT file_name, file_expiry FROM files WHERE file_id={$file_id}"); $row = mysql_fetch_assoc($file); $expiry = $row['file_expiry']; if (time() > $expiry) mysql_query("DELETE FROM `files` WHERE `file_id`=" . $file_id); }?>Any help would be much appreciated
Statistics: Posted by davestechuk — Thu May 05, 2016 3:34 pm — Replies 3 — Views 1445
Statistics: Posted by macedo6466 — Sat Apr 30, 2016 7:55 am — Replies 1 — Views 919
Statistics: Posted by iwan010 — Sun Apr 17, 2016 9:12 pm — Replies 1 — Views 857
Statistics: Posted by Musyanon — Thu Mar 24, 2016 12:21 am — Replies 1 — Views 781
Statistics: Posted by tiaz1988 — Fri Mar 04, 2016 8:01 pm — Replies 4 — Views 1208