diff options
Diffstat (limited to 'usr/local/www/system_camanager.php')
-rw-r--r-- | usr/local/www/system_camanager.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/usr/local/www/system_camanager.php b/usr/local/www/system_camanager.php index 5541f83..052e2e4 100644 --- a/usr/local/www/system_camanager.php +++ b/usr/local/www/system_camanager.php @@ -271,6 +271,15 @@ function method_change() { print_input_errors($input_errors); if ($savemsg) print_info_box($savemsg); + + // Load valid country codes + $dn_cc = array(); + if (file_exists("/etc/ca_countries")){ + $dn_cc_file=file("/etc/ca_countries"); + foreach($dn_cc_file as $line) + if (preg_match('/^(\S*)\s(.*)$/', $line, $matches)) + array_push($dn_cc, $matches[1]); + } ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> @@ -394,12 +403,15 @@ function method_change() { <tr> <td align="right"><?=gettext("Country Code");?> : </td> <td align="left"> - <input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>"/> - - <em><?=gettext("ex:");?></em> - - <?=gettext("US");?> - <em><?=gettext("( two letters )");?></em> + <select name='dn_country' class="formselect"> + <?php + foreach( $dn_cc as $cc){ + $selected = ""; + if ($pconfig['dn_country'] == $cc) $selected = "selected"; + print "<option value=\"$cc\" $selected>$cc</option>"; + } + ?> + </select> </td> </tr> <tr> |