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

📄 save_shared.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# save_shared.cgi# Update, create or delete a shared networkrequire './dhcpd-lib.pl';require './params-lib.pl';&ReadParse();$parent = &get_parent_config();$conf = $parent->{'members'};if ($in{'delete'}) {	# Delete this net	$whatfailed = $text{'sshared_faildel'};	$sha = $conf->[$in{'idx'}];	&save_directive($parent, [ $sha ], [ ], 0);	}elsif ($in{'options'}) {	# Redirect to client options	&redirect("edit_options.cgi?idx=$in{'idx'}");	}else {	$whatfailed = $text{'sshared_failsave'};	if (!$in{'new'}) {		# Get the old shared net structure		$sha = $conf->[$in{'idx'}];		}	else {		# Create a new net		$sha->{'name'} = "shared-network";		$sha->{'type'} = 1;		$sha->{'members'} = [ ];		}	$in{'name'} =~ /^\S+$/ ||		&error($text{'sshared_invalidsname'});	$sha->{'values'} = [ $in{'name'} ];	&parse_params($sha);	if ($in{'new'}) {		# Add this shared net		&save_directive($parent, [ ], [ $sha ], 0);		}	else {		# Update shared net		&save_directive($parent, [ $sha ], [ $sha ], 0);		}	}&flush_file_lines();&redirect("");

⌨️ 快捷键说明

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