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

error_reporting(0);
	
unset($_SESSION['bk_token']);
unset($_SESSION['bk_token_time']);
unset($_SESSION['case_token']);
unset($_SESSION['case_token_time']);
unset($_SESSION['check_token']);
unset($_SESSION['folder_token']);
unset($_SESSION['img_token']);
unset($_SESSION['img_token_time']);
unset($_SESSION['inv_token']);
unset($_SESSION['inv_token_time']);
unset($_SESSION['rep_token']);
unset($_SESSION['rep_token_time']);
unset($_SESSION['up_inv_token']);
unset($_SESSION['up_inv_token_time']);
?>
<html>
	<head>
		<title>PTK</title>
		<link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../css/tab-view.css"/>
		<link rel="stylesheet" type="text/css" href="../css/drag.css"/>		
		<link rel="stylesheet" type="text/css" href="../css/case_table.css"/>
		<link rel="stylesheet" type="text/css" href="../css/users_table.css"/>
		<link rel="stylesheet" type="text/css" href="../css/browse_table.css"/>		
		<link rel="stylesheet" type="text/css" href="../css/indexing_table.css"/>		
		<link rel="stylesheet" type="text/css" href="../css/partition_table.css"/>		
		<link rel="stylesheet" type="text/css" href="../css/modal-message.css">
		<link rel="stylesheet" type="text/css" href="../css/calendar.css">
		<link rel="stylesheet" type="text/css" href="../css/regex_table.css">
		<link rel="stylesheet" type="text/css" href="../css/gallery_table.css">
		<?
			include("lib_std.php");
			include("lib_commands.php");
			include("../config/conf.php");
		?>	  	  
		<script src="../ajax/prototype.js" type="text/javascript"></script>
		<script src="../ajax/scriptaculous.js" type="text/javascript"></script>
		<script src="../ajax/effects.js" type="text/javascript"></script>
		<script src="../ajax/controls.js" type="text/javascript"></script>				
		<script src="../ajax/modal/ajax.js" type="text/javascript"></script>		
		<script src="../ajax/modal/modal-message.js" type="text/javascript"></script>		
		<script src="../ajax/modal/ajax-dynamic-content.js" type="text/javascript"></script>		
		<script src="../ajax/tab-view.js" type="text/javascript"></script>		
		<script src="../ajax/global.js" type="text/javascript"></script>  
		<script src="../ajax/calendar.js" type="text/javascript"></script>  
</head>
	<?
	$file=$_SERVER["PHP_SELF"]; 
	$match= preg_match("/([^\/]+$)/",$file, $name);	
	$is_analysis = preg_match("/analysis\_/", $name[0]);
	
	session_start();
	
	if((isset($_SESSION['temp_case_id']))and(isset($_SESSION['temp_image_id']))){
		$image_id = $_SESSION['temp_image_id'];
		$case_id = $_SESSION['temp_case_id'];
		$res_token = md5(uniqid(rand(), TRUE));
		$_SESSION['res_token'] = $inv_token;
		echo "<body onload=\"hideMessage(); ajax_request('get_images.php?id=$case_id', 'right_container'); switchAppear('right_container'); displayMessage('get_resume_image_info.php?tk=$res_token&id=$image_id', '480', '480')\">";
		unset($_SESSION['temp_case_id']);
		unset($_SESSION['temp_image_id']);
	}
	elseif(isset($_SESSION['temp_case_id'])){
		$case_id = $_SESSION['temp_case_id'];
		echo "<body onload=\"hideMessage(); ajax_request('get_images.php?id=$case_id', 'right_container'); switchAppear('right_container');\">";		
		unset($_SESSION['temp_case_id']);
	}else{	
		echo "<body onload='hideMessage()'>";	
	}
	?>	
		<?if(!$is_analysis){?>	
		<div id="header">		
			<a class="img" href="http://ptk.dflabs.com" target="_blank"><img class="left" src="../img/ptk_logo.png" onload="stat()"></a>
			<a class="img" href="http://www.dflabs.com" target="_blank"><img class="right" src="../img/dflogo.gif"></a>
		</div>
		<?}?>
		
		<?if($is_analysis){?>	
			<div id="info" style="padding-top: 10px;">
		<?}else{?>
			<div id="info">
		<?}?>
			<div id="info_left">
				<?if($is_analysis){?>	
					<a class="img" href="http://ptk.dflabs.com" target="_blank"><img class="info_left" src="../img/ptk_logo.png" onload="stat()"></a>
				<?}?>			
				<a class="info" href="goto_home.php?id=0"><div id="info_case" style="display:inline"><?if(isset($_SESSION['case'])){?><b>Case: </b><?echo $_SESSION['case'];?><?}?></div></a>
				<a class="info" href="goto_home.php?id=1"><div id="info_image" style="display:inline"><?if(isset($_SESSION['image'])){?> | <b>Image: </b><?echo $_SESSION['image'];?><?}?></div></a>
			</div>
			<div id="info_right">
				<img src="../img/stat.gif" style="float:left;margin-right:10px;cursor:pointer" onclick="ajax_request('set_stat.php', ''); switchAppearDiv('stat')">
				<?if($_SESSION['stat']==1){?>
     					<div id='stat'></div> 
				<?}else{?>
					<div id='stat' style="display:none"></div> 
				<?}?>
				<b>Investigator: </b><?echo $_SESSION['user'];?>
				[<a href="goto_home.php?id=0" style="text-decoration: none">home</a> 
				<?if(!$is_analysis){?>
				| <a href="settings.php" style="text-decoration: none">settings</a> 
				<?}?>
				| <a href="logout.php" style="text-decoration: none">logout</a>]&nbsp;&nbsp;&nbsp;&nbsp;ver. 1.0.5
				<?if($is_analysis){?>	
					<a class="img" href="http://www.dflabs.com" target="_blank"><img class="info_right" src="../img/dflogo.gif"></a>
				<?}?>				
			</div>
		</div>
		
		<?if($is_analysis){?>
			<link rel="stylesheet" type="text/css" href="../css/analysis_menu.css"/>	
			<?include("analysis_menu.php");?>		
			<div id="main_analysis">
		<?}else{?>
			<div id="main">		
		<?}?>
Return current item: Ptk-forensics