Code: Alles auswählen
function country_select($default, $select_name = "country")
{
global $phpEx, $phpbb_root_path;
$country=array();
$countrydir = opendir($phpbb_root_path . 'images/flags/');
while ($file = readdir($countrydir)) {
if ($file != "." && $file != "..") {
$filename = $file;
$displayname = trim(str_replace(".gif", "", $filename));
$country[$displayname] = $displayname;
}
}
closedir($countrydir);
@asort($country);
@reset($country);
$country_select = '<select name="' . $select_name . '">';
while ( list($displayname, $filename) = @each($country) )
{
$selected = ( strtolower($default) == strtolower($filename) ) ? ' selected="selected"' : '';
$country_select .= '<option value="' . $displayname . '"' . $selected . '>' . ucwords($displayname) . '</option>';
}
$country_select .= '</select>';
return $country_select;
}
Code: Alles auswählen
if ( !empty($HTTP_POST_VARS['country']) )
{
$user_country = htmlspecialchars($HTTP_POST_VARS['country']);
}
else
{
$error = true;
$error_msg = $country['Fields_empty'];
}
Code: Alles auswählen
if( $country == $lang['country_choice']['0'] )