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 URL to HREF.
  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. $GLOBALS["config_vars"]["general"]["eprints_location"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  34. $_SERVER['PHP_SELF'].
  35. '?action=show_detail_eprint;id='.
  36. $GLOBALS["db_values"][$rs]["archiveid"].
  37. ';'.
  38. implode(";",$extra_args).
  39. '">'.
  40. $GLOBALS["db_values"][$rs]["eprint_name"].
  41. '</a>';
  42. // NJS 2006-06-16: If we are accessing the "default" archive,
  43. // include a link to the eprint's source archive.
  44. if ( $GLOBALS["config_vars"]["archivename"] == 'default' )
  45. print ' [in <a href="' .
  46. $GLOBALS["config_vars"]["general"]["eprints_location"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  47. '">' .
  48. $GLOBALS["config_vars"]["general"]["repository_name"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  49. '</a>]';
  50. print '</td><td align="right" style="font-size:small;">'.
  51. $GLOBALS["db_values"][$rs]["count"].
  52. '</td><td align="right" style="font-size:small;">('.
  53. $GLOBALS["db_values"][$rs]["countries"].
  54. ')</td></tr>';
  55. }
  56. if (isset ($GLOBALS["db_values"]["0"]["count"])) {
  57. print "</table>\n";
  58. }
  59. ?>
  60.