?? edit_record.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.### Edit an existing record of some type.#use strict;no strict 'vars';require './b9ddns-lib.pl';my $conf = my $zone_conf = my $view = my $origin = '';my $type = my $file = my $rec = my $zone_hdr = '';my @recs = ();&ReadParse();$conf = &get_config();if ($in{'view'}) { $view = $conf->[$in{'view'}]; $conf = $view->{'members'};}$zone_conf = $conf->[$in{'index'}];$origin = lc($zone_conf->{'value'});$origin .= '.' unless ($origin =~ /\.$/o);%access = &get_module_acl();unless (&can_edit_zone(\%access, $conf->[$in{'index'}], $view)) { &terror('recs_ecannot');}$type = $in{'ztype'};$file = $in{'file'};@recs = &get_zone($zone_conf, $file, $origin);$rec = $recs[$in{'num'}];$zone_hdr = &zone_header($in{'dynamic'}, $origin, $text{ucfirst($type)});&header(&text('edit_title', $text{'edit_' . $rec->{'type'}}), '', undef, 0, 0, 0, undef, undef, undef, $zone_hdr);$zone_hdr = $origin;unless ($config{'display_fqdn'}) { $zone_hdr = &convert_fqdn(-1, $zone_hdr, '.', 1);}print '<center><font size=+2>', $zone_hdr, "</font></center><hr>\n";print $text{'dname_zeros'}, '<p>' if ($in{'type'} eq 'DNAME' && $origin =~ /\.ip6\.arpa\.$/o);&record_input($in{'index'}, $in{'view'}, $in{'type'}, $file, $origin, $in{'num'}, $rec);print '<hr>';$rec = "edit_zone.cgi?index=$in{'index'}&view=$in{'view'}&type=$type";$zone_hdr = "edit_recs.cgi?index=$in{'index'}&view=$in{'view'}&type=$in{'type'}&file=${file}&ztype=${type}&sort=$in{'sort'}";if ($in{'hide'}) { $rec .= '&hide=' . &urlize($in{'hide'}); $zone_hdr .= '&hide=' . &urlize($in{'hide'});}if ($in{'show'}) { $rec .= '&show=' . &urlize($in{'show'}); $zone_hdr .= '&show=' . &urlize($in{'show'});}&footer('', $text{'index_return'}, $rec, $text{'recs_return'}, $zone_hdr, $text{'edit_return'});exit;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -