Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (empty($_GET['id'])) {
- header((isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1') . ' 404', TRUE, 404);
- exit;
- }
- ob_start();
- include('site_config.php');
- ob_end_clean();
- $id = mysql_real_escape_string($_GET['id']);
- $result = mysql_query("SELECT image FROM frontpage_auto_slideshow WHERE id = '{$id}';");
- if (mysql_num_rows($result) > 0) {
- $row = mysql_fetch_assoc($result);
- header('Content-Type: ' . Nette\Utils\MimeTypeDetector::fromString($row['image']));
- echo $row['image'];
- }
Advertisement
Add Comment
Please, Sign In to add comment