#!/usr/local/bin/perl # conf_zonedef.cgi # Display defaults for master zones require './bind8-lib.pl'; $access{'defaults'} || &error($text{'zonedef_ecannot'}); &ui_print_header(undef, $text{'zonedef_title'}, ""); print "
\n"; &get_zone_defaults(\%zd); print "\n"; print "\n"; print "
$text{'zonedef_msg'}
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'master_refresh'}\n"; print &time_unit_choice("refunit", $zd{'refunit'}); print "$text{'master_retry'}\n"; print &time_unit_choice("retunit", $zd{'retunit'}); print "
$text{'master_expiry'}\n"; print &time_unit_choice("expunit", $zd{'expunit'}); print "$text{'master_minimum'}\n"; print &time_unit_choice("minunit", $zd{'minunit'}); print "
$text{'master_tmplrecs'}\n"; print " ", " ", "\n"; for($i=0; $i<2 || $config{"tmpl_".($i-1)}; $i++) { @c = split(/\s+/, $config{"tmpl_$i"}, 3); print "\n"; print "\n"; print "\n"; printf "\n"; } print "
$text{'master_name'}$text{'master_type'}$text{'master_value'}
%s\n", $c[2] ? '' : 'checked', $text{'master_user'}; printf "\n", $c[2] ? 'checked' : ''; print "
\n"; print "$text{'master_include'}\n"; printf " %s\n", $config{'tmpl_include'}, &file_chooser_button("include"); print "
$text{'zonedef_email'}",&ui_textbox("email", $config{'tmpl_email'}, 40), "
$text{'zonedef_prins'}",&ui_opt_textbox("prins", $config{'default_prins'}, 30, &text('zonedef_this', "".&get_system_hostname()."")), "

\n"; $conf = &get_config(); $options = &find("options", $conf); $mems = $options->{'members'}; foreach $c (&find("check-names", $mems)) { $check{$c->{'values'}->[0]} = $c->{'values'}->[1]; } print "\n"; print "\n"; print "
$text{'zonedef_msg2'}
\n"; print "\n"; print &addr_match_input($text{'zonedef_transfer'}, "allow-transfer", $mems); print &addr_match_input($text{'zonedef_query'}, "allow-query", $mems); print "\n"; print "\n"; &ignore_warn_fail($text{'zonedef_cmaster'}, 'master', $check{'master'}); &ignore_warn_fail($text{'zonedef_cslave'}, 'slave', $check{'slave'}); print "\n"; print "\n"; &ignore_warn_fail($text{'zonedef_cresponse'}, 'response', $check{'response'}); print &choice_input($text{'zonedef_notify'}, "notify", $mems, $text{'yes'}, "yes", $text{'no'}, "no", $text{'default'}, undef); print "\n"; print "

\n"; print "
\n"; &ui_print_footer("", $text{'index_return'}); # ignore_warn_fail(text, name, value) sub ignore_warn_fail { print "$_[0] \n"; printf " $text{'ignore'}\n", $_[2] eq 'ignore' ? 'checked' : ''; printf " $text{'warn'}\n", $_[2] eq 'warn' ? 'checked' : ''; printf " $text{'fail'}\n", $_[2] eq 'fail' ? 'checked' : ''; printf " $text{'default'}\n", !$_[2] ? 'checked' : ''; }