<?php
require_once 'loginCheckPoint.php';
require_once 'sqlUtils.php';

	$dcid = $_REQUEST["dcid"] ?? $_REQUEST["docId"];
	
	$mysqli = sqlCreateConnection("fetchReport");
	$res = $mysqli->query("SELECT results FROM files where id=" . $dcid);
	if ($row = $res->fetch_object()) {
		$blob = $row->results;
		$xml = new DOMDocument(); 
 	    $loadRes = $xml->loadXml($blob);
 	    $report = $xml->getElementsByTagName("FileReport")->item(0)->textContent;
 	}
 	sqlClose($mysqli, 'fetchReport');
 	
	$report = str_replace("<center> IntuScan&trade; Analysis Report </center>", "", $report);

	$report = $report;
?>
<div dir="ltr" style="font-size:12px; color:red;">
<?= $report ?>
</div>
