public static function ipcountry($ip='')
	{
		$country = '';
		if ($ip)
		{
			if (!($gdb = self::getGeoDBO()))
			{
				return $country;
			}

			$sql = "SELECT LOWER(countrySHORT) FROM ipcountry WHERE ipFROM <= INET_ATON(" . $gdb->quote($ip) . ") AND ipTO >= INET_ATON(" . $gdb->quote($ip) . ")";
			$gdb->setQuery($sql);
			$country = stripslashes($gdb->loadResult());
		}
		return $country;
	}