-my %selected=();
-my %checked=();
-my $filename = "${General::swroot}/firewall/customservices";
-my $key = 0; # used for finding last sequence number used
-
-# Darren Critchley - vars for setting up sort order
-my $sort_col = '1';
-my $sort_type = 'a';
-my $sort_dir = 'asc';
-
-if ($ENV{'QUERY_STRING'} ne '') {
- my ($item1, $item2, $item3) = split(/\&/,$ENV{'QUERY_STRING'});
- if ($item1 ne '') {
- ($junk, $sort_col) = split(/\=/,$item1)
- }
- if ($item2 ne '') {
- ($junk, $sort_type) = split(/\=/,$item2)
- }
- if ($item3 ne '') {
- ($junk, $sort_dir) = split(/\=/,$item3)
- }
+# Maps a nice printable name to the changing part of the pid file, which
+# is also the name of the program
+my %servicenames =(
+ $Lang::tr{'dhcp server'} => 'dhcpd',
+ $Lang::tr{'web server'} => 'httpd',
+ $Lang::tr{'cron server'} => 'fcron',
+ $Lang::tr{'dns proxy server'} => 'dnsmasq',
+ $Lang::tr{'logging server'} => 'syslogd',
+ $Lang::tr{'kernel logging server'} => 'klogd',
+ $Lang::tr{'ntp server'} => 'ntpd',
+ $Lang::tr{'secure shell server'} => 'sshd',
+ $Lang::tr{'vpn'} => 'pluto',
+ $Lang::tr{'web proxy'} => 'squid',
+ 'OpenVPN' => 'openvpn'
+);
+
+my %link =(
+ $Lang::tr{'dhcp server'} => "<a href=\'dhcp.cgi\'>$Lang::tr{'dhcp server'}</a>",
+ $Lang::tr{'web server'} => $Lang::tr{'web server'},
+ $Lang::tr{'cron server'} => $Lang::tr{'cron server'},
+ $Lang::tr{'dns proxy server'} => $Lang::tr{'dns proxy server'},
+ $Lang::tr{'logging server'} => $Lang::tr{'logging server'},
+ $Lang::tr{'kernel logging server'} => $Lang::tr{'kernel logging server'},
+ $Lang::tr{'ntp server'} => "<a href=\'time.cgi\'>$Lang::tr{'ntp server'}</a>",
+ $Lang::tr{'secure shell server'} => "<a href=\'remote.cgi\'>$Lang::tr{'secure shell server'}</a>",
+ $Lang::tr{'vpn'} => "<a href=\'vpnmain.cgi\'>$Lang::tr{'vpn'}</a>",
+ $Lang::tr{'web proxy'} => "<a href=\'proxy.cgi\'>$Lang::tr{'web proxy'}</a>",
+ 'OpenVPN' => "<a href=\'ovpnmain.cgi\'>OpenVPN</a>",
+ "$Lang::tr{'intrusion detection system'} (GREEN)" => "<a href=\'ids.cgi\'>$Lang::tr{'intrusion detection system'} (GREEN)</a>",
+ "$Lang::tr{'intrusion detection system'} (RED)" => "<a href=\'ids.cgi\'>$Lang::tr{'intrusion detection system'} (RED)</a>",
+ "$Lang::tr{'intrusion detection system'} (ORANGE)" => "<a href=\'ids.cgi\'>$Lang::tr{'intrusion detection system'} (ORANGE)</a>",
+ "$Lang::tr{'intrusion detection system'} (BLUE)" => "<a href=\'ids.cgi\'>$Lang::tr{'intrusion detection system'} (BLUE)</a>"
+);
+
+my $lines=0; # Used to count the outputlines to make different bgcolor
+
+my $iface = '';
+if (open(FILE, "${General::swroot}/red/iface")){
+ $iface = <FILE>;
+ close FILE;
+ chomp $iface;