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