fhiiqm/inc/show_img_gef.inc.php
author Bettina Schwarzer
Thu, 12 Sep 2013 09:04:56 +0200
changeset 40 6f4b105daa24
parent 38 45c139f74ea4
permissions -rw-r--r--
+Keytyp Korrekturen, LDAP Authentifizierung

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