This commit is contained in:
Andreas Österreicher
2009-07-13 14:06:42 +00:00
parent 2e8e0363d8
commit 6b98c9a910
13 changed files with 45 additions and 116 deletions
+2 -11
View File
@@ -24,16 +24,7 @@
require_once('../config/vilesci.config.inc.php');
require_once('../include/akte.class.php');
//Hexcode in String umwandeln
function hexstr($hex)
{
$string="";
for ($i=0;$i<strlen($hex)-1;$i+=2)
$string.=chr(hexdec($hex[$i].$hex[$i+1]));
return $string;
}
//Hex Dump aus der DB holen
//base64 Dump aus der DB holen
if(isset($_GET['id']) && is_numeric($_GET['id']))
{
$akte = new akte($_GET['id']);
@@ -41,7 +32,7 @@ if(isset($_GET['id']) && is_numeric($_GET['id']))
//Header fuer Bild schicken
header("Content-type: $akte->mimetype");
header('Content-Disposition: attachment; filename="'.$akte->titel.'"');
echo hexstr($akte->inhalt);
echo base64_decode($akte->inhalt);
}
else
echo 'Unkown type';