Handle hostnames with upper-case letters
[webmin.git] / dnsadmin / edit_record.cgi
1 #!/usr/local/bin/perl
2 # edit_record.cgi
3 # Edit an existing record of some type
4
5 require './dns-lib.pl';
6 &ReadParse();
7 $conf = &get_config();
8 $zconf = $conf->[$in{'index'}];
9 $dom = $zconf->{'values'}->[0];
10 %access = &get_module_acl();
11 &can_edit_zone(\%access, $dom) ||
12         &error("You are not allowed to edit records in this zone");
13 &header("Edit $code_map{$in{'type'}}", "");
14 print "<center><font size=+2>In ",&arpa_to_ip($dom),"</font></center>\n";
15 print &ui_hr();
16
17 @recs = &read_zone_file($zconf->{'values'}->[1], $zconf->{'values'}->[0]);
18 &foreign_call("bind8", "record_input", $in{'index'}, undef, $in{'type'},
19               $zconf->{'values'}->[1], $zconf->{'values'}->[0], $in{'num'},
20               $recs[$in{'num'}]);
21 print &ui_hr();
22 &footer("edit_recs.cgi?index=$in{'index'}&type=$in{'type'}", "records");
23