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

📄 index.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# index.cgirequire './dfs-lib.pl';&header("NFS Shares", "", "intro", 1, 1);print "<hr>\n";@shlist = &list_shares();if (@shlist) {	print "<table border width=100%>\n";	print "<tr $tb><td width=20%><b>Directory</b></td> ",	      "<td><b>Clients</b></td> </tr>\n";	foreach $s (&list_shares()) {		@sinfo = &get_share($s);		&parse_options($sinfo[2]);		print "<tr $cb>\n";		if (defined($options{'public'})) {			print "<td><b><a href=\"edit_share.cgi?$s\">",			      "$s</a></b></td>\n";			}		else {			print "<td><a href=\"edit_share.cgi?$s\">$s</a></td>\n";			}		undef(%clients);		foreach (split(/:/, $options{"ro"})) { $clients{$_}++; }		foreach (split(/:/, $options{"rw"})) { $clients{$_}++; }		foreach (split(/:/, $options{"root"})) { $clients{$_}++; }		if (%clients) {			$clients = join(' &nbsp;|&nbsp; ' , sort { $a cmp $b }				    map { $_ =~ /^\@(.*)/ ? "$1.*" : $_ }				     (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_share.cgi\">Start sharing a new directory</a>. <p>\n";print "<hr>\n";print "<table width=100%> <tr>\n";print "<td><form action=restart_sharing.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 sharing\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 + -