"; else $img="\"$tabel[code]\"/"; $mesaj=str_replace($tabel[code],$img,$mesaj); } return $mesaj; } /**end functii smileys*/ /**functii ip2country*/ /**Dupa functiile originale create de Ozh.*/ function getCountryName($display=0,$ip="") { global $db, $geo; $refresh = 1; if (!$ip) { $ip = $_SERVER['REMOTE_ADDR']; $refresh = 0; } if (!$geo || $refresh) $geo = ip2nation ($ip); if ($display) echo $geo[country]; return $geo[country]; } function getCountryCode($display=0,$ip="") { global $db, $geo; $refresh = 1; if (!$ip) { $ip = $_SERVER['REMOTE_ADDR']; $refresh = 0; } if (!$geo || $refresh) $geo = ip2nation ($ip); if ($display) echo $geo[code]; return $geo[code]; } function ip2nation($ip) { global $db; dbconectare(0); mysql_select_db($db) or die(mysql_error()); $sql = "SELECT c.country, c.code FROM ip2nationCountries c, ip2nation i WHERE i.ip < INET_ATON('".$ip."') AND c.code = i.country ORDER BY i.ip DESC LIMIT 0,1"; $row = tabelare(dbquery("$sql")); return $row; } /**end functii ip2country*/ ?> The database could not be selected