Newer
Older
Digital_Repository / Repositories / statistics / includes / inc.fns.show_detail_country.es.php
nstanger on 16 Dec 2005 670 bytes - Moved GeoIP to global include_path.
<?php
/*
	Usage by country, totals.

*/

	include("geoip.inc");
	
	$gi = new GeoIP;

	// Get detail given country
	$show_country = $_REQUEST["code"];
	$show_country_code = strtoupper($show_country);
	
	if ($show_country_code == 'T5')
	{
		$show_country_name = $GLOBALS["config_vars"]["general"]["local_intranet_name"];
	}
	else 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"]);
?>