', i18n::translate('The flags directory doesn\'t exist
To make the flags work make sure that ./places/flags directory exists and contains flags files.'), '
';
echo '
\n";
print_simple_footer();
exit;
}
$country = array();
$rep = opendir('./places/flags/');
while ($file = readdir($rep)) {
if (stristr($file, ".gif")) {
$country[] = substr($file, 0, strlen($file)-4);
}
}
closedir($rep);
sort($country);
if($countrySelected == "Countries") {
$flags = $country;
}
else {
$flags = array();
$rep = opendir('./places/'.$countrySelected.'/flags/');
while ($file = readdir($rep)) {
if (stristr($file, ".gif")) {
$flags[] = substr($file, 0, strlen($file)-4);
}
}
closedir($rep);
sort($flags);
}
if ($action == "ChangeFlag") {
?>
\n\n";
}
echo "
\n";
print_simple_footer();
exit;
}
else {
?>
", i18n::translate('Close Window'), "
\n";
print_simple_footer();
?>