Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.html.show_detail_date.es.php
<?php
	$current_year = date("Y");
	$last_year = date("Y")-1;
	

?>
<h3>Document downloads for: <?php print $show_date; ?></h3>
<p>Most viewed eprints: 
[<a href="<?php print $_SERVER['PHP_SELF']; ?>?action=show_detail_date;range=4w">Past four weeks</a>] 
[<a href="<?php print $_SERVER['PHP_SELF']; ?>?action=show_detail_date;year=<?php print $current_year; ?>">This year</a>]
[<a href="<?php print $_SERVER['PHP_SELF']; ?>?action=show_detail_date;year=<?php print $last_year; ?>">Last year</a>]
[<a href="<?php print $_SERVER['PHP_SELF']; ?>?action=show_detail_date">All years</a>]
<br />Repository-wide statistics: 
[<a href="<?php print $_SERVER['PHP_SELF']; ?>?action=cumulative_usage;range=all">by Year/month</a>] 
[<a href="<?php print $_SERVER['PHP_SELF']; ?>?action=cumulative_usage_country">by Country</a>] 
</p>
     

<?php
	if (isset ($GLOBALS["db_values"]["0"]["count"])) {
		print '<font face="Arial" size="-1">Click on a document title to see detail statistics for that document</font>';
		print "<table>\n";
		print '<tr><th bgcolor="#cccccc">Document</th>
			<th bgcolor="#4477dd"><font color = "#ffffff">Downloads</font></th></tr>';
	}
	else {
		print "<table>\n";
		print '<tr><td><font color="#ff0000"><b>No statistics are available for this period.</b></font></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"]; }
		print '<tr><td width="600" align="left"><font size="-1"><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></font></td><td align="right"><font size="-1">'.
			$GLOBALS["db_values"][$rs]["count"].
			'</font></td></tr>';
	}
	print "</table>\n";
?>