Location: PHPKode > projects > Ptk-forensics > ptk/lib/get_images.php
<?
/*
PTK  - DFLabs
Copyright (C) 2008 - DFLabs srl - All rights reserved
hide@address.com
*/
include("check_session.php");
include("lib_std.php");
include("sanitize.php");

$case_id = $_GET['id'];
$case_id = sanitize($case_id,INT);
$case_name = case_name_from_id($case_id);
$_SESSION['case']=$case_name;
$image = array(); $image = image_list($case_id);

$img_token = md5(uniqid(rand(), TRUE));
$_SESSION['img_token'] = $img_token;
$_SESSION['img_token_time'] = time();
?>

<img src='../img/image_big.png' style='vertical-align:text-bottom'><b> <?=stripslashes($case_name);?>: images management</b>
<? if($_SESSION['user']=='admin'){?>
	<div id='add_content'  style='margin-top:-25px;' onclick="displayMessage('modal_image.php?id=<?=$case_id;?>&name=<?=$case_name;?>', '350', '360');return false"  title='Add new image'>
		<img src='../img/add.png' style='vertical-align:text-bottom'><b> Add</b>
	</div>	
<?}?>
<div id='right_content' style="margin-top: 5px">
<table class="cases">
<?for ($i=0; $i<sizeof($image); $i++){
	$partition = partition_info($image[$i]['id']);
	if($i%2==0){?><tr><?}else{?><tr class="odd"><?}?>	
		<td  onmouseover="showImgPanel(<?echo $i;?>)" onmouseout="hideImgPanel(<?echo $i;?>)" onclick="update_info_zone(1,'<?echo $image[$i]['name'];?>')">
			<?echo $image[$i]['name'];?>
		</td>
		
		<td style="text-align: right" onmouseover="showImgPanel(<?echo $i;?>)" onmouseout="hideImgPanel(<?echo $i;?>)" onclick="update_info_zone(1,'<?echo $image[$i]['name'];?>')">
			<div id="imgpanel<?echo $i;?>" style="display:none">
				<? if($partition[0]['filesystem']!='unknown'){?>
					<? if(($_SESSION['user']=='admin')&&($partition[0]['filesystem']!='ram_dump')){?>
					<img src="../img/indexing.png" title="Indexing operations" onclick="displayMessage('get_indexing.php?id=<?=$image[$i]['id'];?>', '420', '420')">
					<?}?>
					<img src="../img/analyze.png" title="Analyze image" onclick="window.location = 'goto_analysis.php?tk=<?=$img_token?>&id=<?echo $image[$i]['id'];?>'">
				<?}?>
				<img src="../img/integrity.png" title="Check image integrity" onclick="displayMessage('get_image_integrity.php?tk=<?=$img_token?>&id=<?=$image[$i]['id'];?>', '400', '350')">
				<img src="../img/info_small.png" title="Show image info" onclick="displayMessage('get_image_info.php?tk=<?=$img_token?>&id=<?=$image[$i]['id'];?>', '420', '420')">
				<? if($_SESSION['user']=='admin'){?>
					<img src="../img/separator.png">
					<img src="../img/remove_small.png" title="Remove image" onclick="deleteImage(<?echo $image[$i]['id'];?>,'<?echo $img_token;?>')">					
				<?}?>
			</div>
		</td>
	</tr>	
<?}?>
</table>
</div>
Return current item: Ptk-forensics