Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.html.show_detail_date.es.php
nstanger on 30 Jan 2006 1 KB - Added rank to download lists.
  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. print '><td align="right" style="font-size:small;">'.
  26. ($rs + 1) .
  27. '</td><td width="600" height="20" align="left" style="font-size:small;border-right:1px solid #dddddd;"><a href="'.
  28. $_SERVER['PHP_SELF'].
  29. '?action=show_detail_eprint;id='.
  30. $GLOBALS["db_values"][$rs]["archiveid"].
  31. ';'.
  32. implode(";",$extra_args).
  33. '">'.
  34. $GLOBALS["db_values"][$rs]["eprint_name"].
  35. '</a></td><td align="right" style="font-size:small;">'.
  36. $GLOBALS["db_values"][$rs]["count"].
  37. '</td><td align="right" style="font-size:small;">('.
  38. $GLOBALS["db_values"][$rs]["countries"].
  39. ')</td></tr>';
  40. }
  41. if (isset ($GLOBALS["db_values"]["0"]["count"])) {
  42. print "</table>\n";
  43. }
  44. ?>
  45.