<?php 
header("Content-type: text/html; charset=utf-8");
header("Cache-Control: no-cache, must-revalidate"); 
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html>
<head>
  <title>TGI</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>  
<?php 

	include("_dirinfo.php");
	include (PATH_TO_ROOT."init.php");
	include_once (PATH_TO_ROOT."/TGI/init.php");
	
	include_once (PATH_TO_ROOT."TGI/_class/class.statistics.php");
	
	set_time_limit(120);
	ini_set('display_errors', 1);
	ini_set('error_reporting', E_ALL ^ E_NOTICE);
	
	$db->ChangeDatabase(DB_WARPIT_TGI);

	$stat = new Statistics($db);

	// najprej rabim aktivni projekt
	$IDactiveProject = $stat->getActiveProject();

	$allFinished = $stat->getFinishedInterviews($IDactiveProject);
	
	$emails = $stat->getFinishedEmails($allFinished);
	$all=count($emails);
	//dodal blaž 20150310
	echo "total count: <b>$all</b><br><br>";
	$stat->drawFinished($emails); 
	
?>