list_services.cgi

来自「linux环境下的一个防火墙程序的源代码」· CGI 代码 · 共 43 行

CGI
43
字号
#!/usr/bin/perl#======================================================================# Turtle Firewall webmin module## Copyright (c) Andrea Frigido# You may distribute under the terms of either the GNU General Public# License#======================================================================do 'lib.pl';&header( $text{list_services_title}, '' );LoadServices( $fw );showServices();print "<br><br>";&footer('','turtle firewall index');#============================================================================sub showServices {	print "<br>		<table border width=\"100%\">			<tr $tb>				<th>$text{name}</th>				<th>$text{description}</th>			</tr>";	my @services = $fw->GetServicesList();	foreach $name (@services) {		my %service = $fw->GetService($name);		print "<tr $cb>";		print "<td width=\"30%\">$name</td>";		print "<td>".$service{DESCRIPTION}."</td>";		print "</tr>";	}	print "</table>\n";	#print '<a href="edit_service.cgi?new=1">create new service</a><br>';}

⌨️ 快捷键说明

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