<?
/*
PTK - DFLabs
Copyright (C) 2008 - DFLabs srl - All rights reserved
hide@address.com
*/
include("check_session.php");
//include("check_session_image.php");
include("lib_commands.php");
include("loggerClass.php");
include("lib_std.php");
$offset = sanitize($_GET['offset'],INT);
$inode = sanitize($_GET['inode'],PARANOID);
$name = sanitize($_GET['name'],PARANOID);
if($inode!='' && $name!=''){
if(isset($_GET['part_id'])){
$path = get_image_path_from_partition(sanitize($_GET['part_id'],INT));
$path = sanitize($path,PARANOID);
$hexpic = get_file_content_image_bookmark($offset, $inode, $name, $path);
}else{
$hexpic = get_file_content_image($offset, $inode, $name);
}
$data = pack("H" . strlen($hexpic), $hexpic);
header("Content-Type: image/jpeg");
header("Content-Length: " . strlen($data));
echo $data;
}
?>