View difference between Paste ID: cKttkRda and Wq0Nxxae
SHOW: | | - or go back to the newest paste.
1
<?php
2
3-
if (!empty($_GET['id'])) {
3+
if (empty($_GET['id'])) {
4
	exit;
5
}
6
7
ob_start();
8
include('site_config.php');
9
ob_end_clean();
10
11
$id = mysql_real_escape_string($_GET['id']);
12
$result = mysql_query("SELECT image FROM frontpage_auto_slideshow WHERE id = '{$id}';");
13
if (mysql_num_rows($result) > 0) {
14
	$row = mysql_fetch_assoc($result);
15
	header('Content-Type: ' . Nette\Utils\MimeTypeDetector::fromString($row['image'])); 
16
	echo $row['image'];
17
}