Location: PHPKode > projects > Ptk-forensics > ptk/lib/modal_filter.php
<?
/*
PTK  - DFLabs
Copyright (C) 2008 - DFLabs srl - All rights reserved
hide@address.com
*/
include("check_session.php");
include("check_session_image.php");
include("lib_std.php");
include("sanitize.php");
include("loggerClass.php");
if (isset($_SESSION['file_bro_token']) && strcmp($_SESSION['file_bro_token'],$_GET['tk']) == 0){

$token = sanitize($_GET['tk'],PARANOID);

$inv_token = md5(uniqid(rand(), TRUE));
$_SESSION['filter_token'] = $inv_token;

$offset = sanitize($_GET['arg1'],INT);
$inode = sanitize($_GET['arg2'],PARANOID);
$partition_id = sanitize($_GET['arg3'],INT);

?>
<b style="float:left">Advanced filter</b><img id="close_box" style="float:right; cursor: pointer" src="../img/cancel.png" onclick="closeMessage();">
<br><hr>

<fieldset onclick="selectFilter(0)" id="file_div">		
	<legend id="file_title"><b>Filetype</b></legend>
	<table class="form" style="margin-top:0px">
		<tr>
			<td><input type="checkbox" id="type1" name="type1" value="(image data)|(PC bitmap data)"> Graphic files</td>
			<td><input type="checkbox" id="type2" name="type2" value="(ASCII)|(text)"> Text files</td>
		</tr>
		<tr>
			<td><input type="checkbox" id="type3" name="type3" value="(Microsoft Office Document)"> Microsoft Office Documents</td>
			<td><input type="checkbox" id="type4" name="type4" value="(PDF document)"> PDF documents</td>
		</tr>
		<tr>
			<td><input type="checkbox" id="type5" name="type5" value="(Microsoft ASF)"> Windows Media Video</td>
			<td><input type="checkbox" id="type6" name="type6" value="(video)|(MPEG)"> Generic video files</td>
		</tr>
		<tr>
			<td><input type="checkbox" id="type7" name="type7" value="(audio)|(MP3)"> Generic audio files</td>
			<td><input type="checkbox" id="type8" name="type8" value="(executable)"> Executable files</td>
		</tr>
		<tr>
			<td><input type="checkbox" id="type9" name="type9" value="(archive)"> Archives</td>
		</tr>
	</table>
</fieldset>

<fieldset style="background-color:#F8F8F8" onclick="selectFilter(1)" id="date_div">		
	<legend id="date_title" style="color:B8B8B8"><b>Date</b></legend>
	<input type="radio" name="field" id="field1" value="modified" checked disabled>Modified&nbsp;
	<input type="radio" name="field" id="field2" value="accessed" disabled>Accessed&nbsp;
	<input type="radio" name="field" id="field3" value="changed" disabled>Changed&nbsp;
	<input type="radio" name="field" id="field4" value="birth" disabled>Birth
	
	<br><br>
		
	<form style="margin:0px">
		<input type="radio" name="operator" id="operator1" value="between" checked disabled> between
		<input type="text" id="time1" name="time1" style="width:150px; margin-left:36px" disabled onclick="document.getElementById('operator1').checked='true'">&nbsp;<img src="../img/calendar.png" style="cursor:pointer; vertical-align: middle" onclick="displayCalendar(document.forms[0].time1,'yyyy-mm-dd hh:ii:00',this, true)">
		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and
		<input type="text" id="time2" name="time2" style="width:150px; margin-left:70px" disabled onclick="document.getElementById('operator1').checked='true'">&nbsp;<img src="../img/calendar.png" style="cursor:pointer; vertical-align: middle" onclick="displayCalendar(document.forms[0].time2,'yyyy-mm-dd hh:ii:00',this, true)">
		<br>
		<input type="radio" name="operator" id="operator2" value="equal" disabled> equals
		<input type="text" id="time3" name="time3" style="width:150px; margin-left:51px" disabled onclick="document.getElementById('operator2').checked='true'">&nbsp;<img src="../img/calendar.png" style="cursor:pointer; vertical-align: middle" onclick="displayCalendar(document.forms[0].time3,'yyyy-mm-dd hh:ii:00',this, true)">
		<br>
		<input type="radio" name="operator" id="operator3" value="greater" disabled> greater than
		<input type="text" id="time4" name="time4" style="width:150px; margin-left:10px" disabled onclick="document.getElementById('operator3').checked='true'">&nbsp;<img src="../img/calendar.png" style="cursor:pointer; vertical-align: middle" onclick="displayCalendar(document.forms[0].time4,'yyyy-mm-dd hh:ii:00',this, true)">
		<br>
		<input type="radio" name="operator" id="operator4" value="lower" disabled> lower than
		<input type="text" id="time5" name="time5" style="width:150px; margin-left:23px" disabled onclick="document.getElementById('operator4').checked='true'">&nbsp;<img src="../img/calendar.png" style="cursor:pointer; vertical-align: middle" onclick="displayCalendar(document.forms[0].time5,'yyyy-mm-dd hh:ii:00',this, true)">
	</form>			
</fieldset>

<div style="text-align:right;width:100%;margin-top:10px">
	<div style="display:none;width:100%;" id="load_filter">
	</div>
	
	<div style="display:none;width:100%;margin-top:10px" id="new_filter">
		<input type="hidden" id="token" name="token" value="<?=$inv_token?>"/>
		<input type="text" id="filter_name" style="width:198px">&nbsp;<button onclick="goSaveFilter()" style="margin:0px">OK</button>
	</div>
	
	<div id="result" style="display:none;text-align:left;margin-top:10px;margin-right:10px;width:100%"></div>
	<button style="margin-left:0px" onclick="ajax_request('get_filter_list.php?tk=<?=$inv_token?>', 'load_filter'); hideDiv('new_filter');hideDiv('result'); showDivInline('load_filter')">Load</button>
	<button style="margin-left:0px" onclick="hideDiv('load_filter'); hideDiv('result'); showDivInline('new_filter')">Save</button>
	<button style="margin-left:0px" onclick="closeMessage(); goFilter('<?=$offset?>','<?=$inode?>','<?=$partition_id?>', 'advanced_filter','<?=$tz?>','<?=$token?>');">Filter</button>
</div>

<div id="loaded_filter" style="display:none"></div>


<?}else{
      	new AuditLog('Unauthorized access to modal_filter');
        header("location: home.php");
}
?>
Return current item: Ptk-forensics