Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.html.show_detail_date.es.php
  1. <h3>Document downloads for: <?php print $show_date; ?></h3>
  2.  
  3. <?php
  4. if (isset ($GLOBALS["db_values"]["0"]["count"])) {
  5. print "<table cellspacing='0' cellpadding='4'>\n";
  6. print '<tr><td colspan="4"><span style="font-size:small;">Click on a document title to see detailed statistics for that document.<br />
  7. The number in (parentheses) is the number of distinct countries from which the document has been <em>downloaded</em> (i.e., excluding abstract views).</span></td></tr>';
  8. print '<tr><th style="background-color:#cccccc;">&nbsp;</th>
  9. <th style="background-color:#cccccc;">Document</th>
  10. <th colspan="2" style="background-color:#4477dd;color:#ffffff;">Downloads</th></tr>';
  11. }
  12. else {
  13. print '<p><strong style="color:#ff0000;">No statistics are available for this period.</strong></p>';
  14. }
  15. for ($rs=0;$rs<count($GLOBALS["db_values"]);$rs++)
  16. {
  17. $extra_args = array();
  18. $cur_count = $GLOBALS["db_values"][$rs]["count"];
  19. if(isset($_REQUEST["year"])) { $extra_args[] = "year=".$_REQUEST["year"]; }
  20. if(isset($_REQUEST["month"])) { $extra_args[] = "month=".$_REQUEST["month"]; }
  21. if(isset($_REQUEST["range"])) { $extra_args[] = "range=".$_REQUEST["range"]; }
  22. // NJS 2005-12-15: subtly highlight every alternate row
  23. print '<tr';
  24. if ($rs % 2) print ' style="background-color:#EDF3FE;"';
  25. // NJS 2006-06-14: Added archive name to URL.
  26. // Note that we need to point to the correct archive *for the eprint*,
  27. // which may not necessarily be the same as the current archive name
  28. // (we might be viewing the "default" archive, which lists *all*
  29. // eprints in the database across all archives).
  30. print '><td align="right" style="font-size:small;">'.
  31. ($rs + 1) .
  32. '</td><td width="600" height="20" align="left" style="font-size:small;border-right:1px solid #dddddd;"><a href="'.
  33. $_SERVER['PHP_SELF'].
  34. '?action=show_detail_eprint;id='.
  35. $GLOBALS["db_values"][$rs]["archiveid"].
  36. ';archive='.
  37. $GLOBALS["db_values"][$rs]["archive_name"] .
  38. ';'.
  39. implode(";",$extra_args).
  40. '">'.
  41. $GLOBALS["db_values"][$rs]["eprint_name"].
  42. '</a>';
  43. // NJS 2006-06-16: If we are accessing the "default" archive,
  44. // include a link to the eprint's source archive.
  45. if ( $GLOBALS["config_vars"]["archivename"] == 'default' )
  46. print ' [in <a href="' .
  47. $GLOBALS["config_vars"]["general"]["eprints_location"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  48. '">' .
  49. $GLOBALS["config_vars"]["general"]["repository_name"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  50. '</a>]';
  51. print '</td><td align="right" style="font-size:small;">'.
  52. $GLOBALS["db_values"][$rs]["count"].
  53. '</td><td align="right" style="font-size:small;">('.
  54. $GLOBALS["db_values"][$rs]["countries"].
  55. ')</td></tr>';
  56. }
  57. if (isset ($GLOBALS["db_values"]["0"]["count"])) {
  58. print "</table>\n";
  59. }
  60. ?>
  61.