.country{cursor: pointer;} .country:hover{text-decoration: underline;}
';
$result = Db::getInstance()->ExecuteS('SELECT cl.`id_country`, `name`, `iso_code` FROM `'._DB_PREFIX_.'country_lang` cl
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = cl.`id_country`
WHERE `id_lang` = \''.intval($id_lang).'\' ORDER BY `name` ASC;');
$separator = 0;
foreach ($result as $index => $row)
{
if ($separator)
$output .= ($separator % $nb_by_line) ? ' | ' : '
';
$output .= ''.$row['name'] . ' (' . $row['iso_code'] . ')';
$separator++;
}
return ($output);
}
function show_buttons($id_lang, $id_country)
{
if (!is_numeric($id_lang) || !is_numeric($id_country))
return ("error");
$coord_x = -1;
$coord_y = -1;
$output = '
';
$result = Db::getInstance()->ExecuteS('SELECT cl.`id_country`, `name`, `iso_code`, `x`, `y` FROM `'._DB_PREFIX_.'country_lang` cl
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = cl.`id_country`
LEFT JOIN `'._DB_PREFIX_.'location_coords` lc ON c.`id_country` = lc.`id_country`
WHERE `id_lang` = \''.intval($id_lang).'\' AND cl.`id_country`= \''.intval($id_country).'\';');
if (isset($result[0]['id_country']))
{
$output .= $result[0]['name'].' ('.$result[0]['iso_code'].')';
if (isset($result[0]['x']) && isset($result[0]['y']))
{
$coord_x = $result[0]['x'];
$coord_y = $result[0]['y'];
}
}
$output .= '