📄 index.cgi
字号:
#!/usr/local/bin/perl# index.cgirequire './hpuxexports-lib.pl';&header("NFS Exports", "", undef, 1, 1);print "<hr>\n";@exp = &list_exports();if (@exp) { print "<table border width=100%>\n"; print "<tr $tb><td><b>Directory</b></td> <td><b>Clients</b></td> </tr>\n"; foreach $e (&list_exports()) { print "<tr $cb>\n"; print "<td><a href=\"edit_export.cgi?$e\">$e</a></td>\n"; @einfo = &get_exports($e); &parse_options($einfo[1]); undef(%clients); foreach (split(/:/, $options{"access"})) { $clients{$_}++; } foreach (split(/:/, $options{"rw"})) { $clients{$_}++; } foreach (split(/:/, $options{"root"})) { $clients{$_}++; } if (%clients) { $clients = join(' ' , sort { $a cmp $b } (keys %clients)); if (length($clients) > 80) { $clients = substr($clients, 0, 80)."..."; } } else { $clients = "Everyone"; } print "<td>$clients</td>\n"; print "</tr>\n"; } print "</table>\n"; }else { print "<b>No directories are currently being exported on ", "this system</b>. <p>\n"; }print "<a href=\"edit_export.cgi\">Export a new directory</a>. <p>\n";print "<hr>\n";print "<table width=100%> <tr>\n";print "<td><form action=restart_exporting.cgi>\n";print "<input type=submit value=\"Apply Changes\">\n";print "</form></td>\n";print "<td valign=top> Click this button to apply the current file exports\n";print "configuration. This will make all the directories listed above\n";print "available with the options specified.</td>\n";print "</tr> <tr> </table>\n";print "<hr>\n";&footer("/", "index");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -