<?php

include_once("common.inc.php");
AccessCheck();

if (!isset($_REQUEST["conf"])) { die('missing required parameter'); }

if ($validUserRequired && !$session->canUpdateLogs()) {
	echo $template->NoAccess();
	exit();
}

if(!isset($profile)) {
	$profile = new SiteProfile($conf);
}

$updateProgressLogLoc = $profile->datamanagerDir.$profile->profilename."/{$profile->profilename}_update_progress.lwa.log"; 

if(file_exists($updateProgressLogLoc)) {
	$handle = fopen($updateProgressLogLoc, "r");
	if ($handle) {
		while(($line = fgets($handle)) !== false){
			echo $line."<br/>";
		}
	} else {
		echo "<br/><p>[ Could not read the Progress Log... ]</p>";
	}
} else {
	echo "<br/><p>[ Could not find the Progress Log... ]</p>";
}
?>