From 2330bb06ececee220d854883a2870a3adf17c277 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 19 Oct 2014 03:54:53 +0200 Subject: Version 4.1. Support for photo galleries and advanced caching. --- foto/protected.php | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 foto/protected.php (limited to 'foto/protected.php') diff --git a/foto/protected.php b/foto/protected.php deleted file mode 100644 index c70772d..0000000 --- a/foto/protected.php +++ /dev/null @@ -1,25 +0,0 @@ -prepare("SELECT name, mime, size, hash FROM " . DBPREFIX . "image WHERE id = %s;", $_GET["id"]); - $result = $db->doQuery($sql); - $f = $result->fetch_array(MYSQLI_ASSOC); - if ( ! file_exists(IMAGE_PATH . $f["hash"] . ".gz") ){ - header($_SERVER["HTTP_PROTOCOL"] . " 404 Not Found"); - } else { - header("Content-Type: " . $f["mime"]); - header("Content-Disposition: inline; filename=".$f["name"]); - header("Content-Length: " . $f["size"]); - - readgzfile(IMAGE_PATH . $f["hash"] . ".gz"); - } - break; - default: - header($_SERVER["HTTP_PROTOCOL"] . " 404 Not Found"); -} -- cgit v1.2.3