- Switched to different country codes for different classes of local traffic,
and to fix the problem of download numbers being assigned to the wrong class.
1 parent ca58802 commit e06de169a463a6a51ee450cd7c8116fed63fea91
nstanger authored on 16 Dec 2005
Showing 5 changed files
View
16
Repositories/statistics/config/inc.vars.es_src.php
/* replaced admin_prog */
"prog_address" => array(
"public" => "index.php",
),
"local_intranet_name" => "Otago Intranet",
),
/* NJS 2005-12-16
Local network setup. Must correspond to the $local_IPs
variable in eprints-usage.php.
*/
"local_networks" => array(
"XA" => "Repository Admin",
"XI" => "Otago Intranet",
),
"messages" => array(
"vTITLE" => "Messages",
"vDESCRIPTION" => "Error messages.",
View
Repositories/statistics/htdocs/flags18x14/xa.png 0 → 100755
View
41
Repositories/statistics/includes/inc.fns.show_detail_country.es.php
<?php
/*
/* NJS 2005-12-15
Usage by country, totals.
 
*/
 
include("geoip.inc");
 
// Get detail given country
$show_country = $_REQUEST["code"];
$show_country_code = strtoupper($show_country);
if ($show_country_code == 'T5')
$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)
{
$show_country_name = $GLOBALS["config_vars"]["general"]["local_intranet_name"];
if ($show_country_code == $ccode) $show_country_name = $cname;
}
else if (isset($gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$show_country_code]))
if ($show_country_name == '')
{
$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';
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';
}
}
 
$GLOBALS["db_values"] = $sql->getArchiveCountCountry($_REQUEST["code"]);
?>
View
Repositories/statistics/includes/inc.html.show_detail_country.es.php
View
Repositories/statistics/scripts/eprints-usage_src.php