acl_security.pl

来自「Unix下基于Web的管理工具」· PL 代码 · 共 37 行

PL
37
字号
require './fdisk-lib.pl';# acl_security_form(&options)# Output HTML for editing security options for the fdisk modulesub acl_security_form{local @dlist = &list_disks();local ($d, %dcan);map { $dcan{$_}++ } split(/\s+/, $_[0]->{'disks'});print "<tr> <td valign=top><b>$text{'acl_disks'}</b></td> ",      "<td><select name=disks size=4 multiple>\n";foreach $d (@dlist) {	local @d = split(/\s+/, $d);	printf "<option value='%s' %s>%s\n",		$d[0],		$dcan{$d[0]} || $dcan{"*"} ? "selected" : "",		$d[0];	}print "</select></td> </tr>\n";}# acl_security_save(&options)# Parse the form for security options for the fdisk modulesub acl_security_save{local @dlist = &list_disks();local @sel = split(/\0/, $in{'disks'});if (scalar(@dlist) == scalar(@sel)) {	$_[0]->{'disks'} = "*";	}else {	$_[0]->{'disks'} = join(" ", @sel);	}}

⌨️ 快捷键说明

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