Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.html.show_detail_date.es.php
nstanger on 27 Feb 2007 2 KB - Fixed a missing "full text".
<h3>Full text downloads for: <?php print $show_date; ?></h3>

<?php
	if (isset ($GLOBALS["db_values"]["0"]["count"])) {
		print "<table cellspacing='0' cellpadding='4'>\n";
		print '<tr><td colspan="4"><span style="font-size:small;">Click on a document title to see detailed statistics for that document.<br />
			The number in (parentheses) is the number of distinct countries or search engines from which <em>full text</em> downloads have originated.</span></td></tr>';
		print '<tr><th style="background-color:#cccccc;">&nbsp;</th>
			<th style="background-color:#cccccc;">Document</th>
			<th colspan="2" style="background-color:#4477dd;color:#ffffff;">Downloads</th></tr>';
	}
	else {
		print '<p><strong style="color:#ff0000;">No statistics are available for this period.</strong></p>';
	}
	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;"';
		// NJS 2006-06-14: Added archive URL to HREF.
		// Note that we need to point to the correct archive *for the eprint*,
		// which may not necessarily be the same as the current archive name
		// (we might be viewing the "default" archive, which lists *all*
		// eprints in the database across all archives).
		print '><td align="right" style="font-size:small;">'.
			($rs + 1) .
			'</td><td width="600" height="20" align="left" style="font-size:small;border-right:1px solid #dddddd;"><a href="'.
			$GLOBALS["config_vars"]["general"]["eprints_location"][$GLOBALS["db_values"][$rs]["archive_name"]] .
			$_SERVER['PHP_SELF'].
			'?action=show_detail_eprint;id='.
			$GLOBALS["db_values"][$rs]["archiveid"].
			';'.
			implode(";",$extra_args).
			'">'.
			$GLOBALS["db_values"][$rs]["eprint_name"].
			'</a>';
		// NJS 2006-06-16: If we are accessing the "default" archive,
		// include a link to the eprint's source archive.
		if ( $GLOBALS["config_vars"]["archivename"] == 'default' )
			print ' [in <a href="' .
				$GLOBALS["config_vars"]["general"]["eprints_location"][$GLOBALS["db_values"][$rs]["archive_name"]] .
				'">' .
				$GLOBALS["config_vars"]["general"]["repository_name"][$GLOBALS["db_values"][$rs]["archive_name"]] .
				'</a>]';
		print '</td><td align="right" style="font-size:small;">'.
			$GLOBALS["db_values"][$rs]["count"].
			'</td><td align="right" style="font-size:small;">('.
			$GLOBALS["db_values"][$rs]["countries"].
			')</td></tr>';
	}
	if (isset ($GLOBALS["db_values"]["0"]["count"])) {
		print "</table>\n";
	}
?>