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 location of GeoIP include script.
master
1 parent
890217b
commit
37ab67e84e2c82bb9b4683f02653e00bef7b15b9
nstanger
authored
on 25 Mar 2009
Patch
Showing
1 changed file
Repositories/statistics/includes/inc.fns.show_detail_country.es.php
Ignore Space
Show notes
View
Repositories/statistics/includes/inc.fns.show_detail_country.es.php
<?php /* NJS 2005-12-15 Usage by country, totals. */ include("../scripts/geoip.inc"); $gi = new GeoIP; // Get detail given country $show_country = $_REQUEST["code"]; $show_country_code = strtoupper($show_country); $show_country_name = ''; /* Check whether the country code is one of our local network "country codes". */ foreach ($GLOBALS["config_vars"]["local_networks"] as $ccode => $cname) { if ($show_country_code == $ccode) $show_country_name = $cname; } /* NJS 2007-01-31 Check whether the country code is one of the known search engines. */ foreach ($GLOBALS["config_vars"]["search_engines"] as $ccode => $cname) { if ($show_country_code == $ccode) $show_country_name = $cname; } if ($show_country_name == '') { if (isset($gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$show_country_code])) { $show_country_num = $gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$show_country_code]; $show_country_name = $gi->GEOIP_COUNTRY_NAMES[$show_country_num]; } else { $show_country_name = 'Unknown'; } } // NJS 2006-06-14: Added archive name as argument. $GLOBALS["db_values"] = $sql->getArchiveCountCountry($GLOBALS["config_vars"]["archivename"],$_REQUEST["code"]); ?>
<?php /* NJS 2005-12-15 Usage by country, totals. */ include("geoip.inc"); $gi = new GeoIP; // Get detail given country $show_country = $_REQUEST["code"]; $show_country_code = strtoupper($show_country); $show_country_name = ''; /* Check whether the country code is one of our local network "country codes". */ foreach ($GLOBALS["config_vars"]["local_networks"] as $ccode => $cname) { if ($show_country_code == $ccode) $show_country_name = $cname; } /* NJS 2007-01-31 Check whether the country code is one of the known search engines. */ foreach ($GLOBALS["config_vars"]["search_engines"] as $ccode => $cname) { if ($show_country_code == $ccode) $show_country_name = $cname; } if ($show_country_name == '') { if (isset($gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$show_country_code])) { $show_country_num = $gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$show_country_code]; $show_country_name = $gi->GEOIP_COUNTRY_NAMES[$show_country_num]; } else { $show_country_name = 'Unknown'; } } // NJS 2006-06-14: Added archive name as argument. $GLOBALS["db_values"] = $sql->getArchiveCountCountry($GLOBALS["config_vars"]["archivename"],$_REQUEST["code"]); ?>
Show line notes below