<?php

function DisplayOverview ($profile) {

	global $self;
	global $PROFILESTATDIR;

	print "<h2>Overview Profile: $profile</h2>\n";

	if ( !file_exists("$PROFILESTATDIR/$profile/flows-day.gif") ) {
		print "<h2>No data available!</h2>\n";
		return;
	}

	print "<a href='$self?tab=1'> <IMG src='pic.php?profile=$profile&amp;file=flows-day' width='328' height='163' border='0' alt='flows-day'></a>\n";
	print "<a href='$self?tab=2'> <IMG src='pic.php?profile=$profile&amp;file=packets-day' width='328' height='163' border='0' alt='packets-day'></a>\n";
	print "<a href='$self?tab=3'> <IMG src='pic.php?profile=$profile&amp;file=traffic-day' width='328' height='163' border='0' alt='traffic-day'></a>\n";
	print "<br>";
	print "<a href='$self?tab=1'> <IMG src='pic.php?profile=$profile&amp;file=flows-week' width='328' height='163' border='0' alt='flows-week'></a>\n";
	print "<a href='$self?tab=2'> <IMG src='pic.php?profile=$profile&amp;file=packets-week' width='328' height='163' border='0' alt='packets-week'></a>\n";
	print "<a href='$self?tab=3'> <IMG src='pic.php?profile=$profile&amp;file=traffic-week' width='328' height='163' border='0' alt='traffic-week'></a>\n";
	print "<br>";
	print "<a href='$self?tab=1'> <IMG src='pic.php?profile=$profile&amp;file=flows-month' width='328' height='163' border='0' alt='flows-month'></a>\n";
	print "<a href='$self?tab=2'> <IMG src='pic.php?profile=$profile&amp;file=packets-month' width='328' height='163' border='0' alt='packets-month'></a>\n";
	print "<a href='$self?tab=3'> <IMG src='pic.php?profile=$profile&amp;file=traffic-month' width='328' height='163' border='0' alt='traffic-month'></a>\n";	
	print "<br>";
	print "<a href='$self?tab=1'> <IMG src='pic.php?profile=$profile&amp;file=flows-year' width='328' height='163' border='0' alt='flows-year'></a>\n";
	print "<a href='$self?tab=2'> <IMG src='pic.php?profile=$profile&amp;file=packets-year' width='328' height='163' border='0' alt='packets-year'></a>\n";
	print "<a href='$self?tab=3'> <IMG src='pic.php?profile=$profile&amp;file=traffic-year' width='328' height='163' border='0' alt='traffic-year'></a>\n";	

} // End of DisplayOverview

function DisplayGraphs ($type, $profile) {

	global $self;
	global $PROFILESTATDIR;

	print "<h2>Profile: $profile - $type</h2>\n";

	if ( !file_exists("$PROFILESTATDIR/$profile/flows-day.gif") ) {
		print "<h2>No data available!</h2>\n";
		return;
	}

	print "<a href='$self?tab=4&win=day'> <IMG src='pic.php?profile=$profile&amp;file=${type}-day' width='669' height='281' border='0'></a>\n";
	print "<br>";
	print "<a href='$self?tab=4&win=week'> <IMG src='pic.php?profile=$profile&amp;file=${type}-week' width='669' height='281' border='0'></a>\n";
	print "<br>";
	print "<a href='$self?tab=4&win=month'> <IMG src='pic.php?profile=$profile&amp;file=${type}-month' width='669' height='281' border='0'></a>\n";
	print "<br>";
	print "<a href='$self?tab=4&win=year'> <IMG src='pic.php?profile=$profile&amp;file=${type}-year' width='669' height='281' border='0'></a>\n";
	print "<br>";
	$_SESSION['init'] = $type;

} # End of DisplayHistory

?>
