⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conf_zonedef.cgi

📁 BIND 9 dynamic DNS webmin module. This module supports both static and dynamic zones, and IPv4 and I
💻 CGI
字号:
#! /usr/bin/perl##    B9DDNS - BIND 9 dynamic DNS webmin module.#    Copyright (C) 2003 John Horne. <john.horne@plymouth.ac.uk>##    This program is free software; you can redistribute it and/or modify#    it under the terms of the GNU General Public License as published by#    the Free Software Foundation; either version 2 of the License, or#    (at your option) any later version.##    This program is distributed in the hope that it will be useful,#    but WITHOUT ANY WARRANTY; without even the implied warranty of#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#    GNU General Public License for more details.##    You should have received a copy of the GNU General Public License#    along with this program; if not, write to the Free Software#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.### Display defaults for master zones.#use strict;no strict 'vars';require './b9ddns-lib.pl';my $i = 0;my $type = my $time = my $unit = '';my @conf_type = ();my %zd = ();my @rec_types = ( 'A', 'CNAME', 'MX', 'NS', 'HINFO' );%access = &get_module_acl();unless ($access{'defaults'}) {	&terror('zonedef_ecannot');}&get_zone_defaults(\%zd);&header($text{'zonedef_title'}, '');print '<hr>';print '<form action=save_zonedef.cgi>';print '<table border width=85%>';print "<tr $tb><td><b>$text{'zonedef_msg'}</b></td></tr>\n";print "<tr $cb><td><table cellpadding=3>\n";print '<tr><td><b>', $text{'master_serial'}, '</b></td>';printf '<td><input disabled size=21 value="%s"></td>',	($config{'soa_date_style'}) ? &today() . '00' : 1;$time = ($config{'default_master_srvr'}) ? $config{'default_master_srvr'}					 : &get_system_hostname();$time .= '.' unless ($time =~ /\.$/o);print '<td><b>', $text{'master_server'}, '</b></td>';printf '<td><input disabled size=21 value="%s"></td></tr>', $time;($time, $unit) = &get_time($config{'display_ttl_secs'},					$zd{'refresh'} . $zd{'refunit'});$time = $text{'invalid'} unless ($time);print '<tr><td><b>', $text{'master_refresh'}, '</b></td>';printf '<td><input name=refresh size=10 value="%s">', $time;&time_unit_choice('refunit', $unit);print '</td>';($time, $unit) = &get_time($config{'display_ttl_secs'},					$zd{'retry'} . $zd{'retunit'});$time = $text{'invalid'} unless ($time);print '<td><b>', $text{'master_retry'}, '</b></td>';printf '<td><input name=retry size=10 value="%s">', $time;&time_unit_choice('retunit', $unit);print '</td></tr>';($time, $unit) = &get_time($config{'display_ttl_secs'},					$zd{'expiry'} . $zd{'expunit'});$time = $text{'invalid'} unless ($time);print '<tr><td><b>', $text{'master_expiry'}, '</b></td>';printf '<td><input name=expiry size=10 value="%s">', $time;&time_unit_choice('expunit', $unit);print '</td>';($time, $unit) = &get_time($config{'display_ttl_secs'},					$zd{'ncache'} . $zd{'ncacheunit'});$time = $text{'invalid'} unless ($time);print '<td><b>', $text{'master_ncache'}, '</b></td>';printf '<td><input name=ncache size=10 value="%s">', $time;&time_unit_choice('ncacheunit', $unit);print '</td></tr>';($time, $unit) = &get_time($config{'display_ttl_secs'},				$zd{'defttl'} . $zd{'defttlunit'});$time = $text{'invalid'} unless ($time);print '<tr><td><b>', $text{'master_defttl'}, '</b></td>';printf '<td><input name=defttl size=10 value="%s">', $time;&time_unit_choice('defttlunit', $unit);print '</td></tr>';print '<tr><td valign=top><b>', $text{'master_tmplrecs'}, '</b></td>';print '<td colspan=3><table border>';print "<tr $tb><td><b>$text{'master_name'}</b></td>",      "<td><b>$text{'master_type'}</b></td>",      "<td><b>$text{'master_value'}</b></td></tr>\n";for ($i = 0; $i < 2 || $config{'tmpl_' . ($i - 1)}; $i++) {	@conf_type = split(/\s+/, $config{"tmpl_$i"}, 3);	print "<tr $cb>\n";	printf '<td><input name=name_%d size=15 value="%s"></td>',		$i, $conf_type[0];	printf '<td><select name=type_%d>', $i;	foreach $type (@rec_types) {		printf "<option value=%s %s>%s\n",			$type, ($conf_type[1] eq $type) ? 'selected' : '',			$text{"type_$type"};	}	print '</select></td>';	printf '<td><input type=radio name=def_%d value=1 %s> %s',		$i, &checked(! $conf_type[2]), $text{'master_user'};	printf '<input type=radio name=def_%d value=0 %s>',		$i, &checked($conf_type[2]);	printf '<input name=value_%d size=15 value="%s">', $i, $conf_type[2];	print "</td></tr>\n";}print '</table><br>';print '<b>', $text{'master_include'}, '</b>';printf '<input name=include size=40 value="%s"> %s',	$config{'tmpl_include'}, &file_chooser_button('include');print "</td></tr>\n";print "<tr><td><b>$text{'zonedef_email'}</b></td>\n";printf '<td colspan=3><input name=email size=40 value="%s"></td></tr>',	$config{'soa_email'};print "</tr></table></td></tr></table>\n";print '<input type=submit value="', $text{'save'}, '"></form>';print '<hr>';&footer('', $text{'index_return'});exit;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -