Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.html.show_detail_country.es.php
  1. <h3>Document downloads from:
  2. <?php
  3. print $show_country_name;
  4.  
  5. // select a flag
  6. print ' ';
  7. $c_flag = 'flags18x14/' . $show_country . '.png';
  8. if (file_exists($c_flag)) {
  9. print '<img src="'. $c_flag . '" width="18" height="14" alt="'. $show_country . '" />';
  10. } else {
  11. print '<img src="flags18x14/unknown.png" width="18" height="14" alt="' . $show_country . '" />';
  12. };
  13. ?></h3>
  14.  
  15. <?php
  16. if (isset ($GLOBALS["db_values"]["0"]["count"])) {
  17. print "<table cellspacing='0' cellpadding='4'>\n";
  18. print '<tr><td colspan="3"><span style="font-size:small;">Click on a document title to see detailed statistics for that document.</span></td></tr>';
  19. print '<tr><th style="background-color:#cccccc;">&nbsp;</th>
  20. <th style="background-color:#cccccc;">Document</th>
  21. <th style="background-color:#4477dd;color:#ffffff;">Downloads</th></tr>';
  22. }
  23. else {
  24. print "<table cellspacing='0' cellpadding='4'>\n";
  25. print '<tr><td><strong style="color:#ff0000;">No downloads for this country.</strong></td></tr>';
  26. }
  27. for ($rs=0;$rs<count($GLOBALS["db_values"]);$rs++)
  28. {
  29. $extra_args = array();
  30. $cur_count = $GLOBALS["db_values"][$rs]["count"];
  31. if(isset($_REQUEST["year"])) { $extra_args[] = "year=".$_REQUEST["year"]; }
  32. if(isset($_REQUEST["month"])) { $extra_args[] = "month=".$_REQUEST["month"]; }
  33. if(isset($_REQUEST["range"])) { $extra_args[] = "range=".$_REQUEST["range"]; }
  34. // NJS 2005-12-15: subtly highlight every alternate row
  35. print '<tr';
  36. if ($rs % 2) print ' style="background-color:#EDF3FE;"';
  37. // NJS 2006-06-14: Added archive name to URL.
  38. print '><td align="right" style="font-size:small;">'.
  39. ($rs + 1) .
  40. '</td><td width="600" height="20" align="left" style="font-size:small;border-right:1px solid #dddddd;"><a href="'.
  41. $_SERVER['PHP_SELF'].
  42. '?action=show_detail_eprint;id='.
  43. $GLOBALS["db_values"][$rs]["archiveid"].
  44. ';archive='.
  45. $GLOBALS["db_values"][$rs]["archive_name"] .
  46. ';'.
  47. implode(";",$extra_args).
  48. '">'.
  49. $GLOBALS["db_values"][$rs]["eprint_name"].
  50. '</a>';
  51. // NJS 2006-06-16: If we are accessing the "default" archive,
  52. // include a link to the eprint's source archive.
  53. if ( $GLOBALS["config_vars"]["archivename"] == 'default' )
  54. print ' [in <a href="' .
  55. $GLOBALS["config_vars"]["general"]["eprints_location"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  56. '">' .
  57. $GLOBALS["config_vars"]["general"]["repository_name"][$GLOBALS["db_values"][$rs]["archive_name"]] .
  58. '</a>]';
  59. print '</td><td align="right" style="font-size:small;">'.
  60. $GLOBALS["db_values"][$rs]["count"].
  61. '</td></tr>';
  62. }
  63. print "</table>\n";
  64. ?>
  65.