📄 edit_view.cgi
字号:
#! /usr/bin/perl## B9DDNS - BIND 9 dynamic DNS webmin module.# Copyright (C) 2003 John Horne. <john.horne@plymouth.ac.uk># Copyright (C) 2004 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 options for an existing view.#use strict;no strict 'vars';require './b9ddns-lib.pl';my $conf = my $view_conf = my $view = my $disabled = '';my @views = ();&ReadParse();$conf = &get_config();$view = $conf->[$in{'index'}];$view_conf = $view->{'members'};%access = &get_module_acl();unless ($access{'views'}) { &terror('view_ecannot');}unless (&can_edit_view(\%access, $view)) { &terror('view_ecannot');}&header($text{'view_title'}, '');print '<hr>';print '<form action=save_view.cgi>';print '<input type=hidden name=index value="', $in{'index'}, '">';print '<table border width=100%>';print "<tr $tb><td><b>$text{'view_opts'}</b></td></tr>\n";print "<tr $cb><td><table>\n";@views = @{ $view->{'values'} };print '<tr><td><b>', $text{'view_name'}, '</b></td>';print '<td><tt>', $views[0], '</tt></td></tr>';print &addr_match_input($text{'view_match_client'}, 'match-clients', $view_conf);print '</tr>';$disabled = (&bind_version(0) < 9.2) ? 'disabled' : '';print &addr_match_input($text{'view_match_dest'}, 'match-destinations', $view_conf, 0, $disabled);print '</tr><tr><td></td></tr>';print &choice_input($text{'view_match_recursive'}, 'match-recursive-only', $view_conf, $disabled, $text{'default'}, undef, $text{'yes'}, 'yes', $text{'no'}, 'no');print '</tr><tr><td></td></tr>';print &choice_input($text{'view_recursion'}, 'recursion', $view_conf, 0, $text{'default'}, undef, $text{'yes'}, 'yes', $text{'no'}, 'no');print '</tr>';print "</table></td></tr></table>\n";$disabled = ($access{'ro'}) ? 'disabled' : '';print '<table width=100%><tr><td align=left>';print "<input type=submit $disabled value=\"", $text{'save'}, '"></td></form>';print '<form action=delete_view.cgi>';print '<input type=hidden name=index value="', $in{'index'}, '">';print "<td align=right><input type=submit $disabled value=\"", $text{'delete'}, '"></td></form>';print "</tr></table>\n";print '<hr>';&footer('', $text{'index_return'});exit;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -