Neuspješan upit (svasta): ' . mysql_error()); $language = mysql_result($result, 0, 'language'); $tab_jezik = explode (":", $language); $lan = $jezik-1; ////////////////// COUNTRY DETECTION $user_ip_address = $_SERVER['REMOTE_ADDR'];//Gets user's IP Address $user_ip_number = ip2long($user_ip_address);//Converts IP address to IP Number // echo "NO $user_ip_number "; $record_query = "SELECT * FROM `hcip2c` WHERE IP_FROM <= $user_ip_number AND IP_TO >= $user_ip_number;"; $result = mysql_query($record_query) or die(mysql_errno().': Could not query database. '.mysql_error()); if (mysql_num_rows($result) == 0) { $found = 0; //visitor from outer space?! } while ($row = mysql_fetch_assoc($result)) { $cc2 = $row['COUNTRY_CODE2']; $cc3 = $row['COUNTRY_CODE3']; $country = $row['COUNTRY_NAME']; $found = 0; // za ostale if ($cc2 == "HR" || $cc2 == "BA" || $cc2 == "CS" || $cc2 == "MK") $found=1; if ($cc2 == "IT" || $cc2 == "SM") $found=2; //talijanski if ($cc2 == "DE" || $cc2 == "AT" || $cc2 == "BE" || $cc2 == "LI" || $cc2 == "LU") $found=4; // njemački if ($cc2 == "SI") $found=5; //slovenski if ($cc2 == "CZ" || $cc2 == "SK") $found=6; //češki if ($cc2 == "HU") $found=7; //madjarski if ($cc2 == "FR") $found=8; //francuski if ($cc2 == "PL") $found=9; //polski } $coc = $_COOKIE['setjezik']; $jezik = $_GET["jezik"]; $lang = $_GET["lang"]; $scrw = $_GET["scrw"]; if (!$jezik) $jezik=$coc; //iz cookija if (!$jezik & $found<99) $jezik=$found; //zemlja porijekla if (!$jezik) $jezik=3; //engleski default ################ POSTAVLJANJE COOKIE-a za odabrani jezik $aj = " "; echo $aj; $k = $jezik-1; $titl = "$txt_praznici[$k] - $txt_vrsta4[$k], $txt_vrsta3[$k], $txt_otok[$k], $txt_accom[$k], $txt_booking[$k]"; $searcht = "$txt_cro[$k], $txt_vrsta4[$k], $txt_vrsta3[$k], $txt_vrsta2[$k], $txt_vrsta1[$k], $txt_otok[$k], $txt_accom[$k], $txt_booking[$k]"; $keyw = "$txt_cro[$k] $txt_praznici[$k] $txt_vrsta4[$k] $txt_vrsta3[$k] $txt_vrsta2[$k] $txt_vrsta1[$k] accommodation sailing privat Dalmatia Dalmazia $txt_more[$k] $txt_otok[$k] $txt_booking[$k]"; echo "$titl, Dubrovnik, Split, Makarska, Zadar, Opatija, Rovinj, Brac, Hvar, Krk, Rab\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ?>