GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Digital_Repository
Browse code
- Changed "by Country" to "by Source".
master
1 parent
afeb17a
commit
9bcada107a01e9f1593f57bdf3ff77522365d3b6
nstanger
authored
on 1 Feb 2007
Patch
Showing
1 changed file
Repositories/statistics/includes/inc.html.navbar_global.es.php
Ignore Space
Show notes
View
Repositories/statistics/includes/inc.html.navbar_global.es.php
<?php $current_year = date("Y"); $last_year = date("Y")-1; /* Lists of possible links for a navigation bar, listed in order of appearance. If "match" is TRUE, then this entry corresponds to the current page, and we only output "text" (i.e., no link). If "match" is FALSE, then this entry does not correspond to the current page, so we need to output "href" as well (i.e., generate a link). Specify the match conditions in descending order of discrimination as much as possible, as PHP will drop out of the expression at the first failed test. Outputting links happens more often than not, so we want the decision to be made as quickly as possible. */ $most_viewed_links = array( "4w" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["range"]) && ($_REQUEST["range"] == "4w")), "text" => "Past four weeks", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date;range=4w", ), "current_year" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["year"]) && ($_REQUEST["year"] == $current_year) && isset($_REQUEST["month"]) && ($_REQUEST["month"] == 0)), "text" => "This year", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date;year=$current_year", ), "last_year" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["year"]) && ($_REQUEST["year"] == $last_year) && isset($_REQUEST["month"]) && ($_REQUEST["month"] == 0)), "text" => "Last year", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date;year=$last_year", ), "all_years" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["year"]) && ($_REQUEST["year"] == 0) && isset($_REQUEST["month"]) && ($_REQUEST["month"] == 0) && isset($_REQUEST["range"]) && ($_REQUEST["range"] == "")), "text" => "All years", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date", ), ); $repository_wide_links = array( "cumulative_usage" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "cumulative_usage") && isset($_REQUEST["range"]) && ($_REQUEST["range"] == "all")), "text" => "by Year/month", "href" => $_SERVER['PHP_SELF'] . "?action=cumulative_usage;range=all", ), "cumulative_usage_country" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "cumulative_usage_country")), "text" => "by Source", "href" => $_SERVER['PHP_SELF'] . "?action=cumulative_usage_country", ), ); print "<p>Most viewed eprints: "; outputNavBar($most_viewed_links); print "<br />"; print "Repository-wide statistics: "; outputNavBar($repository_wide_links); print "</p>"; ?>
<?php $current_year = date("Y"); $last_year = date("Y")-1; /* Lists of possible links for a navigation bar, listed in order of appearance. If "match" is TRUE, then this entry corresponds to the current page, and we only output "text" (i.e., no link). If "match" is FALSE, then this entry does not correspond to the current page, so we need to output "href" as well (i.e., generate a link). Specify the match conditions in descending order of discrimination as much as possible, as PHP will drop out of the expression at the first failed test. Outputting links happens more often than not, so we want the decision to be made as quickly as possible. */ $most_viewed_links = array( "4w" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["range"]) && ($_REQUEST["range"] == "4w")), "text" => "Past four weeks", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date;range=4w", ), "current_year" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["year"]) && ($_REQUEST["year"] == $current_year) && isset($_REQUEST["month"]) && ($_REQUEST["month"] == 0)), "text" => "This year", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date;year=$current_year", ), "last_year" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["year"]) && ($_REQUEST["year"] == $last_year) && isset($_REQUEST["month"]) && ($_REQUEST["month"] == 0)), "text" => "Last year", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date;year=$last_year", ), "all_years" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "show_detail_date") && isset($_REQUEST["year"]) && ($_REQUEST["year"] == 0) && isset($_REQUEST["month"]) && ($_REQUEST["month"] == 0) && isset($_REQUEST["range"]) && ($_REQUEST["range"] == "")), "text" => "All years", "href" => $_SERVER['PHP_SELF'] . "?action=show_detail_date", ), ); $repository_wide_links = array( "cumulative_usage" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "cumulative_usage") && isset($_REQUEST["range"]) && ($_REQUEST["range"] == "all")), "text" => "by Year/month", "href" => $_SERVER['PHP_SELF'] . "?action=cumulative_usage;range=all", ), "cumulative_usage_country" => array( "match" => (isset($_REQUEST["action"]) && ($_REQUEST["action"] == "cumulative_usage_country")), "text" => "by Country", "href" => $_SERVER['PHP_SELF'] . "?action=cumulative_usage_country", ), ); print "<p>Most viewed eprints: "; outputNavBar($most_viewed_links); print "<br />"; print "Repository-wide statistics: "; outputNavBar($repository_wide_links); print "</p>"; ?>
Show line notes below