<?php
/**
* @author Bettina Schwarzer, Fritz-Haber-Institut
* @copyright 04/2013
*/
$gid=urldecode($_GET["gid"]);
if (!$gid) return false;
include_once ($_SERVER['DOCUMENT_ROOT']. "/fhiiqm/inc/dbconnect.inc.php");
if (!isset($dbc) || !$dbc) $dbc = new dbconnection();
$sql = "SELECT gefahr_pic FROM Gefahr WHERE gefahr_ID='" . $gid ."'";
$pic = $dbc -> querySingleItem($sql);
if ($pic)
{
/*** set the headers and display the image ***/
header("Content-type: image/jpg");
/*** output the image ***/
echo $pic;
}
else echo $gid;
?>