fhiiqm/inc/show_img_gef.inc.php
author schwarzer@hyperion.rz-berlin.mpg.de
Mon, 01 Jul 2013 14:36:18 +0200
changeset 38 45c139f74ea4
permissions -rw-r--r--
+ Laborinfo; Keytyp-Verwaltung

<?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;
?>