Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.html.show_detail_date.es.php
<?php
	require("inc.html.navbar_global.es.php");
?>

<h3>Document downloads for: <?php print $show_date; ?></h3>

<?php
	if (isset ($GLOBALS["db_values"]["0"]["count"])) {
		print '<span style="font-size:small;">Click on a document title to see detailed statistics for that document</span>';
		print "<table cellspacing='0' cellpadding='4'>\n";
		print '<tr><th style="background-color:#cccccc;">Document</th>
			<th style="background-color:#4477dd;color:#ffffff;">Downloads</th></tr>';
	}
	else {
		print "<table cellspacing='0' cellpadding='4'>\n";
		print '<tr><td style="color:#ff0000;"><b>No statistics are available for this period.</b></td></tr>';
	}
	for ($rs=0;$rs<count($GLOBALS["db_values"]);$rs++)
	{
		$extra_args = array();
		$cur_count = $GLOBALS["db_values"][$rs]["count"];
		if(isset($_REQUEST["year"])) { $extra_args[] = "year=".$_REQUEST["year"]; }
		if(isset($_REQUEST["month"])) { $extra_args[] = "month=".$_REQUEST["month"]; }
		if(isset($_REQUEST["range"])) { $extra_args[] = "range=".$_REQUEST["range"]; }
		// NJS 2005-12-15: subtly highlight every alternate row
		print '<tr';
		if ($rs % 2) print ' style="background-color:#EDF3FE;"';
		print '><td width="600" align="left" style="font-size:small;"><a href="'.
			$_SERVER['PHP_SELF'].
			'?action=show_detail_eprint;id='.
			$GLOBALS["db_values"][$rs]["archiveid"].
			';'.
			implode(";",$extra_args).
			'">'.
			$GLOBALS["db_values"][$rs]["eprint_name"].
			'</a></td><td align="right" style="font-size:small;">'.
			$GLOBALS["db_values"][$rs]["count"].
			'</td></tr>';
	}
	print "</table>\n";
?>