<?php
/**************************************************************************************************
|
| iDocScript - Document Sharing Script
| http://www.idocscript.com
| webmaster@idocscript.com
|
|**************************************************************************************************
|
| By using this software you agree that you have read and acknowledged our End-User License 
| Agreement available at http://www.idocscript.com/eula.html and to be bound by it.
|
| Copyright (c) 2011 iDocScript.com. All rights reserved.
|**************************************************************************************************/
include("include/config.php");
include("include/functions/import.php");

$did = intval($_REQUEST['did']);
STemplate::assign('did',$did);
$remarks = cleanit($_REQUEST['remarks']);
STemplate::assign('remarks',$remarks);
$reason = cleanit($_REQUEST['reason']);
STemplate::assign('reason',$reason);
$USERID = intval($_SESSION['USERID']);
STemplate::assign('USERID',$USERID);

if ($did > 0 && is_numeric($did))
{
	if($USERID > 0 && is_numeric($USERID))
	{
		if($reason != "")
		{
			$query = "insert into docs_reports set USERID='".mysql_real_escape_string($USERID)."', DID='".mysql_real_escape_string($did)."', reason='".mysql_real_escape_string($reason)."', remarks='".mysql_real_escape_string($remarks)."', date='".date("Y-m-d")."', time='".time()."'";
			$conn->execute($query);
		}
		$message = $lang['361'];
	}
}
STemplate::assign('error',$error);
STemplate::assign('message',$message);
STemplate::display('postreport.tpl');
?>