This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, fifteen has been updated via 96cbae14d7ad23028eea2701210a312003d4b199 (commit) via 921d7f2c3d51b8f49cf4a2db88c50b01a7949513 (commit) via 2d0e4dd2ef2340d8036f7e9e24c79730ee6a8c8c (commit) via 30aef1726ce7d9e0b8241cabcc30e7904c31b12a (commit) via 4c2910e91b036dbb58109681bed0facd49cb3f26 (commit) via e9850821d41da0ee5a524d85d01b1809e1b3af7a (commit) via 99bfa85c8936a503a01402b1d7251a80d2fc5497 (commit) via fd6299ba8a493e1394d8fac8c1b8a26e51b444f8 (commit) via d9a0d20113711a83a1a12845e81fe0144f22d330 (commit) via f76b104cf3d3be62ebc7c3e38734e6ab0c6d5e2c (commit) via a51528487b0d04de80f4e79555595445de9d23cc (commit) via efca40b5cc923da6fc169d3bb2eaa2f39708330b (commit) via 961f3dbcd8675f8b62ecd2404a709e47ec2ae343 (commit) via 4250f386ce7b1d66a87fed6fcfa84ac65471be48 (commit) via e602416f94ba818557644647bb6f55503e33ccf1 (commit) via b0cffde30e2451500555853fe4acde983ab7735f (commit) via 91a81810e8395c84ba223e7d744e3a770facafc4 (commit) via c380ac83d3fe8f1fe4e73bbb2a63238f43ad0581 (commit) via c7edc1c70a5565cbb28a87c650b7cbb735923300 (commit) via 623758aa652d6b6066ea01e5f6e12378e7504ba8 (commit) via 0317493a26a8da8e87a3c39ad69122aa6f008261 (commit) via cff7f5a19ad66d3bdb9ee22df5b0ba3eb4639cc7 (commit) via ce8c87bdf710ba0ef8942f64558448817bf64029 (commit) via 52ca3c809334e1ab6bd5a75f2f66d2c49f7e228f (commit) via 09eb51c98575d4aea2a11aed7a6fd682ded38d77 (commit) via 633b0df5eed38a34ea165589f8906714f6c7b76d (commit) via 783bf6afa5f4dcd7d12f563cc1eef6ac841353d5 (commit) via 902a15be1df0b63b10f1b8e7fbdc7779650a0e65 (commit) via 8d28e3d092f85a8cdb57ebab5a5532a0b1df96f2 (commit) via fda1f52ff3b2e031700f92af71a72a00ce41d992 (commit) from 31d488a4f688903fd27269a18bdb84d53e9ef6d6 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 96cbae14d7ad23028eea2701210a312003d4b199 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 8 15:46:31 2014 +0100
Update apache2 rootfile.
commit 921d7f2c3d51b8f49cf4a2db88c50b01a7949513 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 8 15:45:33 2014 +0100
Update translations.
commit 2d0e4dd2ef2340d8036f7e9e24c79730ee6a8c8c Author: Alexander Marx alexander.marx@ipfire.org Date: Wed Jan 8 15:44:55 2014 +0100
Layout index: added shutdown.cgi and menuentry. Also redesigned Layout
commit 30aef1726ce7d9e0b8241cabcc30e7904c31b12a Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 8 15:08:03 2014 +0100
theme: Don't show headlines in bigger font.
commit 4c2910e91b036dbb58109681bed0facd49cb3f26 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 8 15:07:42 2014 +0100
theme: Fix CSS coding style.
commit e9850821d41da0ee5a524d85d01b1809e1b3af7a Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 11:11:21 2014 +0100
fifteen-theme: made vpnmain.cgi tables themeable
commit 99bfa85c8936a503a01402b1d7251a80d2fc5497 Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 11:10:46 2014 +0100
fifteen-theme: made ovpnmain.cgi tables themeable
Conflicts: html/cgi-bin/ovpnmain.cgi
commit fd6299ba8a493e1394d8fac8c1b8a26e51b444f8 Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 10:10:35 2014 +0100
deleted xtaccess and outgoinggrp.cgi from html/cgi directory
commit d9a0d20113711a83a1a12845e81fe0144f22d330 Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 09:31:39 2014 +0100
fifteen-theme: made wirelessclient.cgi table themeable
commit f76b104cf3d3be62ebc7c3e38734e6ab0c6d5e2c Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 09:30:02 2014 +0100
fifteen-theme: made tor.cgi table themeable
commit a51528487b0d04de80f4e79555595445de9d23cc Merge: efca40b 961f3db Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 8 15:01:24 2014 +0100
Merge commit '961f3dbcd8675f8b62ecd2404a709e47ec2ae343' into fifteen
commit efca40b5cc923da6fc169d3bb2eaa2f39708330b Merge: e602416 31d488a Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 8 15:01:10 2014 +0100
Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into fifteen
commit 961f3dbcd8675f8b62ecd2404a709e47ec2ae343 Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 09:29:20 2014 +0100
fifteen-theme: made samba.cgi tables themeable
commit 4250f386ce7b1d66a87fed6fcfa84ac65471be48 Author: Alexander Marx amarx@ipfire.org Date: Wed Jan 8 09:24:57 2014 +0100
fifteen-theme: made country.cgi table themeable
commit e602416f94ba818557644647bb6f55503e33ccf1 Author: Stefan Schantl stefan.schantl@ipfire.org Date: Tue Jan 7 21:13:56 2014 +0100
Fix inpossible download of hostcert on french language.
The french tranlsation string for download host certificate contains a single quote character which breaks the used HTML code. As a result of this it wasn't possibe to download the host certificate via the WUI with selected french language.
Fixes #10405.
commit b0cffde30e2451500555853fe4acde983ab7735f Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 11:41:19 2014 +0100
fifteen-theme: added some css for tables in style.css
commit 91a81810e8395c84ba223e7d744e3a770facafc4 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 11:34:32 2014 +0100
fifteen-theme: made services.cgi tables themeable
commit c380ac83d3fe8f1fe4e73bbb2a63238f43ad0581 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 11:14:13 2014 +0100
fifteen-theme: made wakeonlan.cgi table themeable
commit c7edc1c70a5565cbb28a87c650b7cbb735923300 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 11:08:53 2014 +0100
fifteen-theme: made aliases.cgi table themeable
commit 623758aa652d6b6066ea01e5f6e12378e7504ba8 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 11:04:26 2014 +0100
fifteen-theme: made routing.cgi table themeable
commit 0317493a26a8da8e87a3c39ad69122aa6f008261 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 10:59:21 2014 +0100
fifteen-theme: made dnsforward.cgi table themeable
commit cff7f5a19ad66d3bdb9ee22df5b0ba3eb4639cc7 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 10:38:05 2014 +0100
fifteen-theme: made hosts.cgi tables themeable
commit ce8c87bdf710ba0ef8942f64558448817bf64029 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 10:31:12 2014 +0100
fifteen-theme: made connscheduler tables themeable
commit 52ca3c809334e1ab6bd5a75f2f66d2c49f7e228f Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 10:22:22 2014 +0100
fifteen-theme: made tables in dhcp-server themeable
commit 09eb51c98575d4aea2a11aed7a6fd682ded38d77 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 09:53:46 2014 +0100
fifteen-theme: made ddns table themeable
commit 633b0df5eed38a34ea165589f8906714f6c7b76d Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 09:38:36 2014 +0100
fifteen-theme: made wireless tables themeable
commit 783bf6afa5f4dcd7d12f563cc1eef6ac841353d5 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 09:35:49 2014 +0100
fifteen-theme: made p2p-block tables themeable
commit 902a15be1df0b63b10f1b8e7fbdc7779650a0e65 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 09:34:01 2014 +0100
fifteen-theme: made all tables in firewall-groups themeable
commit 8d28e3d092f85a8cdb57ebab5a5532a0b1df96f2 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 09:27:24 2014 +0100
fifteen-theme: made firewall-tables themeable
commit fda1f52ff3b2e031700f92af71a72a00ce41d992 Author: Alexander Marx amarx@ipfire.org Date: Tue Jan 7 09:23:37 2014 +0100
fifteen-theme: made all log tables themeable
With this commit it is possible to make css designs to all tables in the logs.
-----------------------------------------------------------------------
Summary of changes: config/cfgroot/header.pl | 37 +- config/menu/10-system.menu | 6 + config/rootfiles/common/apache2 | 5 +- doc/language_issues.de | 25 +- doc/language_issues.en | 25 +- doc/language_issues.es | 27 +- doc/language_issues.fr | 27 +- doc/language_issues.nl | 27 +- doc/language_issues.pl | 27 +- doc/language_issues.ru | 27 +- doc/language_issues.tr | 27 +- doc/language_missings | 8 + html/cgi-bin/aliases.cgi | 28 +- html/cgi-bin/connscheduler.cgi | 46 +-- html/cgi-bin/country.cgi | 59 ++-- html/cgi-bin/ddns.cgi | 48 +-- html/cgi-bin/dhcp.cgi | 46 +-- html/cgi-bin/dnsforward.cgi | 32 +- html/cgi-bin/firewall.cgi | 2 +- html/cgi-bin/fwhosts.cgi | 121 ++++--- html/cgi-bin/hosts.cgi | 30 +- html/cgi-bin/index.cgi | 339 ++++++++----------- html/cgi-bin/logs.cgi/firewalllog.dat | 43 +-- html/cgi-bin/logs.cgi/firewalllogip.dat | 75 +++-- html/cgi-bin/logs.cgi/firewalllogport.dat | 68 ++-- html/cgi-bin/logs.cgi/log.dat | 18 +- html/cgi-bin/logs.cgi/proxylog.dat | 25 +- html/cgi-bin/logs.cgi/urlfilter.dat | 33 +- html/cgi-bin/outgoinggrp.cgi | 466 -------------------------- html/cgi-bin/ovpnmain.cgi | 153 +++++---- html/cgi-bin/p2p-block.cgi | 29 +- html/cgi-bin/routing.cgi | 31 +- html/cgi-bin/samba.cgi | 22 +- html/cgi-bin/services.cgi | 73 ++-- html/cgi-bin/shutdown.cgi | 88 +++++ html/cgi-bin/tor.cgi | 8 +- html/cgi-bin/vpnmain.cgi | 137 ++++---- html/cgi-bin/wakeonlan.cgi | 36 +- html/cgi-bin/wireless.cgi | 64 ++-- html/cgi-bin/wirelessclient.cgi | 24 +- html/cgi-bin/xtaccess.cgi | 377 --------------------- html/html/themes/ipfire/include/css/style.css | 59 ++++ langs/de/cgi-bin/de.pl | 2 + langs/en/cgi-bin/en.pl | 2 + 44 files changed, 1176 insertions(+), 1676 deletions(-) delete mode 100644 html/cgi-bin/outgoinggrp.cgi create mode 100755 html/cgi-bin/shutdown.cgi delete mode 100644 html/cgi-bin/xtaccess.cgi
Difference in files: diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index bf92507..9473465 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -367,16 +367,16 @@ sub PrintActualLeases { &openbox('100%', 'left', $tr{'current dynamic leases'}); print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> -<td width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IPADDR'><b>$tr{'ip address'}</b></a></td> -<td width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ETHER'><b>$tr{'mac address'}</b></a></td> -<td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOSTNAME'><b>$tr{'hostname'}</b></a></td> -<td width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ENDTIME'><b>$tr{'lease expires'} (local time d/m/y)</b></a></td> -<td width='5%' align='center'><b>Add to fix leases<b></td> +<th width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IPADDR'><b>$tr{'ip address'}</b></a></th> +<th width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ETHER'><b>$tr{'mac address'}</b></a></th> +<th width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOSTNAME'><b>$tr{'hostname'}</b></a></th> +<th width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ENDTIME'><b>$tr{'lease expires'} (local time d/m/y)</b></a></th> +<th width='5%' align='center'><b>Add to fix leases<b></th> </tr> END - ; +;
open(LEASES,"/var/state/dhcp/dhcpd.leases") or die "Can't open dhcpd.leases"; while ($line = <LEASES>) { @@ -418,24 +418,27 @@ END close(LEASES);
my $id = 0; + my $col=""; foreach my $key (sort leasesort keys %entries) { print "<form method='post' action='/cgi-bin/dhcp.cgi'>\n"; my $hostname = &cleanhtml($entries{$key}->{HOSTNAME},"y");
if ($id % 2) { - print "<tr bgcolor='$table1colour'>"; + print "<tr>"; + $col="bgcolor='$table1colour'"; } else { - print "<tr bgcolor='$table2colour'>"; + print "<tr>"; + $col="bgcolor='$table2colour'"; }
print <<END -<td align='center'><input type='hidden' name='FIX_ADDR' value='$entries{$key}->{IPADDR}' />$entries{$key}->{IPADDR}</td> -<td align='center'><input type='hidden' name='FIX_MAC' value='$entries{$key}->{ETHER}' />$entries{$key}->{ETHER}</td> -<td align='center'><input type='hidden' name='FIX_REMARK' value='$hostname' /> $hostname</td> -<td align='center'><input type='hidden' name='FIX_ENABLED' value='on' /> +<td align='center' $col><input type='hidden' name='FIX_ADDR' value='$entries{$key}->{IPADDR}' />$entries{$key}->{IPADDR}</td> +<td align='center' $col><input type='hidden' name='FIX_MAC' value='$entries{$key}->{ETHER}' />$entries{$key}->{ETHER}</td> +<td align='center' $col><input type='hidden' name='FIX_REMARK' value='$hostname' /> $hostname</td> +<td align='center' $col><input type='hidden' name='FIX_ENABLED' value='on' /> END - ; +;
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $dst) = localtime ($entries{$key}->{ENDTIME}); $enddate = sprintf ("%02d/%02d/%d %02d:%02d:%02d",$mday,$mon+1,$year+1900,$hour,$min,$sec); @@ -446,10 +449,10 @@ END print "$enddate"; } print <<END -<td><input type='hidden' name='ACTION' value='$Lang::tr{'add'}2' /><input type='submit' name='SUBMIT' value='$Lang::tr{'add'}' /> -</td></td></tr></form> +</td><td $col><input type='hidden' name='ACTION' value='$Lang::tr{'add'}2' /><input type='submit' name='SUBMIT' value='$Lang::tr{'add'}' /> +</td></tr></form> END - ; +; $id++; }
diff --git a/config/menu/10-system.menu b/config/menu/10-system.menu index b56a1ec..5755366 100644 --- a/config/menu/10-system.menu +++ b/config/menu/10-system.menu @@ -40,6 +40,12 @@ 'title' => "$Lang::tr{'system information'}", 'enabled' => 1, }; + $subsystem->{'42.shutdown'} = { + 'caption' => $Lang::tr{'shutdown'}, + 'uri' => '/cgi-bin/shutdown.cgi', + 'title' => "$Lang::tr{'shutdown'}", + 'enabled' => 1, + }; $subsystem->{'99.credits'} = { 'caption' => $Lang::tr{'credits'}, 'uri' => '/cgi-bin/credits.cgi', diff --git a/config/rootfiles/common/apache2 b/config/rootfiles/common/apache2 index 4640fa4..8f5c8c0 100644 --- a/config/rootfiles/common/apache2 +++ b/config/rootfiles/common/apache2 @@ -1391,7 +1391,6 @@ srv/web/ipfire/cgi-bin/dns.cgi srv/web/ipfire/cgi-bin/dnsforward.cgi srv/web/ipfire/cgi-bin/ddns.cgi srv/web/ipfire/cgi-bin/dhcp.cgi -#srv/web/ipfire/cgi-bin/dmzholes.cgi srv/web/ipfire/cgi-bin/extrahd.cgi srv/web/ipfire/cgi-bin/fireinfo.cgi srv/web/ipfire/cgi-bin/firewall.cgi @@ -1411,8 +1410,6 @@ srv/web/ipfire/cgi-bin/modem.cgi srv/web/ipfire/cgi-bin/netexternal.cgi srv/web/ipfire/cgi-bin/netinternal.cgi srv/web/ipfire/cgi-bin/netother.cgi -#srv/web/ipfire/cgi-bin/outgoingfw.cgi -#srv/web/ipfire/cgi-bin/outgoinggrp.cgi srv/web/ipfire/cgi-bin/optionsfw.cgi srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/p2p-block.cgi @@ -1423,6 +1420,7 @@ srv/web/ipfire/cgi-bin/qos.cgi srv/web/ipfire/cgi-bin/remote.cgi srv/web/ipfire/cgi-bin/routing.cgi srv/web/ipfire/cgi-bin/services.cgi +srv/web/ipfire/cgi-bin/shutdown.cgi srv/web/ipfire/cgi-bin/speed.cgi srv/web/ipfire/cgi-bin/system.cgi srv/web/ipfire/cgi-bin/time.cgi @@ -1435,6 +1433,5 @@ srv/web/ipfire/cgi-bin/wakeonlan.cgi srv/web/ipfire/cgi-bin/webaccess.cgi srv/web/ipfire/cgi-bin/wireless.cgi srv/web/ipfire/cgi-bin/wirelessclient.cgi -#srv/web/ipfire/cgi-bin/xtaccess.cgi srv/web/ipfire/html var/updatecache diff --git a/doc/language_issues.de b/doc/language_issues.de index 02c9990..0eae7bf 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -147,6 +148,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -175,7 +177,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -363,6 +368,14 @@ WARNING: translation string unused: original WARNING: translation string unused: other countries WARNING: translation string unused: our donors WARNING: translation string unused: out +WARNING: translation string unused: outgoing firewall add ip group +WARNING: translation string unused: outgoing firewall add mac group +WARNING: translation string unused: outgoing firewall edit ip group +WARNING: translation string unused: outgoing firewall edit mac group +WARNING: translation string unused: outgoing firewall group error +WARNING: translation string unused: outgoing firewall groups +WARNING: translation string unused: outgoing firewall ip groups +WARNING: translation string unused: outgoing firewall mac groups WARNING: translation string unused: outgoing firewall mode0 WARNING: translation string unused: outgoing firewall mode1 WARNING: translation string unused: outgoing firewall mode2 @@ -371,6 +384,7 @@ WARNING: translation string unused: outgoing firewall p2p description 1 WARNING: translation string unused: outgoing firewall p2p description 2 WARNING: translation string unused: outgoing firewall p2p description 3 WARNING: translation string unused: outgoing firewall reset +WARNING: translation string unused: outgoing firewall view group WARNING: translation string unused: outgoing firewall warning WARNING: translation string unused: override mtu WARNING: translation string unused: ovpn @@ -414,8 +428,9 @@ WARNING: translation string unused: proxy no proxy extend WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -443,14 +458,16 @@ WARNING: translation string unused: service updated WARNING: translation string unused: servicename WARNING: translation string unused: services settings WARNING: translation string unused: shaping list options -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -575,8 +592,6 @@ WARNING: untranslated string: community rules WARNING: untranslated string: dead peer detection WARNING: untranslated string: emerging rules WARNING: untranslated string: fwhost err hostip -WARNING: untranslated string: new -WARNING: untranslated string: outgoing firewall reserved groupname WARNING: untranslated string: qos add subclass WARNING: untranslated string: route config changed WARNING: untranslated string: routing config added diff --git a/doc/language_issues.en b/doc/language_issues.en index b6b506f..c03ecb9 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -170,6 +171,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -198,7 +200,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -390,6 +395,14 @@ WARNING: translation string unused: original WARNING: translation string unused: other countries WARNING: translation string unused: our donors WARNING: translation string unused: out +WARNING: translation string unused: outgoing firewall add ip group +WARNING: translation string unused: outgoing firewall add mac group +WARNING: translation string unused: outgoing firewall edit ip group +WARNING: translation string unused: outgoing firewall edit mac group +WARNING: translation string unused: outgoing firewall group error +WARNING: translation string unused: outgoing firewall groups +WARNING: translation string unused: outgoing firewall ip groups +WARNING: translation string unused: outgoing firewall mac groups WARNING: translation string unused: outgoing firewall mode0 WARNING: translation string unused: outgoing firewall mode1 WARNING: translation string unused: outgoing firewall mode2 @@ -398,6 +411,7 @@ WARNING: translation string unused: outgoing firewall p2p description 1 WARNING: translation string unused: outgoing firewall p2p description 2 WARNING: translation string unused: outgoing firewall p2p description 3 WARNING: translation string unused: outgoing firewall reset +WARNING: translation string unused: outgoing firewall view group WARNING: translation string unused: outgoing firewall warning WARNING: translation string unused: override mtu WARNING: translation string unused: ovpn @@ -442,8 +456,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -474,14 +489,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -607,8 +624,6 @@ WARNING: untranslated string: Scan for Songs WARNING: untranslated string: advproxy cache-digest WARNING: untranslated string: bytes WARNING: untranslated string: fwhost err hostip -WARNING: untranslated string: new -WARNING: untranslated string: outgoing firewall reserved groupname WARNING: untranslated string: route config changed WARNING: untranslated string: routing config added WARNING: untranslated string: routing config changed diff --git a/doc/language_issues.es b/doc/language_issues.es index d32c90a..9331ed2 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -164,6 +165,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -192,7 +194,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -401,8 +406,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -433,14 +439,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -781,33 +789,24 @@ WARNING: untranslated string: grouptype WARNING: untranslated string: integrity WARNING: untranslated string: invalid input for dpd delay WARNING: untranslated string: invalid input for dpd timeout +WARNING: untranslated string: ipsec network WARNING: untranslated string: least preferred WARNING: untranslated string: lifetime WARNING: untranslated string: minute WARNING: untranslated string: most preferred -WARNING: untranslated string: new WARNING: untranslated string: notice WARNING: untranslated string: openvpn default WARNING: untranslated string: openvpn destination port used WARNING: untranslated string: openvpn fragment allowed with udp WARNING: untranslated string: openvpn mssfix allowed with udp +WARNING: untranslated string: openvpn network WARNING: untranslated string: openvpn prefix local subnet WARNING: untranslated string: openvpn prefix openvpn subnet WARNING: untranslated string: openvpn prefix remote subnet WARNING: untranslated string: openvpn subnet is used WARNING: untranslated string: other -WARNING: untranslated string: outgoing firewall add ip group -WARNING: untranslated string: outgoing firewall add mac group -WARNING: untranslated string: outgoing firewall edit ip group -WARNING: untranslated string: outgoing firewall edit mac group -WARNING: untranslated string: outgoing firewall group error -WARNING: untranslated string: outgoing firewall groups -WARNING: untranslated string: outgoing firewall ip groups -WARNING: untranslated string: outgoing firewall mac groups WARNING: untranslated string: outgoing firewall p2p allow WARNING: untranslated string: outgoing firewall p2p deny -WARNING: untranslated string: outgoing firewall reserved groupname -WARNING: untranslated string: outgoing firewall view group WARNING: untranslated string: ovpn errmsg green already pushed WARNING: untranslated string: ovpn errmsg invalid ip or mask WARNING: untranslated string: ovpn mtu-disc diff --git a/doc/language_issues.fr b/doc/language_issues.fr index 344c234..a6257e9 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -164,6 +165,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -192,7 +194,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -351,6 +356,14 @@ WARNING: translation string unused: or WARNING: translation string unused: original WARNING: translation string unused: other countries WARNING: translation string unused: out +WARNING: translation string unused: outgoing firewall add ip group +WARNING: translation string unused: outgoing firewall add mac group +WARNING: translation string unused: outgoing firewall edit ip group +WARNING: translation string unused: outgoing firewall edit mac group +WARNING: translation string unused: outgoing firewall group error +WARNING: translation string unused: outgoing firewall groups +WARNING: translation string unused: outgoing firewall ip groups +WARNING: translation string unused: outgoing firewall mac groups WARNING: translation string unused: outgoing firewall mode0 WARNING: translation string unused: outgoing firewall mode1 WARNING: translation string unused: outgoing firewall mode2 @@ -359,6 +372,7 @@ WARNING: translation string unused: outgoing firewall p2p description 1 WARNING: translation string unused: outgoing firewall p2p description 2 WARNING: translation string unused: outgoing firewall p2p description 3 WARNING: translation string unused: outgoing firewall reset +WARNING: translation string unused: outgoing firewall view group WARNING: translation string unused: outgoing firewall warning WARNING: translation string unused: override mtu WARNING: translation string unused: ovpn @@ -403,8 +417,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -435,14 +450,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -784,11 +801,11 @@ WARNING: untranslated string: grouptype WARNING: untranslated string: integrity WARNING: untranslated string: invalid input for dpd delay WARNING: untranslated string: invalid input for dpd timeout +WARNING: untranslated string: ipsec network WARNING: untranslated string: least preferred WARNING: untranslated string: lifetime WARNING: untranslated string: minute WARNING: untranslated string: most preferred -WARNING: untranslated string: new WARNING: untranslated string: notice WARNING: untranslated string: ntp common settings WARNING: untranslated string: ntp sync @@ -796,12 +813,12 @@ WARNING: untranslated string: openvpn default WARNING: untranslated string: openvpn destination port used WARNING: untranslated string: openvpn fragment allowed with udp WARNING: untranslated string: openvpn mssfix allowed with udp +WARNING: untranslated string: openvpn network WARNING: untranslated string: openvpn prefix local subnet WARNING: untranslated string: openvpn prefix openvpn subnet WARNING: untranslated string: openvpn prefix remote subnet WARNING: untranslated string: openvpn subnet is used WARNING: untranslated string: other -WARNING: untranslated string: outgoing firewall reserved groupname WARNING: untranslated string: ovpn mtu-disc WARNING: untranslated string: ovpn mtu-disc and mtu not 1500 WARNING: untranslated string: ovpn mtu-disc maybe diff --git a/doc/language_issues.nl b/doc/language_issues.nl index 44d92e5..1743071 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -166,6 +167,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -194,7 +196,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -356,6 +361,14 @@ WARNING: translation string unused: original WARNING: translation string unused: other countries WARNING: translation string unused: our donors WARNING: translation string unused: out +WARNING: translation string unused: outgoing firewall add ip group +WARNING: translation string unused: outgoing firewall add mac group +WARNING: translation string unused: outgoing firewall edit ip group +WARNING: translation string unused: outgoing firewall edit mac group +WARNING: translation string unused: outgoing firewall group error +WARNING: translation string unused: outgoing firewall groups +WARNING: translation string unused: outgoing firewall ip groups +WARNING: translation string unused: outgoing firewall mac groups WARNING: translation string unused: outgoing firewall mode0 WARNING: translation string unused: outgoing firewall mode1 WARNING: translation string unused: outgoing firewall mode2 @@ -364,6 +377,7 @@ WARNING: translation string unused: outgoing firewall p2p description 1 WARNING: translation string unused: outgoing firewall p2p description 2 WARNING: translation string unused: outgoing firewall p2p description 3 WARNING: translation string unused: outgoing firewall reset +WARNING: translation string unused: outgoing firewall view group WARNING: translation string unused: outgoing firewall warning WARNING: translation string unused: override mtu WARNING: translation string unused: ovpn @@ -408,8 +422,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -440,14 +455,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -730,12 +747,12 @@ WARNING: untranslated string: grouptype WARNING: untranslated string: integrity WARNING: untranslated string: invalid input for dpd delay WARNING: untranslated string: invalid input for dpd timeout +WARNING: untranslated string: ipsec network WARNING: untranslated string: least preferred WARNING: untranslated string: lifetime WARNING: untranslated string: most preferred -WARNING: untranslated string: new WARNING: untranslated string: notice -WARNING: untranslated string: outgoing firewall reserved groupname +WARNING: untranslated string: openvpn network WARNING: untranslated string: p2p block WARNING: untranslated string: p2p block save notice WARNING: untranslated string: qos enter bandwidths diff --git a/doc/language_issues.pl b/doc/language_issues.pl index d32c90a..9331ed2 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -164,6 +165,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -192,7 +194,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -401,8 +406,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -433,14 +439,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -781,33 +789,24 @@ WARNING: untranslated string: grouptype WARNING: untranslated string: integrity WARNING: untranslated string: invalid input for dpd delay WARNING: untranslated string: invalid input for dpd timeout +WARNING: untranslated string: ipsec network WARNING: untranslated string: least preferred WARNING: untranslated string: lifetime WARNING: untranslated string: minute WARNING: untranslated string: most preferred -WARNING: untranslated string: new WARNING: untranslated string: notice WARNING: untranslated string: openvpn default WARNING: untranslated string: openvpn destination port used WARNING: untranslated string: openvpn fragment allowed with udp WARNING: untranslated string: openvpn mssfix allowed with udp +WARNING: untranslated string: openvpn network WARNING: untranslated string: openvpn prefix local subnet WARNING: untranslated string: openvpn prefix openvpn subnet WARNING: untranslated string: openvpn prefix remote subnet WARNING: untranslated string: openvpn subnet is used WARNING: untranslated string: other -WARNING: untranslated string: outgoing firewall add ip group -WARNING: untranslated string: outgoing firewall add mac group -WARNING: untranslated string: outgoing firewall edit ip group -WARNING: untranslated string: outgoing firewall edit mac group -WARNING: untranslated string: outgoing firewall group error -WARNING: untranslated string: outgoing firewall groups -WARNING: untranslated string: outgoing firewall ip groups -WARNING: untranslated string: outgoing firewall mac groups WARNING: untranslated string: outgoing firewall p2p allow WARNING: untranslated string: outgoing firewall p2p deny -WARNING: untranslated string: outgoing firewall reserved groupname -WARNING: untranslated string: outgoing firewall view group WARNING: untranslated string: ovpn errmsg green already pushed WARNING: untranslated string: ovpn errmsg invalid ip or mask WARNING: untranslated string: ovpn mtu-disc diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 09c6930..6d533bf 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -163,6 +164,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -191,7 +193,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: filename WARNING: translation string unused: firewall graphs WARNING: translation string unused: firewall log viewer @@ -345,6 +350,14 @@ WARNING: translation string unused: or WARNING: translation string unused: original WARNING: translation string unused: other countries WARNING: translation string unused: out +WARNING: translation string unused: outgoing firewall add ip group +WARNING: translation string unused: outgoing firewall add mac group +WARNING: translation string unused: outgoing firewall edit ip group +WARNING: translation string unused: outgoing firewall edit mac group +WARNING: translation string unused: outgoing firewall group error +WARNING: translation string unused: outgoing firewall groups +WARNING: translation string unused: outgoing firewall ip groups +WARNING: translation string unused: outgoing firewall mac groups WARNING: translation string unused: outgoing firewall mode0 WARNING: translation string unused: outgoing firewall mode1 WARNING: translation string unused: outgoing firewall mode2 @@ -353,6 +366,7 @@ WARNING: translation string unused: outgoing firewall p2p description 1 WARNING: translation string unused: outgoing firewall p2p description 2 WARNING: translation string unused: outgoing firewall p2p description 3 WARNING: translation string unused: outgoing firewall reset +WARNING: translation string unused: outgoing firewall view group WARNING: translation string unused: outgoing firewall warning WARNING: translation string unused: override mtu WARNING: translation string unused: ovpn @@ -397,8 +411,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -429,14 +444,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -768,22 +785,22 @@ WARNING: untranslated string: incoming traffic in bytes per second WARNING: untranslated string: integrity WARNING: untranslated string: invalid input for dpd delay WARNING: untranslated string: invalid input for dpd timeout +WARNING: untranslated string: ipsec network WARNING: untranslated string: least preferred WARNING: untranslated string: lifetime WARNING: untranslated string: minute WARNING: untranslated string: most preferred -WARNING: untranslated string: new WARNING: untranslated string: notice WARNING: untranslated string: openvpn default WARNING: untranslated string: openvpn destination port used WARNING: untranslated string: openvpn fragment allowed with udp WARNING: untranslated string: openvpn mssfix allowed with udp +WARNING: untranslated string: openvpn network WARNING: untranslated string: openvpn prefix local subnet WARNING: untranslated string: openvpn prefix openvpn subnet WARNING: untranslated string: openvpn prefix remote subnet WARNING: untranslated string: openvpn subnet is used WARNING: untranslated string: other -WARNING: untranslated string: outgoing firewall reserved groupname WARNING: untranslated string: outgoing traffic in bytes per second WARNING: untranslated string: ovpn mtu-disc WARNING: untranslated string: ovpn mtu-disc and mtu not 1500 diff --git a/doc/language_issues.tr b/doc/language_issues.tr index 07ee128..72cbae2 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -13,6 +13,7 @@ WARNING: translation string unused: TOS Bits WARNING: translation string unused: Verbose WARNING: translation string unused: access allowed WARNING: translation string unused: access refused with this oinkcode +WARNING: translation string unused: add a new rule WARNING: translation string unused: add network WARNING: translation string unused: add new ovpn WARNING: translation string unused: add service @@ -171,6 +172,7 @@ WARNING: translation string unused: dstprt within existing WARNING: translation string unused: dynamic dns client WARNING: translation string unused: eciadsl help WARNING: translation string unused: eciadsl upload +WARNING: translation string unused: edit a rule WARNING: translation string unused: edit network WARNING: translation string unused: edit service WARNING: translation string unused: editor @@ -199,7 +201,10 @@ WARNING: translation string unused: esp keylife WARNING: translation string unused: expected WARNING: translation string unused: expertoptions WARNING: translation string unused: exportkey +WARNING: translation string unused: external access configuration +WARNING: translation string unused: external access rule added WARNING: translation string unused: external access rule changed +WARNING: translation string unused: external access rule removed WARNING: translation string unused: extrahd unable to read WARNING: translation string unused: extrahd unable to write WARNING: translation string unused: filename @@ -361,6 +366,14 @@ WARNING: translation string unused: original WARNING: translation string unused: other countries WARNING: translation string unused: our donors WARNING: translation string unused: out +WARNING: translation string unused: outgoing firewall add ip group +WARNING: translation string unused: outgoing firewall add mac group +WARNING: translation string unused: outgoing firewall edit ip group +WARNING: translation string unused: outgoing firewall edit mac group +WARNING: translation string unused: outgoing firewall group error +WARNING: translation string unused: outgoing firewall groups +WARNING: translation string unused: outgoing firewall ip groups +WARNING: translation string unused: outgoing firewall mac groups WARNING: translation string unused: outgoing firewall mode0 WARNING: translation string unused: outgoing firewall mode1 WARNING: translation string unused: outgoing firewall mode2 @@ -369,6 +382,7 @@ WARNING: translation string unused: outgoing firewall p2p description 1 WARNING: translation string unused: outgoing firewall p2p description 2 WARNING: translation string unused: outgoing firewall p2p description 3 WARNING: translation string unused: outgoing firewall reset +WARNING: translation string unused: outgoing firewall view group WARNING: translation string unused: outgoing firewall warning WARNING: translation string unused: override mtu WARNING: translation string unused: ovpn @@ -413,8 +427,9 @@ WARNING: translation string unused: proxy no proxy local WARNING: translation string unused: proxy port WARNING: translation string unused: psk WARNING: translation string unused: quick control +WARNING: translation string unused: reboot ask WARNING: translation string unused: reboot schedule -WARNING: translation string unused: rebooting +WARNING: translation string unused: reboot sure WARNING: translation string unused: refresh update list WARNING: translation string unused: released WARNING: translation string unused: removable device advice @@ -445,14 +460,16 @@ WARNING: translation string unused: shaping add options WARNING: translation string unused: shaping list options WARNING: translation string unused: show areas WARNING: translation string unused: show lines -WARNING: translation string unused: shutdown control +WARNING: translation string unused: shutdown ask +WARNING: translation string unused: shutdown sure WARNING: translation string unused: shutdown2 -WARNING: translation string unused: shutting down WARNING: translation string unused: sitekeyfile WARNING: translation string unused: smbreload +WARNING: translation string unused: source ip bad WARNING: translation string unused: source ip in use WARNING: translation string unused: source ip or net WARNING: translation string unused: source net +WARNING: translation string unused: source network WARNING: translation string unused: source port overlaps WARNING: translation string unused: squid extension methods WARNING: translation string unused: squid extension methods invalid @@ -736,12 +753,12 @@ WARNING: untranslated string: grouptype WARNING: untranslated string: integrity WARNING: untranslated string: invalid input for dpd delay WARNING: untranslated string: invalid input for dpd timeout +WARNING: untranslated string: ipsec network WARNING: untranslated string: least preferred WARNING: untranslated string: lifetime WARNING: untranslated string: most preferred -WARNING: untranslated string: new WARNING: untranslated string: notice -WARNING: untranslated string: outgoing firewall reserved groupname +WARNING: untranslated string: openvpn network WARNING: untranslated string: p2p block WARNING: untranslated string: p2p block save notice WARNING: untranslated string: red1 diff --git a/doc/language_missings b/doc/language_missings index 952e1e5..ed0edae 100644 --- a/doc/language_missings +++ b/doc/language_missings @@ -272,6 +272,7 @@ < integrity < invalid input for dpd delay < invalid input for dpd timeout +< ipsec network < least preferred < lifetime < minute @@ -285,6 +286,7 @@ < openvpn enabled < openvpn fragment allowed with udp < openvpn mssfix allowed with udp +< openvpn network < openvpn prefix local subnet < openvpn prefix openvpn subnet < openvpn prefix remote subnet @@ -694,6 +696,7 @@ < integrity < invalid input for dpd delay < invalid input for dpd timeout +< ipsec network < least preferred < lifetime < minute @@ -705,6 +708,7 @@ < openvpn enabled < openvpn fragment allowed with udp < openvpn mssfix allowed with udp +< openvpn network < openvpn prefix local subnet < openvpn prefix openvpn subnet < openvpn prefix remote subnet @@ -1100,6 +1104,7 @@ < integrity < invalid input for dpd delay < invalid input for dpd timeout +< ipsec network < least preferred < lifetime < minute @@ -1111,6 +1116,7 @@ < openvpn enabled < openvpn fragment allowed with udp < openvpn mssfix allowed with udp +< openvpn network < openvpn prefix local subnet < openvpn prefix openvpn subnet < openvpn prefix remote subnet @@ -1497,6 +1503,7 @@ < integrity < invalid input for dpd delay < invalid input for dpd timeout +< ipsec network < least preferred < lifetime < minute @@ -1509,6 +1516,7 @@ < openvpn enabled < openvpn fragment allowed with udp < openvpn mssfix allowed with udp +< openvpn network < openvpn prefix local subnet < openvpn prefix openvpn subnet < openvpn prefix remote subnet diff --git a/html/cgi-bin/aliases.cgi b/html/cgi-bin/aliases.cgi index 9043962..b87afdd 100644 --- a/html/cgi-bin/aliases.cgi +++ b/html/cgi-bin/aliases.cgi @@ -320,11 +320,11 @@ if ($netsettings{'SORT_ALIASES'} eq 'NAMERev') { # &Header::openbox('100%', 'left', $Lang::tr{'current aliases'}); print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td width='50%' align='center'><a href='$ENV{'SCRIPT_NAME'}?NAME'><b>$Lang::tr{'name'}</b></a> $sortarrow1</td> - <td width='45%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IP'><b>$Lang::tr{'alias ip'}</b></a> $sortarrow2</td> - <td width='5%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='50%' align='center'><a href='$ENV{'SCRIPT_NAME'}?NAME'><b>$Lang::tr{'name'}</b></a> $sortarrow1</th> + <th width='45%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IP'><b>$Lang::tr{'alias ip'}</b></a> $sortarrow2</th> + <th width='5%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -336,6 +336,7 @@ END #
my $key = 0; +my $col=""; foreach my $line (@current) { chomp($line); my @temp = split(/,/,$line); @@ -353,18 +354,21 @@ foreach my $line (@current) {
#Colorize each line if ($settings{'KEY1'} eq $key) { - print "<tr bgcolor='${Header::colouryellow}'>"; + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($key % 2) { - print "<tr bgcolor='${Header::table2colour}'>"; + print "<tr>"; + $col="bgcolor='${Header::table2colour}'"; } else { - print "<tr bgcolor='${Header::table1colour}'>"; + print "<tr>"; + $col="bgcolor='${Header::table1colour}'"; }
print <<END -<td align='center'>$temp[2]</td> -<td align='center'>$temp[0]</td> +<td align='center' $col>$temp[2]</td> +<td align='center' $col>$temp[0]</td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> @@ -372,7 +376,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> @@ -380,7 +384,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/connscheduler.cgi b/html/cgi-bin/connscheduler.cgi index b257adb..8f13b56 100644 --- a/html/cgi-bin/connscheduler.cgi +++ b/html/cgi-bin/connscheduler.cgi @@ -399,67 +399,67 @@ END
&Header::openbox('100%', 'left', $Lang::tr{'ConnSched scheduled actions'}); print <<END -<table width='100%' border='0' cellspacing='1' cellpadding='0'> +<table width='100%' cellspacing='1' cellpadding='0' class='tbl'> <tr> -<td align='center' width='10%'><b>$Lang::tr{'time'}</b></td> -<td width='15%'> </td> -<td align='center' width='60%'><b>$Lang::tr{'remark'}</b></td> -<td align='center' colspan='5' width='5%'><b>$Lang::tr{'action'}</b></td> +<th align='center' width='10%'><b>$Lang::tr{'time'}</b></th> +<th width='15%'> </th> +<th align='center' width='60%'><b>$Lang::tr{'remark'}</b></th> +<th align='center' colspan='5' width='5%'><b>$Lang::tr{'action'}</b></th> </tr> END ; - +my $col=""; for my $id ( 0 .. $#CONNSCHED::config ) { - my $trcolor; - if ( ($cgiparams{'ACTION'} eq 'edit') && ($id == $cgiparams{'ID'}) ) { - $trcolor = "<tr bgcolor='${Header::colouryellow}'>"; + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ( $id % 2 ) { - $trcolor = "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - $trcolor = "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; }
print <<END -$trcolor -<td align='center'>$CONNSCHED::config[$id]{'TIME'}</td> -<td>$Lang::tr{"ConnSched $CONNSCHED::config[$id]{'ACTION'}"} $CONNSCHED::config[$id]{'PROFILENR'}</td> -<td>$CONNSCHED::config[$id]{'COMMENT'}</td> -<td align='center'> +<td align='center' $col>$CONNSCHED::config[$id]{'TIME'}</td> +<td $col>$Lang::tr{"ConnSched $CONNSCHED::config[$id]{'ACTION'}"} $CONNSCHED::config[$id]{'PROFILENR'}</td> +<td $col>$CONNSCHED::config[$id]{'COMMENT'}</td> +<td align='center' $col> <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='toggle' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$CONNSCHED::config[$id]{'ACTIVE'}.gif' alt='$Lang::tr{'toggle enable disable'}' title='$Lang::tr{'toggle enable disable'}' /> <input type='hidden' name='ID' value='$id' /> </form> </td> -<td align='center'> +<td align='center' $col> <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='edit' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> <input type='hidden' name='ID' value='$id' /> </form> </td> -<td align='center'> +<td align='center' $col> <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='remove' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> <input type='hidden' name='ID' value='$id' /> </form> </td> -<td align='center'> +<td align='center' $col> <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='up' /> <input type='image' name='$Lang::tr{'ConnSched up'}' src='/images/up.gif' alt='$Lang::tr{'ConnSched up'}' title='$Lang::tr{'ConnSched up'}' /> <input type='hidden' name='ID' value='$id' /> </form> </td> -<td align='center'> +<td align='center' $col> <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='down' /> <input type='image' name='$Lang::tr{'ConnSched down'}' src='/images/down.gif' alt='$Lang::tr{'ConnSched down'}' title='$Lang::tr{'ConnSched down'}' /> @@ -467,9 +467,9 @@ $trcolor </form> </td> </tr> -$trcolor -<td> </td> -<td colspan='7'>$CONNSCHED::config[$id]{'DAYS'}$CONNSCHED::config[$id]{'WEEKDAYS_PR'} </td> +<tr> +<td $col> </td> +<td colspan='7' $col>$CONNSCHED::config[$id]{'DAYS'}$CONNSCHED::config[$id]{'WEEKDAYS_PR'} </td> </tr> END ; diff --git a/html/cgi-bin/country.cgi b/html/cgi-bin/country.cgi index 474d60c..476a680 100644 --- a/html/cgi-bin/country.cgi +++ b/html/cgi-bin/country.cgi @@ -40,14 +40,14 @@ require "${General::swroot}/header.pl"; &Header::openbigbox('100%', 'LEFT');
&Header::openbox('100%', 'LEFT', 'Flags & Country Codes:'); -print "<TABLE WIDTH='100%'>"; -print "<tr><td width='5%'><b>Flag</b></td>"; -print "<td width='5%'><b>Code</b></td>"; -print "<td width='40%'><b>Country</b></td>"; -print "<td><b> </b></td>"; -print "<td width='5%'><b>Flag</b></td>"; -print "<td width='5%'><b>Code</b></td>"; -print "<td width='40%'><b>Country</b></td></tr>"; +print "<TABLE WIDTH='100%' border='0' class='tbl'>"; +print "<tr><th width='5%'><b>Flag</b></th>"; +print "<th width='5%'><b>Code</b></th>"; +print "<th width='40%'><b>Country</b></th>"; +print "<th><b> </b></th>"; +print "<th width='5%'><b>Flag</b></th>"; +print "<th width='5%'><b>Code</b></th>"; +print "<th width='40%'><b>Country</b></th></tr>";
@flaglist = <$flagdir/*>;
@@ -57,35 +57,36 @@ foreach (@flaglist) { if (!-d) { push(@flaglistfiles,substr($_,rindex($_,"/")+1)); } } - +my $col=""; foreach $flag (@flaglistfiles) { $lines++; - - my $flagcode = uc(substr($flag, 0, 2)); - my $fcode = lc($flagcode); + + my $flagcode = uc(substr($flag, 0, 2)); + my $fcode = lc($flagcode); my $country = Locale::Country::code2country($fcode); - if($fcode eq 'eu') { $country = 'Europe'; } - if($fcode eq 'tp') { $country = 'East Timor'; } - if($fcode eq 'yu') { $country = 'Yugoslavia'; } - if ($lines % 2) { - print "<td><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>"; - print "<td>$flagcode</td>"; - print "<td>$country</td></tr>\n"; - } - else { + if($fcode eq 'eu') { $country = 'Europe'; } + if($fcode eq 'tp') { $country = 'East Timor'; } + if($fcode eq 'yu') { $country = 'Yugoslavia'; } + if ($lines % 2) { + print "<td $col><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>"; + print "<td $col>$flagcode</td>"; + print "<td $col>$country</td></tr>\n"; +} +else { $lines2++; if($lines2 % 2) { - print "<tr bgcolor='${Header::table1colour}'>"; + print "<tr>"; + $col="bgcolor='${Header::table2colour}'"; } else { - print "<tr bgcolor='${Header::table2colour}'>"; + print "<tr>"; + $col="bgcolor='${Header::table1colour}'"; + } + print "<td $col><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>"; + print "<td $col>$flagcode</td>"; + print "<td $col>$country</td>"; + print "<td $col> </td>"; } - print "<td><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>"; - print "<td>$flagcode</td>"; - print "<td>$country</td>"; - #print "<td><img src='/blob.gif' alt='*' /></td>"; - print "<td> </td>"; - } }
diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index ae4de6c..fc9e15c 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -256,7 +256,6 @@ $checked{'SERVICE'}{'selfhost.de'} = ''; $checked{'SERVICE'}{'strato.com'} = ''; $checked{'SERVICE'}{'tzo.com'} = ''; $checked{'SERVICE'}{'zoneedit.com'} = ''; -$checked{'SERVICE'}{'udmedia.de'} = ''; $checked{'SERVICE'}{$settings{'SERVICE'}} = "selected='selected'";
$checked{'BEHINDROUTER'}{'RED_IP'} = ''; @@ -352,7 +351,6 @@ print <<END <option $checked{'SERVICE'}{'selfhost.de'}>selfhost.de</option> <option $checked{'SERVICE'}{'strato.com'}>strato.com</option> <!-- <option $checked{'SERVICE'}{'tzo.com'}>tzo.com</option> comment this service out until a working fix is developed --> - <option $checked{'SERVICE'}{'udmedia.de'}>udmedia.de</option> <option $checked{'SERVICE'}{'zoneedit.com'}>zoneedit.com</option> </select></td> <td width='20%' class='base'>$Lang::tr{'hostname'}: <img src='/blob.gif' alt='*' /></td> @@ -400,14 +398,14 @@ END # &Header::openbox('100%', 'left', $Lang::tr{'current hosts'}); print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td width='15%' align='center' class='boldbase'><b>$Lang::tr{'service'}</b></td> - <td width='25%' align='center' class='boldbase'><b>$Lang::tr{'hostname'}</b></td> - <td width='30%' align='center' class='boldbase'><b>$Lang::tr{'domain'}</b></td> - <td width='10%' align='center' class='boldbase'><b>$Lang::tr{'proxy'}</b></td> - <td width='10%' align='center' class='boldbase'><b>$Lang::tr{'wildcards'}</b></td> - <td width='10%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='15%' align='center' class='boldbase'><b>$Lang::tr{'service'}</b></th> + <th width='25%' align='center' class='boldbase'><b>$Lang::tr{'hostname'}</b></th> + <th width='30%' align='center' class='boldbase'><b>$Lang::tr{'domain'}</b></th> + <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'proxy'}</b></th> + <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'wildcards'}</b></th> + <th width='10%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -430,7 +428,7 @@ foreach my $line (@current) { $descproxy = $Lang::tr{'click to disable'}; } else { $gifproxy = 'off.gif'; - $descproxy = $Lang::tr{'click to enable'}; + $descproxy = $Lang::tr{'click to enable'}; }
my $gifwildcard=''; @@ -454,26 +452,30 @@ foreach my $line (@current) { $gif = 'off.gif'; $gdesc = $Lang::tr{'click to enable'}; } - + + my $col=""; #Colorize each line if ($settings{'KEY1'} eq $key) { - print "<tr bgcolor='${Header::colouryellow}'>"; + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($key % 2) { - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } - + #if a field is empty, replace it with a '---' to see colorized info! $temp[1] = '---' if (!$temp[1]); $temp[2] = '---' if (!$temp[2]);
print <<END -<td align='center'><a href='http://$temp[0]'>$temp[0]</a></td> -<td align='center'>$sync$temp[1]</td> -<td align='center'>$sync$temp[2]</td> +<td align='center' $col><a href='http://$temp[0]'>$temp[0]</a></td> +<td align='center' $col>$sync$temp[1]</td> +<td align='center' $col>$sync$temp[2]</td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gifproxy' alt='$descproxy' title='$descproxy' /> @@ -482,7 +484,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gifwildcard' alt='$descwildcard' title='$descwildcard' /> @@ -491,7 +493,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> @@ -500,7 +502,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> @@ -508,7 +510,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index cde6065..9157cac 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -864,15 +864,15 @@ END
print <<END <hr /> -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?FETHER'><b>$Lang::tr{'mac address'}</b></a></td> - <td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?FIPADDR'><b>$Lang::tr{'ip address'}</b></a></td> - <td width='15%' align='center'><b>$Lang::tr{'remark'}</b></td> - <td width='15%' class='boldbase' align='center'><b>next-server</b></td> - <td width='15%' class='boldbase' align='center'><b>filename</b></td> - <td width='15%' class='boldbase' align='center'><b>root path</b></td> - <td colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?FETHER'><b>$Lang::tr{'mac address'}</b></a></th> + <th width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?FIPADDR'><b>$Lang::tr{'ip address'}</b></a></th> + <th width='15%' align='center'><b>$Lang::tr{'remark'}</b></th> + <th width='15%' class='boldbase' align='center'><b>next-server</b></th> + <th width='15%' class='boldbase' align='center'><b>filename</b></th> + <th width='15%' class='boldbase' align='center'><b>root path</b></th> + <th colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -904,6 +904,7 @@ foreach my $line (@current2) { }
$key = 0; +my $col=""; foreach my $line (@current2) { my $gif = ''; my $gdesc = ''; @@ -919,11 +920,14 @@ foreach my $line (@current2) { }
if ($dhcpsettings{'KEY2'} eq $key) { - print "<tr bgcolor='${Header::colouryellow}'>"; + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($key % 2) { - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } my $TAG0 = ''; my $TAG1 = ''; @@ -943,14 +947,14 @@ foreach my $line (@current2) { }
print <<END -<td align='center'>$TAG2$temp[0]$TAG3</td> -<td align='center' $TAG4>$TAG0$temp[1]$TAG1</td> -<td align='center'>$temp[6] </td> -<td align='center'>$temp[3] </td> -<td align='center'>$temp[4] </td> -<td align='center'>$temp[5] </td> - -<td align='center'> +<td align='center' $col>$TAG2$temp[0]$TAG3</td> +<td align='center' $col $TAG4>$TAG0$temp[1]$TAG1</td> +<td align='center' $col>$temp[6] </td> +<td align='center' $col>$temp[3] </td> +<td align='center' $col>$temp[4] </td> +<td align='center' $col>$temp[5] </td> + +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}2' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> @@ -958,7 +962,7 @@ foreach my $line (@current2) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}2' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> @@ -966,7 +970,7 @@ foreach my $line (@current2) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}2' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi index 15d430c..1439828 100644 --- a/html/cgi-bin/dnsforward.cgi +++ b/html/cgi-bin/dnsforward.cgi @@ -252,12 +252,12 @@ print "</form>\n"; # &Header::openbox('100%', 'left', $Lang::tr{'dnsforward entries'}); print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td width='35%' class='boldbase' align='center'><b>$Lang::tr{'dnsforward zone'}</b></td> - <td width='30%' class='boldbase' align='center'><b>$Lang::tr{'dnsforward forward_server'}</b></td> - <td width='30%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></td> - <td width='5%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='35%' class='boldbase' align='center'><b>$Lang::tr{'dnsforward zone'}</b></th> + <th width='30%' class='boldbase' align='center'><b>$Lang::tr{'dnsforward forward_server'}</b></th> + <th width='30%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></th> + <th width='5%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -274,6 +274,7 @@ if($cgiparams{'ACTION'} ne '' or $changed ne 'no') # Re-read entries and highlight selected item for editing. # my $id = 0; +my $col=""; foreach my $line (@current) { $id++; @@ -285,11 +286,14 @@ foreach my $line (@current) my $toggle = ''; if($cgiparams{'ACTION'} eq $Lang::tr{'edit'} && $cgiparams{'ID'} eq $id) { - print "<tr bgcolor='${Header::colouryellow}'>\n"; } + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($id % 2) { - print "<tr bgcolor='$color{'color22'}'>\n"; } + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>\n"; } + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; }
if ($temp[0] eq 'on') { $gif='on.gif'; $toggle='off'; $gdesc=$Lang::tr{'click to disable'};} else { $gif='off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'}; } @@ -298,10 +302,10 @@ foreach my $line (@current) # Display edit page. # print <<END - <td align='center'>$temp[1]</td> - <td align='center'>$temp[2]</td> - <td align='center'>$temp[3]</td> - <td align='center'> + <td align='center' $col>$temp[1]</td> + <td align='center' $col>$temp[2]</td> + <td align='center' $col>$temp[3]</td> + <td align='center' $col> <form method='post' name='frma$id' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' title='$gdesc' alt='$gdesc' /> <input type='hidden' name='ID' value='$id' /> @@ -309,14 +313,14 @@ print <<END <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> </form> </td> - <td align='center'> + <td align='center' $col> <form method='post' name='frmb$id' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' title='$Lang::tr{'edit'}' alt='$Lang::tr{'edit'}' /> <input type='hidden' name='ID' value='$id' /> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> </form> </td> - <td align='center'> + <td align='center' $col> <form method='post' name='frmc$id' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' title='$Lang::tr{'remove'}' alt='$Lang::tr{'remove'}' /> <input type='hidden' name='ID' value='$id' /> diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index e7884ca..c17bfaf 100755 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -2303,7 +2303,7 @@ sub viewtablenew &General::readhasharray("$configccdhost", %ccdhost);
&Header::openbox('100%', 'left', $title); - print "<table width='100%' cellspacing='0' border='0'>"; + print "<table width='100%' cellspacing='0' class='tbl'>";
if (! -z $config) { my $count=0; diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index ae135ab..3b46677 100755 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1159,7 +1159,7 @@ sub addnet $fwhostsettings{'orgname'}=$fwhostsettings{'HOSTNAME'}; $fwhostsettings{'orgnetremark'}=$fwhostsettings{'NETREMARK'}; print<<END; - <table border='0' width='100%'> + <table border='0' width='100%' > <tr><td width='15%'>$Lang::tr{'name'}:</td><td><form method='post'><input type='TEXT' name='HOSTNAME' id='textbox1' value='$fwhostsettings{'HOSTNAME'}' $fwhostsettings{'BLK_HOST'} size='20'><script>document.getElementById('textbox1').focus()</script></td></tr> <tr><td>$Lang::tr{'fwhost netaddress'}:</td><td><input type='TEXT' name='IP' value='$fwhostsettings{'IP'}' $fwhostsettings{'BLK_IP'} size='20' maxlength='15'></td></tr> <tr><td>$Lang::tr{'netmask'}:</td><td><input type='TEXT' name='SUBNET' value='$fwhostsettings{'SUBNET'}' $fwhostsettings{'BLK_IP'} size='20' maxlength='15'></td></tr> @@ -1168,10 +1168,10 @@ sub addnet END if ($fwhostsettings{'ACTION'} eq 'editnet' || $fwhostsettings{'error'} eq 'on') { - print "<td colspan='6' align='right' ><input type='submit' value='$Lang::tr{'update'}' style='min-width:100px;'><input type='hidden' name='ACTION' value='updatenet'><input type='hidden' name='orgnetremark' value='$fwhostsettings{'orgnetremark'}' ><input type='hidden' name='orgname' value='$fwhostsettings{'orgname'}' ><input type='hidden' name='update' value='on'><input type='hidden' name='newnet' value='$fwhostsettings{'newnet'}'></td>"; + print "<td colspan='6' align='right'><input type='submit' value='$Lang::tr{'update'}' style='min-width:100px;'><input type='hidden' name='ACTION' value='updatenet'><input type='hidden' name='orgnetremark' value='$fwhostsettings{'orgnetremark'}' ><input type='hidden' name='orgname' value='$fwhostsettings{'orgname'}' ><input type='hidden' name='update' value='on'><input type='hidden' name='newnet' value='$fwhostsettings{'newnet'}'>"; }else{ - print "<td colspan='6' align='right'><input type='submit' value='$Lang::tr{'save'}' style='min-width:100px;'/><input type='hidden' name='ACTION' value='savenet'><input type='hidden' name='newnet' value='on'>"; - } + print "<td colspan='6' align='right'><input type='submit' value='$Lang::tr{'save'}' style='min-width:100px;'><input type='hidden' name='ACTION' value='savenet'><input type='hidden' name='newnet' value='on'>"; + } print "</form><form method='post' style='display:inline'><input type='submit' value='$Lang::tr{'fwhost back'}' style='min-width:100px;' ><input type='hidden' name='ACTION' value='resetnet'></form></td></tr></table>"; &Header::closebox(); } @@ -1465,26 +1465,30 @@ sub viewtablenet print "<center><b>$Lang::tr{'fwhost empty'}</b>"; }else{ print<<END; - <table border='0' width='100%' cellspacing='0'> - <tr><td align='center'><b>$Lang::tr{'name'}</b></td><td align='center'><b>$Lang::tr{'fwhost netaddress'}</b></td><td align='center'><b>$Lang::tr{'remark'}</b></td><td align='center'><b>$Lang::tr{'used'}</b></td><td></td><td width='3%'></td></tr> + <table width='100%' cellspacing='0' class='tbl'> + <tr><th align='center'><b>$Lang::tr{'name'}</b></th><th align='center'><b>$Lang::tr{'fwhost netaddress'}</b></th><th align='center'><b>$Lang::tr{'remark'}</b></th><th align='center'><b>$Lang::tr{'used'}</b></th><th></th><th width='3%'></th></tr> END } my $count=0; + my $col=''; foreach my $key (sort {ncmp($a,$b)} keys %customnetwork) { if ($fwhostsettings{'ACTION'} eq 'editnet' && $fwhostsettings{'HOSTNAME'} eq $customnetwork{$key}[0]) { - print" <tr bgcolor='${Header::colouryellow}'>"; + print" <tr>"; + $col="bgcolor='${Header::colouryellow}'"; }elsif ($count % 2) { - print" <tr bgcolor='$color{'color22'}'>"; + $col="bgcolor='$color{'color20'}'"; + print" <tr>";# bgcolor='$color{'color20'}'>"; }else { - print" <tr bgcolor='$color{'color20'}'>"; + $col="bgcolor='$color{'color22'}'"; + print" <tr>";# bgcolor='$color{'color22'}'>"; } my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]); my $netcount=&getnetcount($customnetwork{$key}[0]); - print"<td width='20%'><form method='post'>$customnetwork{$key}[0]</td><td width='15%' align='center'>".&Header::colorize($colnet)."</td><td width='40%'>$customnetwork{$key}[3]</td><td align='center'>$netcount x</td>"; + print"<td width='20%' $col><form method='post'>$customnetwork{$key}[0]</td><td width='15%' align='center' $col>".&Header::colorize($colnet)."</td><td width='40%' $col>$customnetwork{$key}[3]</td><td align='center' $col>$netcount x</td>"; print<<END; - <td width='1%'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} /> + <td width='1%' $col><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} /> <input type='hidden' name='ACTION' value='editnet'> <input type='hidden' name='HOSTNAME' value='$customnetwork{$key}[0]' /> <input type='hidden' name='IP' value='$customnetwork{$key}[1]' /> @@ -1494,9 +1498,9 @@ END END if($netcount == '0') { - print"<td width='1%'><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delnet' /><input type='hidden' name='key' value='$customnetwork{$key}[0]' /></td></form></tr>"; + print"<td width='1%' $col><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delnet' /><input type='hidden' name='key' value='$customnetwork{$key}[0]' /></td></form></tr>"; }else{ - print"<td></td></tr>"; + print"<td $col></td></tr>"; } $count++; } @@ -1569,23 +1573,30 @@ sub viewtablehost print "<center><b>$Lang::tr{'fwhost empty'}</b>"; }else{ print<<END; - <table border='0' width='100%' cellspacing='0'> - <tr><td align='center'><b>$Lang::tr{'name'}</b></td><td align='center'><b>$Lang::tr{'fwhost ip_mac'}</b></td><td align='center'><b>$Lang::tr{'remark'}</b></td><td align='center'><b>$Lang::tr{'used'}</b></td><td></td><td width='3%'></td></tr> + <table width='100%' cellspacing='0' class='tbl'> + <tr><th align='center'><b>$Lang::tr{'name'}</b></th><th align='center'><b>$Lang::tr{'fwhost ip_mac'}</b></th><th align='center'><b>$Lang::tr{'remark'}</b></th><th align='center'><b>$Lang::tr{'used'}</b></th><th></th><th width='3%'></th></tr> END } my $count=0; + my $col=''; foreach my $key (sort { ncmp ($customhost{$a}[0],$customhost{$b}[0])} keys %customhost) { if ( ($fwhostsettings{'ACTION'} eq 'edithost' || $fwhostsettings{'error'}) && $fwhostsettings{'HOSTNAME'} eq $customhost{$key}[0]) { - print" <tr bgcolor='${Header::colouryellow}'>"; - }elsif ($count % 2){ print" <tr bgcolor='$color{'color22'}'>";} - else{ print" <tr bgcolor='$color{'color20'}'>";} + print" <tr>"; + $col="bgcolor='${Header::colouryellow}'"; + }elsif ($count % 2){ + print" <tr>"; + $col="bgcolor='$color{'color20'}'"; + }else{ + $col="bgcolor='$color{'color22'}'"; + print" <tr>"; + } my ($ip,$sub)=split(///,$customhost{$key}[2]); $customhost{$key}[4]=~s/\s+//g; my $hostcount=0; $hostcount=&gethostcount($customhost{$key}[0]); - print"<td width='20%'>$customhost{$key}[0]</td><td width='20%' align='center' ".&getcolor($ip).">".&Header::colorize($ip)."</td><td width='50%' align='left'>$customhost{$key}[3]</td><td align='center'>$hostcount x</td>"; + print"<td width='20%' $col>$customhost{$key}[0]</td><td width='20%' align='center' $col ".&getcolor($ip).">".&Header::colorize($ip)."</td><td width='50%' align='left' $col>$customhost{$key}[3]</td><td align='center' $col>$hostcount x</td>"; print<<END; - <td width='1%'><form method='post'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} /> + <td width='1%' $col><form method='post'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} /> <input type='hidden' name='ACTION' value='edithost' /> <input type='hidden' name='HOSTNAME' value='$customhost{$key}[0]' /> <input type='hidden' name='IP' value='$ip' /> @@ -1595,9 +1606,9 @@ END END if($hostcount == '0') { - print"<td width='1%'><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delhost' /><input type='hidden' name='key' value='$customhost{$key}[0]' /></td></form></tr>"; + print"<td width='1%' $col><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delhost' /><input type='hidden' name='key' value='$customhost{$key}[0]' /></td></form></tr>"; }else{ - print"<td width='1%'></td></tr>"; + print"<td width='1%' $col></td></tr>"; } $count++; } @@ -1656,30 +1667,36 @@ sub viewtablegrp print"<form method='post' style='display:inline'><input type='image' src='/images/delete.gif' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} align='right' /><input type='hidden' name='grp_name' value='$grpname' ><input type='hidden' name='ACTION' value='delgrp'></form>"; } print"<form method='post' style='display:inline'><input type='image' src='/images/edit.gif' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} align='right' /><input type='hidden' name='grp_name' value='$grpname' ><input type='hidden' name='remark' value='$remark' ><input type='hidden' name='ACTION' value='editgrp'></form>"; - print"<table width='100%' style='border: 1px solid #CCCCCC;' rules='none' cellspacing='0'><tr><td align='center'><b>Name</b></td><td align='center'><b>$Lang::tr{'ip address'}</b></td><td align='center' width='25%'><b>$Lang::tr{'fwhost type'}</td><td></td></tr>"; + print"<table width='100%' cellspacing='0' class='tbl'><tr><th align='center'><b>Name</b></th><th align='center'><b>$Lang::tr{'ip address'}</b></th><th align='center' width='25%'><b>$Lang::tr{'fwhost type'}</th><th></th></tr>"; } - + my $col=''; if ( ($fwhostsettings{'ACTION'} eq 'editgrp' || $fwhostsettings{'update'} ne '') && $fwhostsettings{'grp_name'} eq $customgrp{$key}[0]) { - print" <tr bgcolor='${Header::colouryellow}'>"; + print" <tr>"; + $col="bgcolor='${Header::colouryellow}'"; }elsif ($count %2 == 0){ - print"<tr bgcolor='$color{'color22'}'>"; + print"<tr>"; + $col="bgcolor='$color{'color22'}'"; }else{ - print"<tr bgcolor='$color{'color20'}'>"; + print"<tr>"; + $col="bgcolor='$color{'color20'}'"; } my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]); - if ($ip eq ''){print"<tr bgcolor='${Header::colouryellow}'>";} - print "<td width='39%' align='left'>"; + if ($ip eq ''){ + print"<tr>"; + $col="bgcolor='${Header::colouryellow}'"; + } + print "<td width='39%' align='left' $col>"; if($customgrp{$key}[3] eq 'Standard Network'){ print &get_name($customgrp{$key}[2])."</td>"; }else{ print "$customgrp{$key}[2]</td>"; } if ($ip eq '' && $customgrp{$key}[2] ne $Lang::tr{'fwhost err emptytable'}){ - print "<td align='center'>$Lang::tr{'fwhost deleted'}</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>"; + print "<td align='center' $col>$Lang::tr{'fwhost deleted'}</td><td align='center' $col>$customgrp{$key}[3]</td><td width='1%' $col><form method='post'>"; }else{ my ($colip,$colsub) = split("/",$ip); $ip="$colip/".&General::subtocidr($colsub) if ($colsub); - print"<td align='center' ".&getcolor($colip).">".&Header::colorize($ip)."</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>"; + print"<td align='center' $col ".&getcolor($colip).">".&Header::colorize($ip)."</td><td align='center' $col>$customgrp{$key}[3]</td><td width='1%' $col><form method='post'>"; } if ($delflag > 1 && $ip ne ''){ print"<input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} />"; @@ -1708,25 +1725,33 @@ sub viewtableservice &General::readhasharray("$fwconfiginp", %fwinp); &General::readhasharray("$fwconfigout", %fwout); print<<END; - <table width='100%' border='0' cellspacing='0'> - <tr><td align='center'><b>$Lang::tr{'fwhost srv_name'}</b></td><td align='center'><b>$Lang::tr{'fwhost prot'}</b></td><td align='center'><b>$Lang::tr{'fwhost port'}</b></td><td align='center'><b>ICMP</b></td><td align='center'><b>$Lang::tr{'fwhost used'}</b></td><td></td><td width='3%'></td></tr> + <table width='100%' cellspacing='0' class='tbl'> + <tr><th align='center'><b>$Lang::tr{'fwhost srv_name'}</b></th><th align='center'><b>$Lang::tr{'fwhost prot'}</b></th><th align='center'><b>$Lang::tr{'fwhost port'}</b></th><th align='center'><b>ICMP</b></th><th align='center'><b>$Lang::tr{'fwhost used'}</b></th><th></th><th width='3%'></th></tr> END + my $col=''; foreach my $key (sort { ncmp($customservice{$a}[0],$customservice{$b}[0])} keys %customservice) { $count++; if ( ($fwhostsettings{'updatesrv'} eq 'on' || $fwhostsettings{'error'}) && $fwhostsettings{'SRV_NAME'} eq $customservice{$key}[0]) { - print" <tr bgcolor='${Header::colouryellow}'>"; - }elsif ($count % 2){ print" <tr bgcolor='$color{'color22'}'>";}else{ print" <tr bgcolor='$color{'color20'}'>";} + print" <tr>"; + $col="bgcolor='${Header::colouryellow}'"; + }elsif ($count % 2){ + print" <tr>"; + $col="bgcolor='$color{'color22'}'"; + }else{ + print" <tr>"; + $col="bgcolor='$color{'color20'}'"; + } print<<END; - <td>$customservice{$key}[0]</td><td align='center'>$customservice{$key}[2]</td><td align='center'>$customservice{$key}[1]</td><td align='center'> + <td $col>$customservice{$key}[0]</td><td align='center' $col>$customservice{$key}[2]</td><td align='center' $col>$customservice{$key}[1]</td><td align='center' $col> END #Neuer count $srvcount=&getsrvcount($customservice{$key}[0]); if($customservice{$key}[3] eq 'All ICMP-Types'){print $Lang::tr{'fwdfw all icmp'};} elsif($customservice{$key}[3] ne 'BLANK'){print $customservice{$key}[3];} print<<END; - </td><td align='center'>$srvcount x</td> - <td width='1%'><form method='post'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} /><input type='hidden' name='ACTION' value='editservice' /> + </td><td align='center' $col>$srvcount x</td> + <td width='1%' $col><form method='post'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} /><input type='hidden' name='ACTION' value='editservice' /> <input type='hidden' name='SRV_NAME' value='$customservice{$key}[0]' /> <input type='hidden' name='SRV_PORT' value='$customservice{$key}[1]' /> <input type='hidden' name='PROT' value='$customservice{$key}[2]' /> @@ -1734,9 +1759,9 @@ END END if ($srvcount eq '0') { - print"<td width='1%'><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delservice' /><input type='hidden' name='SRV_NAME' value='$customservice{$key}[0]'></td></tr></form>"; + print"<td width='1%' $col><form method='post'><input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} /><input type='hidden' name='ACTION' value='delservice' /><input type='hidden' name='SRV_NAME' value='$customservice{$key}[0]'></td></tr></form>"; }else{ - print"<td></td></tr>"; + print"<td $col></td></tr>"; } } print"</table>"; @@ -1753,6 +1778,7 @@ sub viewtableservicegrp my $protocol; my $delflag; my $grpcount=0; + my $col=''; if (! -z $configsrvgrp){ &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust srvgrp'}); &General::readhasharray("$configsrvgrp", %customservicegrp); @@ -1792,14 +1818,17 @@ sub viewtableservicegrp print"<form method='post' style='display:inline'><input type='image' src='/images/delete.gif' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} align='right' /><input type='hidden' name='SRVGRP_NAME' value='$grpname' ><input type='hidden' name='ACTION' value='delservicegrp'></form>"; } print"<form method='post' style='display:inline'><input type='image' src='/images/edit.gif' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} align='right' /><input type='hidden' name='SRVGRP_NAME' value='$grpname' ><input type='hidden' name='SRVGRP_REMARK' value='$remark' ><input type='hidden' name='ACTION' value='editservicegrp'></form>"; - print"<table width='100%' style='border: 1px solid #CCCCCC;' rules='none' cellspacing='0'><tr><td align='center'><b>Name</b></td><td align='center'><b>$Lang::tr{'port'}</b></td><td align='center' width='25%'><b>$Lang::tr{'fwhost prot'}</td><td></td></tr>"; + print"<table width='100%' cellspacing='0' class='tbl'><tr><th align='center'><b>Name</b></th><th align='center'><b>$Lang::tr{'port'}</b></th><th align='center' width='25%'><b>$Lang::tr{'fwhost prot'}</th><th></th></tr>"; } if( $fwhostsettings{'SRVGRP_NAME'} eq $customservicegrp{$key}[0]) { - print" <tr bgcolor='${Header::colouryellow}'>"; + print"<tr>"; + $col="bgcolor='${Header::colouryellow}'"; }elsif ($count %2 == 0){ - print"<tr bgcolor='$color{'color22'}'>"; + print"<tr>"; + $col="bgcolor='$color{'color20'}'"; }else{ - print"<tr bgcolor='$color{'color20'}'>"; + print"<tr>"; + $col="bgcolor='$color{'color22'}'"; } #Set fields if we use protocols in servicegroups if ($customservicegrp{$key}[2] ne 'TCP' || $customservicegrp{$key}[2] ne 'UDP' || $customservicegrp{$key}[2] ne 'ICMP'){ @@ -1811,7 +1840,7 @@ sub viewtableservicegrp if ($customservicegrp{$key}[2] eq 'IGMP'){$protocol='IGMP';$customservicegrp{$key}[2]="$Lang::tr{'protocol'} IGMP";} if ($customservicegrp{$key}[2] eq 'IPIP'){$protocol='IPIP';$customservicegrp{$key}[2]="$Lang::tr{'protocol'} IPIP";} if ($customservicegrp{$key}[2] eq 'IPV6'){$protocol='IPV6';$customservicegrp{$key}[2]="$Lang::tr{'protocol'} IPv6 encapsulation";} - print "<td width='39%'>$customservicegrp{$key}[2]</td>"; + print "<td width='39%' $col>$customservicegrp{$key}[2]</td>"; foreach my $srv (sort keys %customservice){ if ($customservicegrp{$key}[2] eq $customservice{$srv}[0]){ $protocol=$customservice{$srv}[2]; @@ -1819,7 +1848,7 @@ sub viewtableservicegrp last; } } - print"<td align='center'>$port</td><td align='center'>$protocol</td><td width='1%'><form method='post'>"; + print"<td align='center' $col>$port</td><td align='center' $col>$protocol</td><td width='1%' $col><form method='post'>"; if ($delflag gt '1'){ print"<input type='image' src='/images/delete.gif' align='middle' alt=$Lang::tr{'delete'} title=$Lang::tr{'delete'} />"; } diff --git a/html/cgi-bin/hosts.cgi b/html/cgi-bin/hosts.cgi index 94a48d3..4eeeaf6 100644 --- a/html/cgi-bin/hosts.cgi +++ b/html/cgi-bin/hosts.cgi @@ -283,12 +283,12 @@ END # &Header::openbox('100%', 'left', $Lang::tr{'current hosts'}); print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IP'><b>$Lang::tr{'host ip'}</b></a></td> - <td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOST'><b>$Lang::tr{'hostname'}</b></a></td> - <td width='50%' align='center'><a href='$ENV{'SCRIPT_NAME'}?DOM'><b>$Lang::tr{'domain name'}</b></a></td> - <td width='10%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IP'><b>$Lang::tr{'host ip'}</b></a></th> + <th width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOST'><b>$Lang::tr{'hostname'}</b></a></th> + <th width='50%' align='center'><a href='$ENV{'SCRIPT_NAME'}?DOM'><b>$Lang::tr{'domain name'}</b></a></th> + <th width='10%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -296,7 +296,7 @@ END # # Print each line of @current list # - +my $col=""; my $key = 0; foreach my $line (@current) { chomp($line); # remove newline @@ -318,15 +318,17 @@ foreach my $line (@current) { if ($settings{'KEY1'} eq $key) { print "<tr bgcolor='${Header::colouryellow}'>"; } elsif ($key % 2) { - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } print <<END -<td align='center'>$temp[1]</td> -<td align='center'>$temp[2]</td> -<td align='center'>$temp[3]</td> -<td align='center'> +<td align='center' $col>$temp[1]</td> +<td align='center' $col>$temp[2]</td> +<td align='center' $col>$temp[3]</td> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> @@ -334,7 +336,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> @@ -342,7 +344,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index e37540b..5143e5e 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -40,6 +40,8 @@ my $warnmessage = ''; my $refresh = ""; my $ipaddr='';
+my $haveipsec=0; +my $haveovpn=0;
&Header::showhttpheaders();
@@ -60,9 +62,7 @@ my %mainsettings = (); my $connstate = &Header::connectionstatus();
if ( -e "/var/ipfire/main/gpl-accepted" ) { -if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'} || $cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) { - $refresh = "<meta http-equiv='refresh' content='300;'>"; -} elsif ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){ +if ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){ $refresh = "<meta http-equiv='refresh' content='5;'>"; } elsif ($connstate =~ /$Lang::tr{'dod waiting'}/ || -e "${General::swroot}/main/refreshindex") { $refresh = "<meta http-equiv='refresh' content='30;'>"; @@ -138,7 +138,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'yes'} && $cgiparams{'gpl_accepted'} eq '1 system('touch /var/ipfire/main/gpl_accepted') } if ( -e "/var/ipfire/main/gpl_accepted" ) { -&Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y")); +&Header::openbox('100%', 'center', '');
if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ )) { @@ -158,105 +158,57 @@ if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( print "$Lang::tr{'profile has errors'}\n </b></font>\n"; }
-#if ( $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) { -# $ipaddr = $netsettings{'RED_ADDRESS'}; -#} - -my $death = 0; -my $rebirth = 0; - -if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'}) { - $death = 1; - &General::log($Lang::tr{'shutting down ipfire'}); - system '/usr/local/bin/ipfirereboot down'; -} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) { - $rebirth = 1; - &General::log($Lang::tr{'rebooting ipfire'}); - system '/usr/local/bin/ipfirereboot boot'; -} - -if ($death == 0 && $rebirth == 0) { - -if ($mainsettings{'REBOOTQUESTION'} eq "off") { -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <table width='100%'> - <tr> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'reboot'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'shutdown'}' /></td> - </tr> - </table> - </form> -END -; -} else { - if ($cgiparams{'ACTION'} eq $Lang::tr{'reboot ask'}) { -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <table width='100%'> - <tr> - <td colspan="3" align='left'><font color="red">$Lang::tr{'reboot sure'}</font></td> - </tr> - <tr> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'reboot'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'shutdown ask'}' /></td> - </tr> - </table> - </form> -END -; - } elsif ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown ask'}) { -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <table width='100%'> - <tr> - <td colspan="3" align='right'><font color="red">$Lang::tr{'shutdown sure'}</font></td> - </tr> - <tr> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'reboot ask'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'shutdown'}' /></td> - </tr> - </table> - </form> -END -; - } else { -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <table width='100%'> - <tr> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'reboot ask'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}' /></td> - <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'shutdown ask'}' /></td> - </tr> - </table> - </form> -END -; - } -} print <<END; - - - <!-- Table of networks --> -<table border='0' width=80%> +<table width=80% class='tbl'> <tr> <th bgcolor='$color{'color20'}'>$Lang::tr{'network'}</th> - <th bgcolor='$color{'color20'}'>IP</th> + <th bgcolor='$color{'color20'}'>$Lang::tr{'ip address'}</th> <th bgcolor='$color{'color20'}'>$Lang::tr{'status'}</th></tr> <tr> <td align='center' bgcolor='$Header::colourred' width='25%'><a href="/cgi-bin/pppsetup.cgi"><font size='2' color='white'><b>$Lang::tr{'internet'}</b></font></a><br></td> <td width='30%' align='center'>$ipaddr </td> <td width='45%' align='center'>$connstate END + my $HOSTNAME = (gethostbyaddr(pack("C4", split(/./, $ipaddr)), 2))[0]; + if ( "$HOSTNAME" ne "" ) { + print <<END; + <tr><td><b>Hostname:</b><td align='center'>$HOSTNAME<td> +END + } + + if ( -e "/var/ipfire/red/remote-ipaddress" ) { + my $GATEWAY = `cat /var/ipfire/red/remote-ipaddress`; + chomp($GATEWAY); + print <<END; + <tr><td><b>Gateway:</b><td align='center'>$GATEWAY<td> +END + } + + my $DNS1 = `cat /var/ipfire/red/dns1`; + my $DNS2 = `cat /var/ipfire/red/dns2`; + chomp($DNS1); + chomp($DNS1); + + if ( $DNS1 ) { print <<END; + <tr><td><b>DNS-Server:</b><td align='center'>$DNS1 +END + } + if ( $DNS2 ) { print <<END; + <td align='center'>$DNS2 +END + } else { print <<END; + <td> </td> + </tr> + </table> +END + } + +#Dial profiles if ( $netsettings{'RED_TYPE'} ne "STATIC" && $netsettings{'RED_TYPE'} ne "DHCP" ){ print `/usr/local/bin/dialctrl.pl show`; print <<END; - </td></tr> - <tr><td colspan='2'> - +<br> + <table width='80%'> + <tr><td> <form method='post' action='$ENV{'SCRIPT_NAME'}'>$Lang::tr{'profile'}: <select name='PROFILE'> END @@ -287,90 +239,119 @@ END } else { print "$Lang::tr{'profile has errors'}\n </b></font>\n"; } + print"</tr></table>"; } - my $HOSTNAME = (gethostbyaddr(pack("C4", split(/./, $ipaddr)), 2))[0]; - if ( "$HOSTNAME" ne "" ) { - print <<END; - <tr><td><b>Hostname:</b><td align='center'>$HOSTNAME<td> -END - } - - if ( -e "/var/ipfire/red/remote-ipaddress" ) { - my $GATEWAY = `cat /var/ipfire/red/remote-ipaddress`; - chomp($GATEWAY); + if ( $netsettings{'GREEN_DEV'} ) { + my $sub=&General::iporsubtocidr($netsettings{'GREEN_NETMASK'}); print <<END; - <tr><td><b>Gateway:</b><td align='center'>$GATEWAY<td> -END - } - - my $DNS1 = `cat /var/ipfire/red/dns1`; - my $DNS2 = `cat /var/ipfire/red/dns2`; - chomp($DNS1); - chomp($DNS1); - - if ( $DNS1 ) { print <<END; - <tr><td><b>DNS-Server:</b><td align='center'>$DNS1 -END - } - if ( $DNS2 ) { print <<END; - <td align='center'>$DNS2 -END - } else { print <<END; - <td> -END - } - - if ( $netsettings{'GREEN_DEV'} ) { print <<END; + <br> + <table width='80%' class='tbl'> + <tr> + <th>$Lang::tr{'network'}</th> + <th>$Lang::tr{'ip address'}</th> + <th>$Lang::tr{'status'}</th> + </tr> <tr><td align='center' bgcolor='$Header::colourgreen' width='25%'><a href="/cgi-bin/dhcp.cgi"><font size='2' color='white'><b>$Lang::tr{'lan'}</b></font></a> - <td width='30%' align='center'>$netsettings{'GREEN_ADDRESS'} - <td width='45%' align='center'> + <td width='30%' align='center'>$netsettings{'GREEN_ADDRESS'}/$sub + <td width='45%' align='center'> END if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE=on` ) { print $Lang::tr{'advproxy on'}; if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT=on` ) { print " (transparent)"; } } else { print $Lang::tr{'advproxy off'}; } } - if ( $netsettings{'BLUE_DEV'} ) { print <<END; + if ( $netsettings{'BLUE_DEV'} ) { + my $sub=&General::iporsubtocidr($netsettings{'BLUE_NETMASK'}); + print <<END; <tr><td align='center' bgcolor='$Header::colourblue' width='25%'><a href="/cgi-bin/wireless.cgi"><font size='2' color='white'><b>$Lang::tr{'wireless'}</b></font></a><br> - <td width='30%' align='center'>$netsettings{'BLUE_ADDRESS'} - <td width='45%' align='center'> + <td width='30%' align='center'>$netsettings{'BLUE_ADDRESS'}/$sub + <td width='45%' align='center'> END if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE_BLUE=on` ) { print $Lang::tr{'advproxy on'}; if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT_BLUE=on` ) { print " (transparent)"; } } else { print $Lang::tr{'advproxy off'}; } } - if ( $netsettings{'ORANGE_DEV'} ) { print <<END; + if ( $netsettings{'ORANGE_DEV'} ) { + my $sub=&General::iporsubtocidr($netsettings{'ORANGE_NETMASK'}); + print <<END; <tr><td align='center' bgcolor='$Header::colourorange' width='25%'><a href="/cgi-bin/firewall.cgi"><font size='2' color='white'><b>$Lang::tr{'dmz'}</b></font></a><br> - <td width='30%' align='center'>$netsettings{'ORANGE_ADDRESS'} - <td width='45%' align='center'><font color=$Header::colourgreen>Online</font> + <td width='30%' align='center'>$netsettings{'ORANGE_ADDRESS'}/$sub + <td width='45%' align='center'><font color=$Header::colourgreen>Online</font> +END + } +#check if IPSEC is running +if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` || + `cat /var/ipfire/vpn/settings | grep ^ENABLED_BLUE=on` ) { + $haveipsec=1; + my $ipsecip = `cat /var/ipfire/vpn/settings | grep ^VPN_IP= | cut -c 8-`; +print<<END; + <tr><td align='center' bgcolor='$Header::colourvpn' width='25%'><a href="/cgi-bin/vpnmain.cgi"><font size='2' color='white'><b>$Lang::tr{'vpn'}</b></font></a><br> + <td width='30%' align='center'>$ipsecip + <td width='45%' align='center'><font color=$Header::colourgreen>Online</font> +END +} + +#check if OpenVPN is running +my %confighash=(); +&General::readhash("${General::swroot}/ovpn/settings", %confighash); + +if (($confighash{'ENABLED'} eq "on") || + ($confighash{'ENABLED_BLUE'} eq "on") || + ($confighash{'ENABLED_ORANGE'} eq "on")) { + my ($ovpnip,$sub) = split("/",$confighash{'DOVPN_SUBNET'}); + $sub=&General::iporsubtocidr($sub); + $ovpnip="$ovpnip/$sub"; + $haveovpn=1; +print <<END; + <tr> + <td align='center' bgcolor='$Header::colourovpn' width='25%'> + <a href="/cgi-bin/ovpnmain.cgi"><font size='2' color='white'><b>OpenVPN</b></font></a><br> + </td> + <td width='30%' align='center'>$ovpnip + <td width='45%' align='center'><font color=$Header::colourgreen>Online</font> END } - if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` || - `cat /var/ipfire/vpn/settings | grep ^ENABLED_BLUE=on` ) { +print"</td></tr></table>"; +&Header::closebox(); + +# Start of Box wich contains all vpn connections + &Header::openbox('100%', 'center', $Lang::tr{'vpn'}) if ($haveipsec || $haveovpn); + +#show ipsec connectiontable + if ( $haveipsec ) { my $ipsecip = `cat /var/ipfire/vpn/settings | grep ^VPN_IP= | cut -c 8-`; my @status = `/usr/local/bin/ipsecctrl I`; my %confighash = (); &General::readhasharray("${General::swroot}/vpn/config", %confighash); print <<END; - <tr><td align='center' bgcolor='$Header::colourvpn' width='25%'><a href="/cgi-bin/vpnmain.cgi"><font size='2' color='white'><b>$Lang::tr{'vpn'}</b></font></a><br> - <td width='30%' align='center'>$ipsecip - <td width='45%' align='center'><font color=$Header::colourgreen>Online</font> + <br> + <table width='80%' class='tbl'> + <tr> + <th>$Lang::tr{'ipsec network'}</th> + <th>$Lang::tr{'ip address'}</th> + <th>$Lang::tr{'status'}</th> + </tr> END my $id = 0; my $gif; + my $col=""; foreach my $key (sort { uc($confighash{$a}[1]) cmp uc($confighash{$b}[1]) } keys %confighash) { if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } - + my ($vpnip,$vpnsub) = split("/",$confighash{$key}[11]); + $vpnsub=&General::iporsubtocidr($vpnsub); + $vpnip="$vpnip/$vpnsub"; if ($id % 2) { - print "<tr><td align='left' nowrap='nowrap' bgcolor='$color{'color20'}'>$confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td><td align='center'>$confighash{$key}[11]</td>"; + $col="bgcolor='$color{'color20'}'"; + print "<tr><td align='left' nowrap='nowrap' bgcolor='$Header::colourvpn' width='50%'><font color=white>$confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td><td align='center' $col>$vpnip</td>"; } else { - print "<tr></td><td align='left' nowrap='nowrap' bgcolor='$color{'color22'}'>$confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td><td align='center'>$confighash{$key}[11]</td>"; + $col="bgcolor='$color{'color22'}'"; + print "<tr></td><td align='left' nowrap='nowrap' bgcolor='$Header::colourvpn' width='50%'><font color=white>$confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td><td align='center' $col>$vpnip</td>"; } - my $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourred}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>"; + my $active = "<td bgcolor='${Header::colourred}' width='15%' align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td>"; if ($confighash{$key}[0] eq 'off') { - $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourblue}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>"; + $active = "<td bgcolor='${Header::colourblue}' width='15%' align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td>"; } else { foreach my $line (@status) { if (($line =~ /"$confighash{$key}[1]".*IPsec SA established/) || @@ -380,46 +361,38 @@ END } } } - print "<td align='center'>$active</td>"; + print "$active</td>"; } + print "</tr></table>"; }
### # Check if there is any OpenVPN connection configured. ###
-if ( -s "${General::swroot}/ovpn/ovpnconfig") - { +if ( $haveovpn ) +{ print <<END; - + <br> + <table width='80%' class='tbl'> <tr> - <td align='center' bgcolor='$Header::colourovpn' width='25%'> - <a href="/cgi-bin/ovpnmain.cgi"><font size='2' color='white'><b>OpenVPN</b></font></a><br> - </td> + <th>$Lang::tr{'openvpn network'}</th> + <th>$Lang::tr{'ip address'}</th> + <th>$Lang::tr{'status'}</th> END # Check if the OpenVPN server for Road Warrior Connections is running and display status information. my %confighash=();
&General::readhash("${General::swroot}/ovpn/settings", %confighash); - - if (($confighash{'ENABLED'} eq "on") || - ($confighash{'ENABLED_BLUE'} eq "on") || - ($confighash{'ENABLED_ORANGE'} eq "on")) { - - my $ovpnip = $confighash{'DOVPN_SUBNET'}; - print <<END; - <td width='30%' align='center'>$ovpnip - <td width='45%' align='center'><font color=$Header::colourgreen>Online</font> -END - - } - # Print the OpenVPN N2N connection status. if ( -d "${General::swroot}/ovpn/n2nconf") { my %confighash=();
&General::readhasharray("${General::swroot}/ovpn/ovpnconfig", %confighash); + my $lines; + my $col=""; foreach my $dkey (keys %confighash) { + $lines++; if (($confighash{$dkey}[3] eq 'net') && (-e "/var/run/$confighash{$dkey}[1]n2n.pid")) { my $tport = $confighash{$dkey}[22]; next if ($tport eq ''); @@ -437,16 +410,24 @@ END } else { $display = $tustate[1]; } - + if ($lines %2){ + $col="bgcolor='$color{'color20'}'"; + }else{ + $col="bgcolor='$color{'color22'}'"; + } + #make cidr from ip + my ($vpnip,$vpnsub) = split("/",$confighash{$dkey}[11]); + my $vpnsub=&General::iporsubtocidr($vpnsub); + my $vpnip="$vpnip/$vpnsub"; print <<END; <tr> - <td align='left' nowrap='nowrap' bgcolor='$color{'color22'}'> + <td align='left' nowrap='nowrap' bgcolor='$Header::colourovpn' width='50%'><font color=white> $confighash{$dkey}[1] </td> - <td align='center'> - $confighash{$dkey}[11] + <td align='center' $col> + $vpnip </td> - <td align='center' bgcolor='$display_colour'> + <td align='center' bgcolor='$display_colour' width='15%'> <b> <font color='#FFFFFF'> $display @@ -459,7 +440,7 @@ END } } } - +&Header::closebox(); # Fireinfo if ( ! -e "/var/ipfire/main/send_profile") { $warnmessage .= "<li><a style='color: white;' href='fireinfo.cgi'>$Lang::tr{'fireinfo please enable'}</a></li>"; @@ -534,28 +515,6 @@ END if ( -e "/var/run/need_reboot" ) { print "<br /><br /><font color='red'>$Lang::tr{'needreboot'}!</font>"; } -} else { - my $message=''; - if ($death) { - $message = $Lang::tr{'ipfire has now shutdown'}; - } else { - $message = $Lang::tr{'ipfire has now rebooted'}; - } - print <<END -<div align='center'> -<table width='100%' bgcolor='#ffffff'> -<tr><td align='center'> -<br /><br /><img src='/images/IPFire.png' /><br /><br /><br /> -</td></tr> -</table> -<br /> -<font size='6'>$message</font> -</div> -END -; - -} - &Header::closebox(); }
diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/firewalllog.dat index 466a3ce..f5a4e0f 100644 --- a/html/cgi-bin/logs.cgi/firewalllog.dat +++ b/html/cgi-bin/logs.cgi/firewalllog.dat @@ -308,16 +308,16 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } if ($lines != 0) { &oldernewer(); }
print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td align='center' class='boldbase'><b>$Lang::tr{'time'}</b></td> - <td align='center' class='boldbase'><b>$Lang::tr{'chain'}</b></td> - <td align='center' class='boldbase'><b>$Lang::tr{'iface'}</b></td> - <td align='center' class='boldbase'><b>$Lang::tr{'proto'}</b></td> - <td align='center' class='boldbase'><b>$Lang::tr{'source'}<br/>$Lang::tr{'destination'}</b></td> - <td align='center' class='boldbase'><b>$Lang::tr{'src port'}<br />$Lang::tr{'dst port'}</b></td> - <td align='center' class='boldbase'><b>Flag</b></td> - <td align='center' class='boldbase'><b>$Lang::tr{'mac address'}</b></td> + <th align='center' class='boldbase'><b>$Lang::tr{'time'}</b></th> + <th align='center' class='boldbase'><b>$Lang::tr{'chain'}</b></th> + <th align='center' class='boldbase'><b>$Lang::tr{'iface'}</b></th> + <th align='center' class='boldbase'><b>$Lang::tr{'proto'}</b></th> + <th align='center' class='boldbase'><b>$Lang::tr{'source'}<br/>$Lang::tr{'destination'}</b></th> + <th align='center' class='boldbase'><b>$Lang::tr{'src port'}<br />$Lang::tr{'dst port'}</b></th> + <th align='center' class='boldbase'><b>Flag</b></th> + <th align='center' class='boldbase'><b>$Lang::tr{'mac address'}</b></th> </tr> END ; @@ -353,26 +353,29 @@ foreach $_ (@log) $dstport = "$dstport($servi)";} my @mactemp = split(/:/,$macaddr); $macaddr = "$mactemp[6]:$mactemp[7]:$mactemp[8]:$mactemp[9]:$mactemp[10]:$mactemp[11]"; + my $col=""; if ($lines % 2) { - print "<tr bgcolor='$color{'color20'}'>\n"; } + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color22'}'>\n"; } + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } print <<END
- <td align='center'>$time</td> - <td align='center'>$comment</td> - <td align='center'>$iface</td> - <td align='center'>$proto</td> - <td align='center'><a href='/cgi-bin/ipinfo.cgi?ip=$srcaddr'>$srcaddr</a><br /><a href='/cgi-bin/ipinfo.cgi?ip=$dstaddr'>$dstaddr</a></td> - <td align='center'>$srcport<br/>$dstport</td> + <td align='center' $col>$time</td> + <td align='center' $col>$comment</td> + <td align='center' $col>$iface</td> + <td align='center' $col>$proto</td> + <td align='center' $col><a href='/cgi-bin/ipinfo.cgi?ip=$srcaddr'>$srcaddr</a><br /><a href='/cgi-bin/ipinfo.cgi?ip=$dstaddr'>$dstaddr</a></td> + <td align='center' $col>$srcport<br/>$dstport</td> END ; if ( $fcode ne "" ){ - print "<td align='center'><a href='../country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></td>";} + print "<td align='center' $col><a href='../country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></td>";} else { - print "<td align='center'></td>";} + print "<td align='center' $col></td>";} print <<END - <td align='center'>$macaddr</td> + <td align='center' $col>$macaddr</td> </tr> END ; diff --git a/html/cgi-bin/logs.cgi/firewalllogip.dat b/html/cgi-bin/logs.cgi/firewalllogip.dat index 3ec3f6d..2ae4c0d 100644 --- a/html/cgi-bin/logs.cgi/firewalllogip.dat +++ b/html/cgi-bin/logs.cgi/firewalllogip.dat @@ -403,13 +403,13 @@ if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { }
print <<END -<TABLE WIDTH='100%'> +<TABLE WIDTH='100%' class='tbl'> <TR> -<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'></TD> -<TD WIDTH='30%' ALIGN='CENTER' CLASS='boldbase'><B>IP</B></TD> -<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'><B>Flag</B></TD> -<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'><B>Count</B></TD> -<TD WIDTH='30%' ALIGN='CENTER' CLASS='boldbase'><B>Percent</B></TD> +<TH WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'></TH> +<TH WIDTH='30%' ALIGN='CENTER' CLASS='boldbase'><B>IP</B></TH> +<TH WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'><B>Flag</B></TH> +<TH WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'><B>Count</B></TH> +<TH WIDTH='30%' ALIGN='CENTER' CLASS='boldbase'><B>Percent</B></TH> </TR> END ; @@ -419,6 +419,7 @@ my $show=0;
my $s; my $percent; +my $col="";
for($s=0;$s<$lines;$s++) { @@ -426,45 +427,45 @@ for($s=0;$s<$lines;$s++) $percent = $value[$s] * 100 / $linesjc; $percent = sprintf("%.f", $percent); $total = $total + $value[$s]; - if ( ($color % 10) == 1 ){print "<TR BGCOLOR='$color{'color1'}'>\n";} - if ( ($color % 10) == 2 ){print "<TR BGCOLOR='$color{'color2'}'>\n";} - if ( ($color % 10) == 3 ){print "<TR BGCOLOR='$color{'color3'}'>\n";} - if ( ($color % 10) == 4 ){print "<TR BGCOLOR='$color{'color4'}'>\n";} - if ( ($color % 10) == 5 ){print "<TR BGCOLOR='$color{'color5'}'>\n";} - if ( ($color % 10) == 6 ){print "<TR BGCOLOR='$color{'color6'}'>\n";} - if ( ($color % 10) == 7 ){print "<TR BGCOLOR='$color{'color7'}'>\n";} - if ( ($color % 10) == 8 ){print "<TR BGCOLOR='$color{'color8'}'>\n";} - if ( ($color % 10) == 9 ){print "<TR BGCOLOR='$color{'color9'}'>\n";} - if ( ($color % 10) == 0 ){print "<TR BGCOLOR='$color{'color10'}'>\n";} + if ( ($color % 10) == 1 ){print "<TR>"; $col="BGCOLOR='$color{'color1'}'";} + if ( ($color % 10) == 2 ){print "<TR>"; $col="BGCOLOR='$color{'color2'}'";} + if ( ($color % 10) == 3 ){print "<TR>"; $col="BGCOLOR='$color{'color3'}'";} + if ( ($color % 10) == 4 ){print "<TR>"; $col="BGCOLOR='$color{'color4'}'";} + if ( ($color % 10) == 5 ){print "<TR>"; $col="BGCOLOR='$color{'color5'}'";} + if ( ($color % 10) == 6 ){print "<TR>"; $col="BGCOLOR='$color{'color6'}'";} + if ( ($color % 10) == 7 ){print "<TR>"; $col="BGCOLOR='$color{'color7'}'";} + if ( ($color % 10) == 8 ){print "<TR>"; $col="BGCOLOR='$color{'color8'}'";} + if ( ($color % 10) == 9 ){print "<TR>"; $col="BGCOLOR='$color{'color9'}'";} + if ( ($color % 10) == 0 ){print "<TR>"; $col="BGCOLOR='$color{'color10'}'";}
my $gi = Geo::IP::PurePerl->new(); my $ccode = $gi->country_code_by_name($key[$s]); my $fcode = lc($ccode);
$color++; - print "<TD ALIGN='CENTER'><form method='post' action='showrequestfromip.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='ip' value='$key[$s]'> <input type='submit' value='details'></form></TD>"; - print "<TD ALIGN='CENTER'><a href='/cgi-bin/ipinfo.cgi?ip=$key[$s]'>$key[$s]</a></TD>"; + print "<TD ALIGN='CENTER' $col><form method='post' action='showrequestfromip.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='ip' value='$key[$s]'> <input type='submit' value='details'></form></TD>"; + print "<TD ALIGN='CENTER' $col><a href='/cgi-bin/ipinfo.cgi?ip=$key[$s]'>$key[$s]</a></TD>"; if ( $fcode ne "" ){ - print "<TD ALIGN='CENTER'><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></TD>";} + print "<TD ALIGN='CENTER' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></TD>";} else { - print "<TD ALIGN='CENTER'></TD>";} - print "<TD ALIGN='CENTER'>$value[$s]</TD>"; - print "<TD ALIGN='CENTER'>$percent</TD>"; + print "<TD ALIGN='CENTER' $col></TD>";} + print "<TD ALIGN='CENTER' $col>$value[$s]</TD>"; + print "<TD ALIGN='CENTER' $col>$percent</TD>"; print "</TR>"; }
if($cgiparams{'otherspie'} == 2 ){} else{ -if ( ($color % 10) == 1 ){print "<TR BGCOLOR='$color{'color1'}'>\n";} -if ( ($color % 10) == 2 ){print "<TR BGCOLOR='$color{'color2'}'>\n";} -if ( ($color % 10) == 3 ){print "<TR BGCOLOR='$color{'color3'}'>\n";} -if ( ($color % 10) == 4 ){print "<TR BGCOLOR='$color{'color4'}'>\n";} -if ( ($color % 10) == 5 ){print "<TR BGCOLOR='$color{'color5'}'>\n";} -if ( ($color % 10) == 6 ){print "<TR BGCOLOR='$color{'color6'}'>\n";} -if ( ($color % 10) == 7 ){print "<TR BGCOLOR='$color{'color7'}'>\n";} -if ( ($color % 10) == 8 ){print "<TR BGCOLOR='$color{'color8'}'>\n";} -if ( ($color % 10) == 9 ){print "<TR BGCOLOR='$color{'color9'}'>\n";} -if ( ($color % 10) == 0 ){print "<TR BGCOLOR='$color{'color10'}'>\n";} +if ( ($color % 10) == 1 ){print "<TR>"; $col="BGCOLOR='$color{'color1'}'";} +if ( ($color % 10) == 2 ){print "<TR>"; $col="BGCOLOR='$color{'color2'}'";} +if ( ($color % 10) == 3 ){print "<TR>"; $col="BGCOLOR='$color{'color3'}'";} +if ( ($color % 10) == 4 ){print "<TR>"; $col="BGCOLOR='$color{'color4'}'";} +if ( ($color % 10) == 5 ){print "<TR>"; $col="BGCOLOR='$color{'color5'}'";} +if ( ($color % 10) == 6 ){print "<TR>"; $col="BGCOLOR='$color{'color6'}'";} +if ( ($color % 10) == 7 ){print "<TR>"; $col="BGCOLOR='$color{'color7'}'";} +if ( ($color % 10) == 8 ){print "<TR>"; $col="BGCOLOR='$color{'color8'}'";} +if ( ($color % 10) == 9 ){print "<TR>"; $col="BGCOLOR='$color{'color9'}'";} +if ( ($color % 10) == 0 ){print "<TR>"; $col="BGCOLOR='$color{'color10'}'";}
if ( $linesjc ne "0") { @@ -473,11 +474,11 @@ $dif = $linesjc - $total; $percent = $dif * 100 / $linesjc; $percent = sprintf("%.f", $percent); print <<END -<TD ALIGN='CENTER'></TD> -<TD ALIGN='CENTER'>$Lang::tr{'otherip'}</TD> -<TD ALIGN='CENTER'></TD> -<TD ALIGN='CENTER'>$dif</TD> -<TD ALIGN='CENTER'>$percent</TD> +<TD ALIGN='CENTER' $col></TD> +<TD ALIGN='CENTER' $col>$Lang::tr{'otherip'}</TD> +<TD ALIGN='CENTER' $col></TD> +<TD ALIGN='CENTER' $col>$dif</TD> +<TD ALIGN='CENTER' $col>$percent</TD> </TR> END ; diff --git a/html/cgi-bin/logs.cgi/firewalllogport.dat b/html/cgi-bin/logs.cgi/firewalllogport.dat index af9b852..3f93b17 100644 --- a/html/cgi-bin/logs.cgi/firewalllogport.dat +++ b/html/cgi-bin/logs.cgi/firewalllogport.dat @@ -406,12 +406,12 @@ if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { }
print <<END -<TABLE WIDTH='100%'> +<TABLE WIDTH='100%' CLASS='tbl'> <TR> -<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'></TD> -<TD WIDTH='33%' ALIGN='CENTER' CLASS='boldbase'><B>Port</B></TD> -<TD WIDTH='33%' ALIGN='CENTER' CLASS='boldbase'><B>Count</B></TD> -<TD WIDTH='33%' ALIGN='CENTER' CLASS='boldbase'><B>Percent</B></TD> +<TH WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'></TH> +<TH WIDTH='33%' ALIGN='CENTER' CLASS='boldbase'><B>Port</B></TH> +<TH WIDTH='33%' ALIGN='CENTER' CLASS='boldbase'><B>Count</B></TH> +<TH WIDTH='33%' ALIGN='CENTER' CLASS='boldbase'><B>Percent</B></TH> </TR> END ; @@ -421,43 +421,45 @@ my $show=0;
my $s; my $percent; +my $col=""; + for($s=0;$s<$lines;$s++) { $show++; $percent = $value[$s] * 100 / $linesjc; $percent = sprintf("%.f", $percent); $total = $total + $value[$s]; - if ( ($color % 10) == 1 ){print "<TR BGCOLOR='$color{'color1'}'>\n";} - if ( ($color % 10) == 2 ){print "<TR BGCOLOR='$color{'color2'}'>\n";} - if ( ($color % 10) == 3 ){print "<TR BGCOLOR='$color{'color3'}'>\n";} - if ( ($color % 10) == 4 ){print "<TR BGCOLOR='$color{'color4'}'>\n";} - if ( ($color % 10) == 5 ){print "<TR BGCOLOR='$color{'color5'}'>\n";} - if ( ($color % 10) == 6 ){print "<TR BGCOLOR='$color{'color6'}'>\n";} - if ( ($color % 10) == 7 ){print "<TR BGCOLOR='$color{'color7'}'>\n";} - if ( ($color % 10) == 8 ){print "<TR BGCOLOR='$color{'color8'}'>\n";} - if ( ($color % 10) == 9 ){print "<TR BGCOLOR='$color{'color9'}'>\n";} - if ( ($color % 10) == 0 ){print "<TR BGCOLOR='$color{'color10'}'>\n";} + if ( ($color % 10) == 1 ){print "<TR>"; $col="BGCOLOR='$color{'color1'}'";} + if ( ($color % 10) == 2 ){print "<TR>"; $col="BGCOLOR='$color{'color2'}'";} + if ( ($color % 10) == 3 ){print "<TR>"; $col="BGCOLOR='$color{'color3'}'";} + if ( ($color % 10) == 4 ){print "<TR>"; $col="BGCOLOR='$color{'color4'}'";} + if ( ($color % 10) == 5 ){print "<TR>"; $col="BGCOLOR='$color{'color5'}'";} + if ( ($color % 10) == 6 ){print "<TR>"; $col="BGCOLOR='$color{'color6'}'";} + if ( ($color % 10) == 7 ){print "<TR>"; $col="BGCOLOR='$color{'color7'}'";} + if ( ($color % 10) == 8 ){print "<TR>"; $col="BGCOLOR='$color{'color8'}'";} + if ( ($color % 10) == 9 ){print "<TR>"; $col="BGCOLOR='$color{'color9'}'";} + if ( ($color % 10) == 0 ){print "<TR>"; $col="BGCOLOR='$color{'color10'}'";}
$color++; - print "<TD ALIGN='CENTER'><form method='post' action='showrequestfromport.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='port' value='$key[$s]'> <input type='submit' value='details'></form></TD>"; - print "<TD ALIGN='CENTER'>$key[$s]</TD>"; - print "<TD ALIGN='CENTER'>$value[$s]</TD>"; - print "<TD ALIGN='CENTER'>$percent</TD>"; + print "<TD ALIGN='CENTER' $col><form method='post' action='showrequestfromport.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='port' value='$key[$s]'> <input type='submit' value='details'></form></TD>"; + print "<TD ALIGN='CENTER' $col>$key[$s]</TD>"; + print "<TD ALIGN='CENTER' $col>$value[$s]</TD>"; + print "<TD ALIGN='CENTER' $col>$percent</TD>"; print "</TR>"; }
if($cgiparams{'otherspie'} == 2 ){} else{ -if ( ($color % 10) == 1 ){print "<TR BGCOLOR='$color{'color1'}'>\n";} -if ( ($color % 10) == 2 ){print "<TR BGCOLOR='$color{'color2'}'>\n";} -if ( ($color % 10) == 3 ){print "<TR BGCOLOR='$color{'color3'}'>\n";} -if ( ($color % 10) == 4 ){print "<TR BGCOLOR='$color{'color4'}'>\n";} -if ( ($color % 10) == 5 ){print "<TR BGCOLOR='$color{'color5'}'>\n";} -if ( ($color % 10) == 6 ){print "<TR BGCOLOR='$color{'color6'}'>\n";} -if ( ($color % 10) == 7 ){print "<TR BGCOLOR='$color{'color7'}'>\n";} -if ( ($color % 10) == 8 ){print "<TR BGCOLOR='$color{'color8'}'>\n";} -if ( ($color % 10) == 9 ){print "<TR BGCOLOR='$color{'color9'}'>\n";} -if ( ($color % 10) == 0 ){print "<TR BGCOLOR='$color{'color10'}'>\n";} +if ( ($color % 10) == 1 ){print "<TR>"; $col="BGCOLOR='$color{'color1'}'";} +if ( ($color % 10) == 2 ){print "<TR>"; $col="BGCOLOR='$color{'color2'}'";} +if ( ($color % 10) == 3 ){print "<TR>"; $col="BGCOLOR='$color{'color3'}'";} +if ( ($color % 10) == 4 ){print "<TR>"; $col="BGCOLOR='$color{'color4'}'";} +if ( ($color % 10) == 5 ){print "<TR>"; $col="BGCOLOR='$color{'color5'}'";} +if ( ($color % 10) == 6 ){print "<TR>"; $col="BGCOLOR='$color{'color6'}'";} +if ( ($color % 10) == 7 ){print "<TR>"; $col="BGCOLOR='$color{'color7'}'";} +if ( ($color % 10) == 8 ){print "<TR>"; $col="BGCOLOR='$color{'color8'}'";} +if ( ($color % 10) == 9 ){print "<TR>"; $col="BGCOLOR='$color{'color9'}'";} +if ( ($color % 10) == 0 ){print "<TR>"; $col="BGCOLOR='$color{'color10'}'";}
if ( $linesjc ne "0") { @@ -466,10 +468,10 @@ $dif = $linesjc - $total; $percent = $dif * 100 / $linesjc; $percent = sprintf("%.f", $percent); print <<END -<TD ALIGN='CENTER'></TD> -<TD ALIGN='CENTER'>$Lang::tr{'otherport'}</TD> -<TD ALIGN='CENTER'>$dif</TD> -<TD ALIGN='CENTER'>$percent</TD> +<TD ALIGN='CENTER' $col></TD> +<TD ALIGN='CENTER' $col>$Lang::tr{'otherport'}</TD> +<TD ALIGN='CENTER' $col>$dif</TD> +<TD ALIGN='CENTER' $col>$percent</TD> </TR> END ; diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index e2d0244..dacd518 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -354,11 +354,11 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } if ($lines != 0) { &oldernewer(); }
print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> - <td width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></td> - <td width='10%' align='center' class='boldbase'><b>$Lang::tr{'section'}</b></td> - <td width='80%'> </td> + <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></th> + <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'section'}</b></th> + <th width='80%'> </th> </tr> END ; @@ -383,13 +383,15 @@ foreach $_ (@log) $data = substr ($data,80); #permit correct display in table cell $d .= ' ' . substr ($data,0,80); } - + my $col="";
if ($lines % 2) { - print "<tr bgcolor='$color{'color20'}'>"; } + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color22'}'>"; } - print "<td>$time<td>$sec<td>" .&Header::cleanhtml ("$d", 'y') . "</td></tr>\n"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } + print "<td $col>$time<td $col>$sec<td $col>" .&Header::cleanhtml ("$d", 'y') . "</td></tr>\n"; $lines++; } #print '</tt>'; diff --git a/html/cgi-bin/logs.cgi/proxylog.dat b/html/cgi-bin/logs.cgi/proxylog.dat index da86f89..a1a05b2 100644 --- a/html/cgi-bin/logs.cgi/proxylog.dat +++ b/html/cgi-bin/logs.cgi/proxylog.dat @@ -437,22 +437,25 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } print "<p><b>$Lang::tr{'web hits'} $daystr: $lines</b></p>"; if ($lines != 0) { &oldernewer(); } print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> -<td width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></td> -<td width='15%' align='center' class='boldbase'><b>$Lang::tr{'source ip'}</b></td> -<td width='12%' align='center' class='boldbase'><b>$Lang::tr{'advproxy NCSA username'}</b></td> -<td width='63%' align='center' class='boldbase'><b>$Lang::tr{'website'}</b></td> +<th width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></th> +<th width='15%' align='center' class='boldbase'><b>$Lang::tr{'source ip'}</b></th> +<th width='12%' align='center' class='boldbase'><b>$Lang::tr{'advproxy NCSA username'}</b></th> +<th width='63%' align='center' class='boldbase'><b>$Lang::tr{'website'}</b></th> </tr> END ; my $ll = 0; +my $col=''; foreach $_ (@log) { if ($ll % 2) { - print "<tr bgcolor='$color{'color20'}'>\n"; } + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>\n"; } + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } my ($datetime,$ip,$so,$url) = split; my ($SECdt, $MINdt, $HOURdt, $DAYdt, $MONTHdt, $YEARdt) = localtime($datetime); $SECdt = sprintf ("%.02d",$SECdt); @@ -470,10 +473,10 @@ foreach $_ (@log) $DAYdt=''; } print <<END - <td align='center'>$DAYdt$HOURdt:$MINdt:$SECdt</td> - <td align='center'>$ip</td> - <td align='center'>$so</td> - <td align='left'><a href='$url' title='$url' target='_new'>$part</a></td> + <td align='center' $col>$DAYdt$HOURdt:$MINdt:$SECdt</td> + <td align='center' $col>$ip</td> + <td align='center' $col>$so</td> + <td align='left' $col><a href='$url' title='$url' target='_new'>$part</a></td> </tr> END ; diff --git a/html/cgi-bin/logs.cgi/urlfilter.dat b/html/cgi-bin/logs.cgi/urlfilter.dat index 7fb2ff9..ce642e1 100644 --- a/html/cgi-bin/logs.cgi/urlfilter.dat +++ b/html/cgi-bin/logs.cgi/urlfilter.dat @@ -309,18 +309,19 @@ if ($lines)
$lines = 0;
- print "<table width='100%'>\n"; + print "<table width='100%' class='tbl'>"; unless ($cgiparams{'LOGTYPE'} eq 'squidGuard') { print "<tr>\n"; - print "<td align='center'><b>$Lang::tr{'urlfilter time'}</b></td>\n"; - print "<td align='center'><b>$Lang::tr{'urlfilter category'}</b></td>\n"; - print "<td align='center'><b>$Lang::tr{'urlfilter client'}</b></td>\n"; - if ($filtersettings{'ENABLE_USERNAME_LOG'} eq 'on') { print "<td align='center'><b>$Lang::tr{'urlfilter username'}</b></td>\n"; } - print "<td align='center'><b>$Lang::tr{'urlfilter dst'}</b></td>\n"; + print "<th align='center'><b>$Lang::tr{'urlfilter time'}</b></th>\n"; + print "<th align='center'><b>$Lang::tr{'urlfilter category'}</b></th>\n"; + print "<th align='center'><b>$Lang::tr{'urlfilter client'}</b></th>\n"; + if ($filtersettings{'ENABLE_USERNAME_LOG'} eq 'on') { print "<th align='center'><b>$Lang::tr{'urlfilter username'}</b></th>\n"; } + print "<th align='center'><b>$Lang::tr{'urlfilter dst'}</b></th>\n"; print "</tr>\n"; }
+ my $col=""; foreach (@slice) { undef $attr1; undef $attr2; @@ -336,17 +337,23 @@ if ($lines) if (@loginfo[2] =~ /emergency/) { $attr1 .= "<b><font color='$Header::colourerr'>"; $attr2 .= "</font></b>"; } print "<tr>\n"; } else { - if ($lines % 2) { print "<tr bgcolor='$color{'color20'}'>\n"; } else { print "<tr bgcolor='$color{'color22'}'>\n"; } + if ($lines % 2) { + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; + }else { + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; + } } if ($cgiparams{'LOGTYPE'} eq 'squidGuard') { - print "<td nowrap>$time $pid $attr1@loginfo$attr2</td>\n"; + print "<td nowrap $col>$time $pid $attr1@loginfo$attr2</td>\n"; } else { - print "<td width='10%' align='center' nowrap>$time</td>\n"; - print "<td width='11%' align='center' nowrap>$category[1]</td>\n"; - print "<td width='15%' align='center' nowrap>$ip[0]</td>\n"; + print "<td width='10%' align='center' nowrap $col>$time</td>\n"; + print "<td width='11%' align='center' nowrap $col>$category[1]</td>\n"; + print "<td width='15%' align='center' nowrap $col>$ip[0]</td>\n"; if ($filtersettings{'ENABLE_USERNAME_LOG'} eq 'on') { - print "<td width='12%' align='center' nowrap>$loginfo[3]</td>\n"; + print "<td width='12%' align='center' nowrap $col>$loginfo[3]</td>\n"; $site = substr($dsturl,0,55); if (length($dsturl) > 55) { $site .= "..."; } } else { @@ -354,7 +361,7 @@ if ($lines) if (length($dsturl) > 69) { $site .= "..."; } } #print "<td>$site</td>\n"; - print "<td><a href='$dsturl' title='$dsturl' target='_blank'>$site</a></td>\n"; + print "<td $col><a href='$dsturl' title='$dsturl' target='_blank'>$site</a></td>\n"; } print "</tr>\n"; } diff --git a/html/cgi-bin/outgoinggrp.cgi b/html/cgi-bin/outgoinggrp.cgi deleted file mode 100644 index 1c3d695..0000000 --- a/html/cgi-bin/outgoinggrp.cgi +++ /dev/null @@ -1,466 +0,0 @@ -#!/usr/bin/perl -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2005-2010 IPFire Team # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -use strict; -# enable only the following on debugging purpose -#use warnings; -#use CGI::Carp 'fatalsToBrowser'; - -require '/var/ipfire/general-functions.pl'; -require "${General::swroot}/lang.pl"; -require "${General::swroot}/header.pl"; - -my %outgrpsettings = (); -my %netsettings = (); -my %selected= () ; -my $errormessage = ""; - -my $configpath = "/var/ipfire/outgoing/groups/"; -my $servicefile = "/var/ipfire/outgoing/defaultservices"; - -my %color = (); -my %mainsettings = (); -&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); - -&General::readhash("${General::swroot}/ethernet/settings", %netsettings); - -&Header::showhttpheaders(); - -### Values that have to be initialized -$outgrpsettings{'ACTION'} = ''; -$outgrpsettings{'ipgroup'} = 'none'; -$outgrpsettings{'macgroup'} = 'none'; - -&Header::getcgihash(%outgrpsettings); -delete $outgrpsettings{'__CGI__'};delete $outgrpsettings{'x'};delete $outgrpsettings{'y'}; - -$selected{'ipgroup'}{$outgrpsettings{'ipgroup'}} = "selected='selected'"; -$selected{'macgroup'}{$outgrpsettings{'macgroup'}} = "selected='selected'"; - -&Header::openpage($Lang::tr{'outgoing firewall groups'}, 1, ''); -&Header::openbigbox('100%', 'left', '', $errormessage); - -############### -# DEBUG DEBUG -# &Header::openbox('100%', 'left', 'DEBUG'); -# my $debugCount = 0; -# foreach my $line (sort keys %outgrpsettings) { -# print "$line = $outgrpsettings{$line}<br />\n"; -# $debugCount++; -# } -# print "Count: $debugCount\n"; -# &Header::closebox(); -# DEBUG DEBUG -############### - -############################################################################################################################ -############################################################################################################################ - -if ($outgrpsettings{'ACTION'} eq 'newipgroup') -{ - &newipgroup(); -}elsif ($outgrpsettings{'ACTION'} eq 'editipgroup') -{ - &editipgroup(); -} elsif ($outgrpsettings{'ACTION'} eq 'deleteipgroup' ) { - unlink("$configpath/ipgroups/$outgrpsettings{'ipgroup'}"); -} elsif ($outgrpsettings{'ACTION'} eq 'addipgroup') { - - if ( -e "$configpath/macgroups/$outgrpsettings{'ipgroup'}" ){ - $errormessage = "$Lang::tr{'outgoing firewall group error'}"; - } elsif ( $outgrpsettings{'ipgroup'} =~ /\W/ ){ - $errormessage = $Lang::tr{'name must only contain characters'}." - ".$outgrpsettings{'ipgroup'}; - } elsif ( $outgrpsettings{'ipgroup'} eq "all" || $outgrpsettings{'ipgroup'} eq "red" || $outgrpsettings{'ipgroup'} eq "blue" || - $outgrpsettings{'ipgroup'} eq "green" || $outgrpsettings{'ipgroup'} eq "orange" || $outgrpsettings{'ipgroup'} eq "ip" || - $outgrpsettings{'ipgroup'} eq "mac" || $outgrpsettings{'ipgroup'} eq "ovpn" || $outgrpsettings{'ipgroup'} eq "ipsec" ) { - $errormessage = "$Lang::tr{'outgoing firewall reserved groupname'}"; - } else { - open (FILE, ">$configpath/ipgroups/$outgrpsettings{'ipgroup'}") or die "Can't save $outgrpsettings{'ipgroup'} settings $!"; - $outgrpsettings{'ipgroupcontent'} =~ s/\s*$//; - flock (FILE, 2); - print FILE $outgrpsettings{'ipgroupcontent'}."\n"; - close FILE; - } -} - -if ($outgrpsettings{'ACTION'} eq 'newmacgroup') -{ - &newmacgroup(); -}elsif ($outgrpsettings{'ACTION'} eq 'editmacgroup') -{ - &editmacgroup(); -}elsif ($outgrpsettings{'ACTION'} eq 'deletemacgroup' ) { - unlink("$configpath/macgroups/$outgrpsettings{'macgroup'}"); -} elsif ($outgrpsettings{'ACTION'} eq 'addmacgroup') { - - if ( -e "$configpath/ipgroups/$outgrpsettings{'macgroup'}" ){ - $errormessage = "$Lang::tr{'outgoing firewall group error'}"; - } elsif ( $outgrpsettings{'macgroup'} =~ /\W/ ){ - $errormessage = $Lang::tr{'name must only contain characters'}." - ".$outgrpsettings{'macgroup'}; - } elsif ( $outgrpsettings{'macgroup'} eq "all" || $outgrpsettings{'macgroup'} eq "red" || $outgrpsettings{'macgroup'} eq "blue" || - $outgrpsettings{'macgroup'} eq "green" || $outgrpsettings{'macgroup'} eq "orange" || $outgrpsettings{'macgroup'} eq "ip" || - $outgrpsettings{'macgroup'} eq "mac" || $outgrpsettings{'macgroup'} eq "ovpn" || $outgrpsettings{'macgroup'} eq "ipsec" ) { - $errormessage = "$Lang::tr{'outgoing firewall reserved groupname'}"; - } else { - open (FILE, ">$configpath/macgroups/$outgrpsettings{'macgroup'}") or die "Can't save $outgrpsettings{'macgroup'} settings $!"; - $outgrpsettings{'macgroupcontent'} =~ s/\s*$//; - flock (FILE, 2); - print FILE $outgrpsettings{'macgroupcontent'}."\n"; - close FILE; - } -} - -if ($errormessage) -{ - &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); - print "<class name='base'><font color=red>$errormessage\n</font>"; - print " </class>\n"; - &Header::closebox(); -} - -############################################################################################################################ -############################################################################################################################ - -my @ipgroups = qx(ls $configpath/ipgroups/); -if ($outgrpsettings{'ipgroup'} eq "none" and $#ipgroups >= 0 ){ $outgrpsettings{'ipgroup'} = $ipgroups[0];} - -my $ipgroupcontent = `cat $configpath/ipgroups/$outgrpsettings{'ipgroup'} 2>/dev/null`; -$ipgroupcontent =~ s/\n/<br />/g; - -&Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall ip groups'}); - -print <<END -<a name="outgoing showipgroup"></a> -<br /> -<form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing showipgroup'> -<table width='95%' cellspacing='0'> - <tr> - <td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'outgoing firewall ip groups'}</b></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td align='left' colspan='2'><select name='ipgroup' style="width: 200px"> -END -; -foreach my $member (@ipgroups) {chomp $member;print" <option value='$member' $selected{'ipgroup'}{$member}>$member</option>\n";} -print <<END - </select></td> - <td align='left'> - <input type='hidden' name='ACTION' value='showipgroup' /> - <input type='image' alt='$Lang::tr{'outgoing firewall view group'}' title='$Lang::tr{'outgoing firewall view group'}' src='/images/format-justify-fill.png' /> - </td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td colspan='3' align='left'><font size=1>$ipgroupcontent</font></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td colspan='3' align='center'><font size=1>$Lang::tr{'outgoing firewall ip groups'} - $outgrpsettings{'ipgroup'}</font></td> - </tr> -</table> -</form> -<table width='10%' cellspacing='0'> -<tr> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='editipgroup' /> - <input type='hidden' name='ipgroup' value='$outgrpsettings{'ipgroup'}' /> - <input type='image' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' src='/images/edit.gif' /> - </form> - </td> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='newipgroup' /> - <input type='image' alt='$Lang::tr{'new'}' title='$Lang::tr{'new'}' src='/images/list-add.png' /> - </form> - </td> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='saveipgroup' /> - <input type='hidden' name='ipgroup' value='$outgrpsettings{'ipgroup'}' /> - <input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/media-floppy.png' /> - </form> - </td> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='deleteipgroup' /> - <input type='hidden' name='ipgroup' value='$outgrpsettings{'ipgroup'}' /> - <input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/user-trash.png' /> - </form> - </td> -</tr> -</table> - -END -; -&Header::closebox(); - -############################################################################################################################ -############################################################################################################################ - -my @macgroups = qx(ls $configpath/macgroups/); -if ($outgrpsettings{'macgroup'} eq "none" and $#macgroups >= 0 ){ $outgrpsettings{'macgroup'} = $macgroups[0];} - -my $macgroupcontent = `cat $configpath/macgroups/$outgrpsettings{'macgroup'} 2>/dev/null`; -$macgroupcontent =~ s/\n/<br />/g; - -&Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall mac groups'}); - -print <<END -<a name="outgoing showmacgroup"></a> -<br /> -<form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing showmacgroup'> -<table width='95%' cellspacing='0'> - <tr> - <td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'outgoing firewall mac groups'}</b></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td align='left' colspan='2'><select name='macgroup' style="width: 200px"> -END -; -foreach my $member (@macgroups) {chomp $member;print" <option value='$member' $selected{'macgroup'}{$member}>$member</option>\n";} -print <<END - </select></td> - <td align='left'> - <input type='hidden' name='ACTION' value='showmacgroup' /> - <input type='image' alt='$Lang::tr{'outgoing firewall view group'}' title='$Lang::tr{'outgoing firewall view group'}' src='/images/format-justify-fill.png' /> - </td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td colspan='3' align='left'><font size=1>$macgroupcontent</font></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td colspan='3' align='center'><font size=1>$Lang::tr{'outgoing firewall mac groups'} - $outgrpsettings{'macgroup'}</font></td> - </tr> -</table> -</form> -<table width='10%' cellspacing='0'> -<tr> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='editmacgroup' /> - <input type='hidden' name='macgroup' value='$outgrpsettings{'macgroup'}' /> - <input type='image' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' src='/images/edit.gif' /> - </form> - </td> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='newmacgroup' /> - <input type='image' alt='$Lang::tr{'new'}' title='$Lang::tr{'new'}' src='/images/list-add.png' /> - </form> - </td> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='savemacgroup' /> - <input type='hidden' name='macgroup' value='$outgrpsettings{'macgroup'}' /> - <input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/media-floppy.png' /> - </form> - </td> - <td align='center'> - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='hidden' name='ACTION' value='deletemacgroup' /> - <input type='hidden' name='macgroup' value='$outgrpsettings{'macgroup'}' /> - <input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/user-trash.png' /> - </form> - </td> -</tr> -</table> - -END -; -&Header::closebox(); - -&Header::closebigbox(); -&Header::closepage(); - - -############################################################################################################################ -############################################################################################################################ - - -sub newipgroup -{ - &Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall add ip group'}); - -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing showipgroup'> - <table width='95%' cellspacing='0'> - <tr> - <td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'outgoing firewall add ip group'}</b></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td align='left' colspan='2'> - <input type='text' name='ipgroup' value='newipgroup' size="30" /> - </td> - <td align='left'> - <input type='hidden' name='ACTION' value='addipgroup' /> - <input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/media-floppy.png' /> - </td> - </tr> - <tr> - <td align='left' colspan='3'> - <textarea name="ipgroupcontent" cols="40" rows="5" Wrap="off">192.168.1.0/24\n192.168.3.0/255.255.255.0\n192.168.0.1\n192.168.0.2\n</textarea> - </td> - </tr> - </table> - </form> -END -; - &Header::closebox(); - &Header::closebigbox(); - &Header::closepage(); - exit 0; -} - -sub editipgroup -{ -my $ipgroupcontent = `cat $configpath/ipgroups/$outgrpsettings{'ipgroup'} 2>/dev/null`; - - &Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall edit ip group'}); - -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <table width='95%' cellspacing='0'> - <tr> - <td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'outgoing firewall edit ip group'}</b></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td align='left' colspan='2'> - <input type='text' name='ipgroup' value='$outgrpsettings{'ipgroup'}' size='30' readonly style='color:$color{'color20'}'/> - </td> - <td align='left'> - <input type='hidden' name='ACTION' value='addipgroup' /> - <input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/media-floppy.png' /> - </td> - </tr> - <tr> - <td align='left' colspan='3'> - <textarea name="ipgroupcontent" cols="40" rows="5" Wrap="off">$ipgroupcontent</textarea> - </td> - </tr> - </table> - </form> -END -; - &Header::closebox(); - &Header::closebigbox(); - &Header::closepage(); - exit 0; -} - -sub newmacgroup -{ - &Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall add mac group'}); - -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing showmacgroup'> - <table width='95%' cellspacing='0'> - <tr> - <td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'outgoing firewall add mac group'}</b></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td align='left' colspan='2'> - <input type='text' name='macgroup' value='newmacgroup' size="30" /> - </td> - <td align='left'> - <input type='hidden' name='ACTION' value='addmacgroup' /> - <input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/media-floppy.png' /> - </td> - </tr> - <tr> - <td align='left' colspan='3'> - <textarea name="macgroupcontent" cols="20" rows="5" Wrap="off">00:24:F6:04:5F:2b\n14:26:36:5A:5F:2B\n</textarea> - </td> - </tr> - </table> - </form> -END -; - &Header::closebox(); - &Header::closebigbox(); - &Header::closepage(); - exit 0; -} - -sub editmacgroup -{ -my $macgroupcontent = `cat $configpath/macgroups/$outgrpsettings{'macgroup'} 2>/dev/null`; - - &Header::openbox('100%', 'center', $Lang::tr{'outgoing firewall edit mac group'}); - -print <<END - <form method='post' action='$ENV{'SCRIPT_NAME'}#outgoing editmacgroup'> - <table width='95%' cellspacing='0'> - <tr> - <td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'outgoing firewall edit mac group'}</b></td> - </tr> - <tr> - <td colspan='3' align='left'><br /></td> - </tr> - <tr> - <td align='left' colspan='2'> - <input type='text' name='macgroup' value='$outgrpsettings{'macgroup'}' size='30' readonly style='color:$color{'color20'}'/> - </td> - <td align='left'> - <input type='hidden' name='ACTION' value='addmacgroup' /> - <input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/media-floppy.png' /> - </td> - </tr> - <tr> - <td align='left' colspan='3'> - <textarea name="macgroupcontent" cols="20" rows="5" Wrap="off">$macgroupcontent</textarea> - </td> - </tr> - </table> - </form> -END -; - &Header::closebox(); - &Header::closebigbox(); - &Header::closepage(); - exit 0; -} diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 52dc6e4..6516c45 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -69,6 +69,7 @@ my $confighost="${General::swroot}/fwhosts/customhosts"; my $configgrp="${General::swroot}/fwhosts/customgroups"; my $customnet="${General::swroot}/fwhosts/customnetworks"; my $name; +my $col=""; &General::readhash("${General::swroot}/ethernet/settings", %netsettings); $cgiparams{'ENABLED'} = 'off'; $cgiparams{'ENABLED_BLUE'} = 'off'; @@ -2571,7 +2572,7 @@ END } print <<END - <table width='100%' border='0' cellpadding='0' cellspacing='1'> + <table width='100%' cellpadding='0' cellspacing='1'> <tr> <td class='boldbase' align='center' nowrap='nowrap' width='20%'><b>$Lang::tr{'ccd name'}</td><td class='boldbase' align='center' width='8%'><b>$Lang::tr{'network'}</td><td class='boldbase' width='8%' align='center' nowrap='nowrap'><b>$Lang::tr{'ccd used'}</td><td width='1%' align='center'></td><td width='1%' align='center'></td></tr> END @@ -2625,15 +2626,15 @@ END # <td><b>$Lang::tr{'protocol'}</b></td> # protocol temp removed print <<END - <table width='100%' border='0' cellpadding='2' cellspacing='0'> + <table width='100%' cellpadding='2' cellspacing='0' class='tbl'> <tr> - <td><b>$Lang::tr{'common name'}</b></td> - <td><b>$Lang::tr{'real address'}</b></td> - <td><b>$Lang::tr{'virtual address'}</b></td> - <td><b>$Lang::tr{'loged in at'}</b></td> - <td><b>$Lang::tr{'bytes sent'}</b></td> - <td><b>$Lang::tr{'bytes received'}</b></td> - <td><b>$Lang::tr{'last activity'}</b></td> + <th><b>$Lang::tr{'common name'}</b></th> + <th><b>$Lang::tr{'real address'}</b></th> + <th><b>$Lang::tr{'virtual address'}</b></th> + <th><b>$Lang::tr{'loged in at'}</b></th> + <th><b>$Lang::tr{'bytes sent'}</b></th> + <th><b>$Lang::tr{'bytes received'}</b></th> + <th><b>$Lang::tr{'last activity'}</b></th> </tr> END ; @@ -2684,22 +2685,23 @@ END } my $user2 = @users; if ($user2 >= 1){ - for (my $idx = 1; $idx <= $user2; $idx++){ + for (my $idx = 1; $idx <= $user2; $idx++){ if ($idx % 2) { - print "<tr bgcolor='$color{'color20'}'>\n"; - } else { - print "<tr bgcolor='$color{'color22'}'>\n"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; + } else { + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } - print "<td align='left'>$users[$idx-1]{'CommonName'}</td>"; - print "<td align='left'>$users[$idx-1]{'RealAddress'}</td>"; - print "<td align='left'>$users[$idx-1]{'VirtualAddress'}</td>"; - print "<td align='left'>$users[$idx-1]{'Since'}</td>"; - print "<td align='left'>$users[$idx-1]{'BytesSent'}</td>"; - print "<td align='left'>$users[$idx-1]{'BytesReceived'}</td>"; - print "<td align='left'>$users[$idx-1]{'LastRef'}</td>"; -# print "<td align='left'>$users[$idx-1]{'Proto'}</td>"; - } - } + print "<td align='left' $col>$users[$idx-1]{'CommonName'}</td>"; + print "<td align='left' $col>$users[$idx-1]{'RealAddress'}</td>"; + print "<td align='left' $col>$users[$idx-1]{'VirtualAddress'}</td>"; + print "<td align='left' $col>$users[$idx-1]{'Since'}</td>"; + print "<td align='left' $col>$users[$idx-1]{'BytesSent'}</td>"; + print "<td align='left' $col>$users[$idx-1]{'BytesReceived'}</td>"; + print "<td align='left' $col>$users[$idx-1]{'LastRef'}</td>"; + } + } print "</table>"; print <<END @@ -4691,43 +4693,44 @@ END &Header::closebox(); &Header::openbox('100%', 'LEFT', "$Lang::tr{'certificate authorities'}:"); print <<EOF#' - <table width='100%' border='0' cellspacing='1' cellpadding='0'> + <table width='100%' cellspacing='1' cellpadding='0' class='tbl'> <tr> - <td width='25%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></td> - <td width='65%' class='boldbase' align='center'><b>$Lang::tr{'subject'}</b></td> - <td width='10%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='25%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></th> + <th width='65%' class='boldbase' align='center'><b>$Lang::tr{'subject'}</b></th> + <th width='10%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></th> </tr> EOF ; + my $col1="bgcolor='$color{'color22'}'"; + my $col2="bgcolor='$color{'color20'}'"; if (-f "${General::swroot}/ovpn/ca/cacert.pem") { my $casubject = `/usr/bin/openssl x509 -text -in ${General::swroot}/ovpn/ca/cacert.pem`; $casubject =~ /Subject: (.*)[\n]/; $casubject = $1; $casubject =~ s+/Email+, E+; $casubject =~ s/ ST=/ S=/; - print <<END - <tr bgcolor='$color{'color22'}'> - <td class='base'>$Lang::tr{'root certificate'}</td> - <td class='base'>$casubject</td> - <form method='post' name='frmrootcrta'><td width='3%' align='center'> + <tr> + <td class='base' $col1>$Lang::tr{'root certificate'}</td> + <td class='base' $col1>$casubject</td> + <form method='post' name='frmrootcrta'><td width='3%' align='center' $col1> <input type='hidden' name='ACTION' value='$Lang::tr{'show root certificate'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/info.gif' alt='$Lang::tr{'show root certificate'}' title='$Lang::tr{'show root certificate'}' width='20' height='20' border='0' /> </td></form> - <form method='post' name='frmrootcrtb'><td width='3%' align='center'> + <form method='post' name='frmrootcrtb'><td width='3%' align='center' $col1> <input type='image' name='$Lang::tr{'download root certificate'}' src='/images/media-floppy.png' alt='$Lang::tr{'download root certificate'}' title='$Lang::tr{'download root certificate'}' border='0' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download root certificate'}' /> </td></form> - <td width='4%'> </td></tr> + <td width='4%' $col1> </td></tr> END ; } else { # display rootcert generation buttons print <<END - <tr bgcolor='$color{'color22'}'> - <td class='base'>$Lang::tr{'root certificate'}:</td> - <td class='base'>$Lang::tr{'not present'}</td> - <td colspan='3'> </td></tr> + <tr> + <td class='base' $col1>$Lang::tr{'root certificate'}:</td> + <td class='base' $col1>$Lang::tr{'not present'}</td> + <td colspan='3' $col1> </td></tr> END ; } @@ -4740,27 +4743,27 @@ END $hostsubject =~ s/ ST=/ S=/;
print <<END - <tr bgcolor='$color{'color20'}'> - <td class='base'>$Lang::tr{'host certificate'}</td> - <td class='base'>$hostsubject</td> - <form method='post' name='frmhostcrta'><td width='3%' align='center'> + <tr> + <td class='base' $col2>$Lang::tr{'host certificate'}</td> + <td class='base' $col2>$hostsubject</td> + <form method='post' name='frmhostcrta'><td width='3%' align='center' $col2> <input type='hidden' name='ACTION' value='$Lang::tr{'show host certificate'}' /> <input type='image' name='$Lang::tr{'show host certificate'}' src='/images/info.gif' alt='$Lang::tr{'show host certificate'}' title='$Lang::tr{'show host certificate'}' width='20' height='20' border='0' /> </td></form> - <form method='post' name='frmhostcrtb'><td width='3%' align='center'> - <input type='image' name='$Lang::tr{'download host certificate'}' src='/images/media-floppy.png' alt='$Lang::tr{'download host certificate'}' title='$Lang::tr{'download host certificate'}' border='0' /> - <input type='hidden' name='ACTION' value='$Lang::tr{'download host certificate'}' /> + <form method='post' name='frmhostcrtb'><td width='3%' align='center' $col2> + <input type='image' name="$Lang::tr{'download host certificate'}" src='/images/media-floppy.png' alt="$Lang::tr{'download host certificate'}" title="$Lang::tr{'download host certificate'}" border='0' /> + <input type='hidden' name='ACTION' value="$Lang::tr{'download host certificate'}" /> </td></form> - <td width='4%'> </td></tr> + <td width='4%' $col2> </td></tr> END ; } else { # Nothing print <<END - <tr bgcolor='$color{'color20'}'> - <td width='25%' class='base'>$Lang::tr{'host certificate'}:</td> - <td class='base'>$Lang::tr{'not present'}</td> - </td><td colspan='3'> </td></tr> + <tr> + <td width='25%' class='base' $col2>$Lang::tr{'host certificate'}:</td> + <td class='base' $col2>$Lang::tr{'not present'}</td> + </td><td colspan='3' $col2> </td></tr> END ; } @@ -4847,28 +4850,30 @@ END print <<END
- <table width='100%' border='0' cellspacing='1' cellpadding='0'> + <table width='100%' cellspacing='1' cellpadding='0' class='tbl'> <tr> - <td width='10%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></td> - <td width='15%' class='boldbase' align='center'><b>$Lang::tr{'type'}</b></td> - <td width='22%' class='boldbase' align='center'><b>$Lang::tr{'network'}</b></td> - <td width='20%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></td> - <td width='10%' class='boldbase' align='center'><b>$Lang::tr{'status'}</b></td> - <td width='5%' class='boldbase' colspan='6' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='10%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></th> + <th width='15%' class='boldbase' align='center'><b>$Lang::tr{'type'}</b></th> + <th width='22%' class='boldbase' align='center'><b>$Lang::tr{'network'}</b></th> + <th width='20%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></th> + <th width='10%' class='boldbase' align='center'><b>$Lang::tr{'status'}</b></th> + <th width='5%' class='boldbase' colspan='6' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; - my $id = 0; - my $gif; - foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) { + my $id = 0; + my $gif; + foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) { if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } if ($id % 2) { - print "<tr bgcolor='$color{'color20'}'>\n"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color22'}'>\n"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } - print "<td align='center' nowrap='nowrap'>$confighash{$key}[1]</td>"; - print "<td align='center' nowrap='nowrap'>" . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td>"; + print "<td align='center' nowrap='nowrap' $col>$confighash{$key}[1]</td>"; + print "<td align='center' nowrap='nowrap' $col>" . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td>"; #if ($confighash{$key}[4] eq 'cert') { #print "<td align='left' nowrap='nowrap'>$confighash{$key}[2]</td>"; #} else { @@ -4879,8 +4884,8 @@ END $cavalid = $1; if ($confighash{$key}[32] eq "" && $confighash{$key}[3] eq 'net' ){$confighash{$key}[32]="net-2-net";} if ($confighash{$key}[32] eq "" && $confighash{$key}[3] eq 'host' ){$confighash{$key}[32]="dynamic";} - print "<td align='center'>$confighash{$key}[32]</td>"; - print "<td align='center'>$confighash{$key}[25]</td>"; + print "<td align='center' $col>$confighash{$key}[32]</td>"; + print "<td align='center' $col>$confighash{$key}[25]</td>";
my $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourred}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>";
@@ -4945,9 +4950,9 @@ END
print <<END - <td align='center'>$active</td> + <td align='center' $col>$active</td> - <form method='post' name='frm${key}a'><td align='center'> + <form method='post' name='frm${key}a'><td align='center' $col> <input type='image' name='$Lang::tr{'dl client arch'}' src='/images/openvpn.png' alt='$Lang::tr{'dl client arch'}' title='$Lang::tr{'dl client arch'}' border='0' /> <input type='hidden' name='ACTION' value='$Lang::tr{'dl client arch'}' /> <input type='hidden' name='KEY' value='$key' /> @@ -4956,7 +4961,7 @@ END ; if ($confighash{$key}[4] eq 'cert') { print <<END - <form method='post' name='frm${key}b'><td align='center'> + <form method='post' name='frm${key}b'><td align='center' $col> <input type='image' name='$Lang::tr{'show certificate'}' src='/images/info.gif' alt='$Lang::tr{'show certificate'}' title='$Lang::tr{'show certificate'}' border='0' /> <input type='hidden' name='ACTION' value='$Lang::tr{'show certificate'}' /> <input type='hidden' name='KEY' value='$key' /> @@ -4967,7 +4972,7 @@ END } if ($confighash{$key}[4] eq 'cert' && -f "${General::swroot}/ovpn/certs/$confighash{$key}[1].p12") { print <<END - <form method='post' name='frm${key}c'><td align='center'> + <form method='post' name='frm${key}c'><td align='center' $col> <input type='image' name='$Lang::tr{'download pkcs12 file'}' src='/images/media-floppy.png' alt='$Lang::tr{'download pkcs12 file'}' title='$Lang::tr{'download pkcs12 file'}' border='0' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download pkcs12 file'}' /> <input type='hidden' name='KEY' value='$key' /> @@ -4975,7 +4980,7 @@ END END ; } elsif ($confighash{$key}[4] eq 'cert') { print <<END - <form method='post' name='frm${key}c'><td align='center'> + <form method='post' name='frm${key}c'><td align='center' $col> <input type='image' name='$Lang::tr{'download certificate'}' src='/images/media-floppy.png' alt='$Lang::tr{'download certificate'}' title='$Lang::tr{'download certificate'}' border='0' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download certificate'}' /> <input type='hidden' name='KEY' value='$key' /> @@ -4985,18 +4990,18 @@ END print "<td> </td>"; } print <<END - <form method='post' name='frm${key}d'><td align='center'> + <form method='post' name='frm${key}d'><td align='center' $col> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$Lang::tr{'toggle enable disable'}' title='$Lang::tr{'toggle enable disable'}' border='0' /> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='hidden' name='KEY' value='$key' /> </td></form>
- <form method='post' name='frm${key}e'><td align='center'> + <form method='post' name='frm${key}e'><td align='center' $col> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' width='20' height='20' border='0'/> <input type='hidden' name='KEY' value='$key' /> </td></form> - <form method='post' name='frm${key}f'><td align='center'> + <form method='post' name='frm${key}f'><td align='center' $col> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' width='20' height='20' border='0' /> <input type='hidden' name='KEY' value='$key' /> diff --git a/html/cgi-bin/p2p-block.cgi b/html/cgi-bin/p2p-block.cgi index 6683ca8..5ed5874 100755 --- a/html/cgi-bin/p2p-block.cgi +++ b/html/cgi-bin/p2p-block.cgi @@ -86,17 +86,18 @@ close FILE;
&Header::openbox('100%', 'center', $Lang::tr{'p2p block'}); print <<END; - <table width='35%' border='0'> - <tr bgcolor='$color{'color22'}'> - <td align=center colspan='2' > + <table width='35%' class='tbl'> + <tr> + <th align=center colspan='2'bgcolor='$color{'color22'}' > <b>$Lang::tr{'protocol'}</b> - </td> - <td align='center'> + </th> + <th align='center'bgcolor='$color{'color22'}' > <b>$Lang::tr{'status'}</b> - </td> + </th> </tr> END - +my $lines=0; +my $col=""; foreach my $p2pentry (sort @p2ps) { my @p2pline = split( /;/, $p2pentry); if ($p2pline[2] eq 'on') { @@ -104,13 +105,17 @@ foreach my $p2pentry (sort @p2ps) { } else { $gif = "/images/off.gif" } - + if ($lines % 2) { + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } + else { + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } print <<END; - <tr bgcolor='$color{'color20'}'> - <td align='center' colspan='2'> + <td align='center' colspan='2' $col> $p2pline[0]: </td> - <td align='center'> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='P2PROT' value='$p2pline[1]'> <input type='image' img src='$gif' alt='$Lang::tr{'click to disable'}' title='$Lang::tr{'fwdfw toggle'}' style='padding-top: 0px; padding-left: 0px; padding-bottom: 0px ;padding-right: 0px ;display: block;'> @@ -119,9 +124,11 @@ foreach my $p2pentry (sort @p2ps) { </td> </tr> END +$lines++; }
print <<END; +</table><table> <tr> <td> <img src='/images/on.gif'> diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index 488705f..2a51760 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -257,13 +257,13 @@ END
&Header::openbox('100%', 'left', $Lang::tr{'routing table'}); print <<END -<hr /> -<table width='100%'> + +<table width='100%' class='tbl'> <tr> - <td width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IP'><b>$Lang::tr{'host ip'} / $Lang::tr{'network'}</b></a></td> - <td width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?GATEWAY'><b>$Lang::tr{'gateway'}</b></a></td> - <td width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?REMARK'><b>$Lang::tr{'remark'}</b></a></td> - <td width='10%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IP'><b>$Lang::tr{'host ip'} / $Lang::tr{'network'}</b></a></th> + <th width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?GATEWAY'><b>$Lang::tr{'gateway'}</b></a></th> + <th width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?REMARK'><b>$Lang::tr{'remark'}</b></a></th> + <th width='10%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -273,6 +273,7 @@ END #
my $key = 0; +my $col=""; foreach my $line (@current) { chomp($line); # remove newline my @temp=split(/,/,$line); @@ -294,15 +295,17 @@ foreach my $line (@current) { if ($settings{'KEY1'} eq $key) { print "<tr bgcolor='${Header::colouryellow}'>"; } elsif ($key % 2) { - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } print <<END -<td align='center'>$temp[1]</td> -<td align='center'>$temp[2]</td> -<td align='center'>$temp[3]</td> -<td align='center'> +<td align='center' $col>$temp[1]</td> +<td align='center' $col>$temp[2]</td> +<td align='center' $col>$temp[3]</td> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> @@ -310,7 +313,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> @@ -318,7 +321,7 @@ foreach my $line (@current) { </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 74f10bd..d48edf8 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -886,27 +886,33 @@ my %shares = config("${General::swroot}/samba/shares"); print <<END <a name="$Lang::tr{'manage shares'}"></a> <br /> -<table width='95%' cellspacing='0'> -<tr><td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'manage shares'}</b> -<tr><td align='left'><u>$Lang::tr{'sharename'}</u></td><td colspan='2' width="5%" align='center'><u>$Lang::tr{'options'}</u></td></tr> +<table width='95%' cellspacing='0' class='tbl'> +<tr><th bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'manage shares'}</b></th></tr> +<tr><th align='left'><u>$Lang::tr{'sharename'}</u></th><th colspan='2' width="5%" align='center'><u>$Lang::tr{'options'}</u></th></tr> END ;
my @Shares = keys(%shares); my $lines = 0; - +my $col=""; foreach my $shareentry (sort @Shares) { chomp $shareentry; - if ($lines % 2) {print "<tr bgcolor='$color{'color20'}'>";} else {print "<tr bgcolor='$color{'color22'}'>";} + if ($lines % 2) { + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; + } else { + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; + } print <<END - <td align='left'>$shareentry</td> - <td><form method='post' action='$ENV{'SCRIPT_NAME'}#$Lang::tr{'manage shares'}'> + <td align='left' $col>$shareentry</td> + <td $col><form method='post' action='$ENV{'SCRIPT_NAME'}#$Lang::tr{'manage shares'}'> <input type='hidden' name='NAME' value='$shareentry' /> <input type='hidden' name='ACTION' value='sharechange' /> <input type='image' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' src='/images/edit.gif' /> </form></td> - <td><form method='post' action='$ENV{'SCRIPT_NAME'}#$Lang::tr{'manage shares'}'> + <td $col><form method='post' action='$ENV{'SCRIPT_NAME'}#$Lang::tr{'manage shares'}'> <input type='hidden' name='NAME' value='$shareentry' /> <input type='hidden' name='ACTION' value='smbsharedel' /> <input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/user-trash.png' /> diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 131cad8..2b7ee75 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -116,25 +116,33 @@ if ( $querry[0] =~ "processescpu"){ &Header::openbox('100%', 'left', $Lang::tr{'services'}); print <<END <div align='center'> -<table width='80%' cellspacing='1' border='0'> -<tr bgcolor='$color{'color20'}'><td align='left'><b>$Lang::tr{'services'}</b></td><td align='center' ><b>$Lang::tr{'status'}</b></td><td align='center'><b>PID</b></td><td align='center'><b>$Lang::tr{'memory'}</b></td></tr> +<table width='80%' cellspacing='1' class='tbl'> +<tr bgcolor='$color{'color20'}'> + <th align='left'><b>$Lang::tr{'services'}</b></th> + <th align='center' ><b>$Lang::tr{'status'}</b></th> + <th align='center'><b>PID</b></th> + <th align='center'><b>$Lang::tr{'memory'}</b></th> +</tr> END ; my $key = ''; + my $col=""; foreach $key (sort keys %servicenames){ $lines++; if ($lines % 2){ - print "<tr bgcolor='$color{'color22'}'>\n<td align='left'>"; + $col="bgcolor='$color{'color22'}'"; + print "<tr><td align='left' $col>"; print $link{$key}; - print "</td>\n"; + print "</td>"; }else{ - print "<tr bgcolor='$color{'color20'}'>\n<td align='left'>"; + $col="bgcolor='$color{'color20'}'"; + print "<tr><td align='left' $col>"; print $link{$key}; - print "</td>\n"; + print "</td>"; }
my $shortname = $servicenames{$key}; - my $status = &isrunning($shortname); + my $status = &isrunning($shortname,$col);
print "$status\n"; print "</tr>\n"; @@ -152,14 +160,14 @@ END
print <<END <div align='center'> -<table width='80%' cellspacing='1' border='0'> +<table width='80%' cellspacing='1' class='tbl'> <tr bgcolor='$color{'color20'}'> -<td align='center'><b>Addon</b></td> -<td align='center'><b>Boot</b></td> -<td align='center' colspan=2><b>$Lang::tr{'action'}</b></td> -<td align='center'><b>$Lang::tr{'status'}</b></td> -<td align='center'><b>PID</b></td> -<td align='center'><b>$Lang::tr{'memory'}</b></td> + <th align='center'><b>Addon</b></th> + <th align='center'><b>Boot</b></th> + <th align='center' colspan=2><b>$Lang::tr{'action'}</b></th> + <th align='center'><b>$Lang::tr{'status'}</b></th> + <th align='center'><b>PID</b></th> + <th align='center'><b>$Lang::tr{'memory'}</b></th> </tr> END ; @@ -183,16 +191,18 @@ END if ( ($_ ne "alsa") && ($_ ne "mdadm") ) { $lines++; if ($lines % 2){ - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; }else{ - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } - print "<td align='left'>$_</td> "; - my $status = isautorun($_); + print "<td align='left' $col>$_</td> "; + my $status = isautorun($_,$col); print "$status "; - print "<td align='center'><A HREF=services.cgi?$_!start><img alt='$Lang::tr{'start'}' title='$Lang::tr{'start'}' src='/images/go-up.png' border='0' /></A></td>"; - print "<td align='center'><A HREF=services.cgi?$_!stop><img alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/go-down.png' border='0' /></A></td> "; - my $status = &isrunningaddon($_); + print "<td align='center' $col><A HREF=services.cgi?$_!start><img alt='$Lang::tr{'start'}' title='$Lang::tr{'start'}' src='/images/go-up.png' border='0' /></A></td>"; + print "<td align='center' $col><A HREF=services.cgi?$_!stop><img alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/go-down.png' border='0' /></A></td> "; + my $status = &isrunningaddon($_,$col); $status =~ s/\[[0-1];[0-9]+m//g;
chomp($status); @@ -219,16 +229,17 @@ END
sub isautorun{ my $cmd = $_[0]; - my $status = "<td align='center'></td>"; + my $col = $_[1]; + my $status = "<td align='center' $col></td>"; my $init = `find /etc/rc.d/rc3.d/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne ''){ - $status = "<td align='center'><A HREF=services.cgi?$_!disable><img alt='$Lang::tr{'deactivate'}' title='$Lang::tr{'deactivate'}' src='/images/on.gif' border='0' width='16' height='16' /></A></td>"; + $status = "<td align='center' $col><A HREF=services.cgi?$_!disable><img alt='$Lang::tr{'deactivate'}' title='$Lang::tr{'deactivate'}' src='/images/on.gif' border='0' width='16' height='16' /></A></td>"; } $init = `find /etc/rc.d/rc3.d/off/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne ''){ - $status = "<td align='center'><A HREF=services.cgi?$_!enable><img alt='$Lang::tr{'activate'}' title='$Lang::tr{'activate'}' src='/images/off.gif' border='0' width='16' height='16' /></A></td>"; + $status = "<td align='center' $col><A HREF=services.cgi?$_!enable><img alt='$Lang::tr{'activate'}' title='$Lang::tr{'activate'}' src='/images/off.gif' border='0' width='16' height='16' /></A></td>"; }
return $status; @@ -236,7 +247,8 @@ sub isautorun{
sub isrunning{ my $cmd = $_[0]; - my $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2'></td>"; + my $col = $_[1]; + my $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2' $col></td>"; my $pid = ''; my $testcmd = ''; my $exename; @@ -267,7 +279,7 @@ sub isrunning{ close(FILE); } if ($testcmd =~ /$exename/){ - $status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td><td align='center'>$pid</td><td align='center'>$memory</td>"; + $status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td><td align='center' $col>$pid</td><td align='center' $col>$memory</td>"; } } return $status; @@ -275,7 +287,8 @@ sub isrunning{
sub isrunningaddon{ my $cmd = $_[0]; - my $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2'></td>"; + my $col = $_[1]; + my $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2' $col></td>"; my $pid = ''; my $testcmd = ''; my $exename; @@ -293,7 +306,7 @@ sub isrunningaddon{ $testcmd =~ s///gi;
my @pid = split(/\s/,$testcmd); - $status .="<td align='center'>$pid[0]</td>"; + $status .="<td align='center' $col>$pid[0]</td>";
my $memory = 0;
@@ -305,9 +318,9 @@ sub isrunningaddon{ } $memory+=$memory[0]; } - $status .="<td align='center'>$memory KB</td>"; + $status .="<td align='center' $col>$memory KB</td>"; }else{ - $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2'></td>"; + $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2' $col></td>"; } return $status; } diff --git a/html/cgi-bin/shutdown.cgi b/html/cgi-bin/shutdown.cgi new file mode 100755 index 0000000..dd6a03c --- /dev/null +++ b/html/cgi-bin/shutdown.cgi @@ -0,0 +1,88 @@ +#!/usr/bin/perl +# +# SmoothWall CGIs +# +# This code is distributed under the terms of the GPL +# +# (c) The SmoothWall Team +# + +use strict; + +# enable only the following on debugging purpose +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; + +require '/var/ipfire/general-functions.pl'; +require "${General::swroot}/lang.pl"; +require "${General::swroot}/header.pl"; + +my %cgiparams=(); +my $death = 0; +my $rebirth = 0; + +&Header::showhttpheaders(); + +$cgiparams{'ACTION'} = ''; +&Header::getcgihash(%cgiparams); + +if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'}) { + $death = 1; + &General::log($Lang::tr{'shutting down ipfire'}); + system '/usr/local/bin/ipfirereboot down'; +} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) { + $rebirth = 1; + &General::log($Lang::tr{'rebooting ipfire'}); + system '/usr/local/bin/ipfirereboot boot'; +} +if ($death == 0 && $rebirth == 0) { + + &Header::openpage($Lang::tr{'shutdown control'}, 1, ''); + + &Header::openbigbox('100%', 'left'); + + print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n"; + + &Header::openbox('100%', 'left', ); + print <<END +<table width='100%'> +<tr> + <td width='50%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'reboot'}' /></td> + <td width='50%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'shutdown'}' /></td> +</tr> +</table> +END + ; + &Header::closebox(); + +} else { + my $message=''; + my $title=''; + my $refresh = "<meta http-equiv='refresh' content='5; URL=/cgi-bin/index.cgi' />"; + if ($death) { + $title = $Lang::tr{'shutting down'}; + $message = $Lang::tr{'ipfire has now shutdown'}; + } else { + $title = $Lang::tr{'rebooting'}; + $message = $Lang::tr{'ipfire has now rebooted'}; + } + &Header::openpage($title, 0, $refresh); + + &Header::openbigbox('100%', 'center'); + print <<END +<div align='center'> +<table width='100%' bgcolor='#ffffff'> +<tr><td align='center'> +<br /><br /><img src='/ipfire_big.gif' /><br /><br /><br /> +</td></tr> +</table> +<br /> +<font size='6'>$message</font> +</div> +END + ; +} + +&Header::closebigbox(); +&Header::closepage(); + diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index befd508..228b5d4 100755 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -235,8 +235,8 @@ sub showMainBox() {
if ( ($memory != 0) && (@pid[0] ne "///") ){ - print "<table width='95%' cellspacing='0'>"; - print "<tr><td bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'tor service'}</strong></td></tr>"; + print "<table width='95%' cellspacing='0' class='tbl'>"; + print "<tr><th bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'tor service'}</strong></th></tr>"; print "<tr><td class='base'>$Lang::tr{'tor daemon'}</td>"; print "<td align='center' colspan='2' width='75%' bgcolor='${Header::colourgreen}'><font color='white'><strong>$Lang::tr{'running'}</strong></font></td></tr>"; print "<tr><td class='base'></td>"; @@ -247,8 +247,8 @@ if ( ($memory != 0) && (@pid[0] ne "///") ){ print "<td bgcolor='$color{'color22'}' align='center'>$memory KB</td></tr>"; print "</table>"; } else { - print "<table width='95%' cellspacing='0'>"; - print "<tr><td bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'tor service'}</strong></td></tr>"; + print "<table width='95%' cellspacing='0' class='tbl'>"; + print "<tr><th bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'tor service'}</strong></th></tr>"; print "<tr><td class='base'>$Lang::tr{'tor daemon'}</td>"; print "<td align='center' width='75%' bgcolor='${Header::colourred}'><font color='white'><strong>$Lang::tr{'stopped'}</strong></font></td></tr>"; print "</table>"; diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index af68d50..052b3e3 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -69,6 +69,8 @@ if (&Header::orange_used() && $netsettings{'ORANGE_DEV'}) { $orange_cidr = &General::ipcidr("$netsettings{'ORANGE_NETADDRESS'}/$netsettings{'ORANGE_NETMASK'}"); }
+my $col=""; + $cgiparams{'ENABLED'} = 'off'; $cgiparams{'EDIT_ADVANCED'} = 'off'; $cgiparams{'ACTION'} = ''; @@ -2650,14 +2652,14 @@ END
&Header::openbox('100%', 'left', $Lang::tr{'connection status and controlc'}); print <<END - <table width='100%' border='0' cellspacing='1' cellpadding='0'> + <table width='100%' cellspacing='1' cellpadding='0' class='tbl'> <tr> - <td width='10%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></td> - <td width='22%' class='boldbase' align='center'><b>$Lang::tr{'type'}</b></td> - <td width='23%' class='boldbase' align='center'><b>$Lang::tr{'common name'}</b></td> - <td width='30%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></td> - <td width='10%' class='boldbase' align='center'><b>$Lang::tr{'status'}</b></td> - <td class='boldbase' align='center' colspan='6'><b>$Lang::tr{'action'}</b></td> + <th width='10%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></th> + <th width='22%' class='boldbase' align='center'><b>$Lang::tr{'type'}</b></th> + <th width='23%' class='boldbase' align='center'><b>$Lang::tr{'common name'}</b></th> + <th width='30%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></th> + <th width='10%' class='boldbase' align='center'><b>$Lang::tr{'status'}</b></th> + <th class='boldbase' align='center' colspan='6'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -2667,20 +2669,22 @@ END if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; }
if ($id % 2) { - print "<tr bgcolor='$color{'color20'}'>\n"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color22'}'>\n"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; } - print "<td align='center' nowrap='nowrap'>$confighash{$key}[1]</td>"; - print "<td align='center' nowrap='nowrap'>" . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ") $confighash{$key}[29]</td>"; + print "<td align='center' nowrap='nowrap' $col>$confighash{$key}[1]</td>"; + print "<td align='center' nowrap='nowrap' $col>" . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ") $confighash{$key}[29]</td>"; if ($confighash{$key}[2] eq '%auth-dn') { - print "<td align='left' nowrap='nowrap'>$confighash{$key}[9]</td>"; + print "<td align='left' nowrap='nowrap' $col>$confighash{$key}[9]</td>"; } elsif ($confighash{$key}[4] eq 'cert') { - print "<td align='left' nowrap='nowrap'>$confighash{$key}[2]</td>"; + print "<td align='left' nowrap='nowrap' $col>$confighash{$key}[2]</td>"; } else { - print "<td align='left'> </td>"; + print "<td align='left' $col> </td>"; } - print "<td align='center'>$confighash{$key}[25]</td>"; + print "<td align='center' $col>$confighash{$key}[25]</td>"; # get real state my $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourred}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>"; foreach my $line (@status) { @@ -2695,8 +2699,8 @@ END $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourblue}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>"; } print <<END - <td align='center'>$active</td> - <td align='center'> + <td align='center' $col>$active</td> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'restart'}' src='/images/reload.gif' alt='$Lang::tr{'restart'}' title='$Lang::tr{'restart'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'restart'}' /> @@ -2707,7 +2711,7 @@ END ; if (($confighash{$key}[4] eq 'cert') && ($confighash{$key}[2] ne '%auth-dn')) { print <<END - <td align='center'> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'show certificate'}' src='/images/info.gif' alt='$Lang::tr{'show certificate'}' title='$Lang::tr{'show certificate'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'show certificate'}' /> @@ -2716,11 +2720,11 @@ END </td> END ; } else { - print "<td width='2%'> </td>"; + print "<td width='2%' $col> </td>"; } if ($confighash{$key}[4] eq 'cert' && -f "${General::swroot}/certs/$confighash{$key}[1].p12") { print <<END - <td align='center'> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'download pkcs12 file'}' src='/images/floppy.gif' alt='$Lang::tr{'download pkcs12 file'}' title='$Lang::tr{'download pkcs12 file'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download pkcs12 file'}' /> @@ -2730,7 +2734,7 @@ END END ; } elsif (($confighash{$key}[4] eq 'cert') && ($confighash{$key}[2] ne '%auth-dn')) { print <<END - <td align='center'> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'download certificate'}' src='/images/floppy.gif' alt='$Lang::tr{'download certificate'}' title='$Lang::tr{'download certificate'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download certificate'}' /> @@ -2739,10 +2743,10 @@ END </td> END ; } else { - print "<td width='2%'> </td>"; + print "<td width='2%' $col> </td>"; } print <<END - <td align='center'> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$Lang::tr{'toggle enable disable'}' title='$Lang::tr{'toggle enable disable'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> @@ -2750,14 +2754,14 @@ END </form> </td>
- <td align='center'> + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> <input type='hidden' name='KEY' value='$key' /> </form> </td> - <td align='center' > + <td align='center' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> @@ -2814,43 +2818,44 @@ END
&Header::openbox('100%', 'left', "$Lang::tr{'certificate authorities'}:"); print <<EOF - <table width='100%' border='0' cellspacing='1' cellpadding='0'> + <table width='100%' cellspacing='1' cellpadding='0' class='tbl'> <tr> - <td width='25%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></td> - <td width='65%' class='boldbase' align='center'><b>$Lang::tr{'subject'}</b></td> - <td width='10%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></td> + <th width='25%' class='boldbase' align='center'><b>$Lang::tr{'name'}</b></th> + <th width='65%' class='boldbase' align='center'><b>$Lang::tr{'subject'}</b></th> + <th width='10%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></th> </tr> EOF ; + my $col1="bgcolor='$color{'color22'}'"; + my $col2="bgcolor='$color{'color20'}'"; if (-f "${General::swroot}/ca/cacert.pem") { my $casubject = &Header::cleanhtml(getsubjectfromcert ("${General::swroot}/ca/cacert.pem")); - print <<END - <tr bgcolor='$color{'color22'}'> - <td class='base'>$Lang::tr{'root certificate'}</td> - <td class='base'>$casubject</td> - <td width='3%' align='center'> + <tr> + <td class='base' $col1>$Lang::tr{'root certificate'}</td> + <td class='base' $col1>$casubject</td> + <td width='3%' align='center' $col1> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'show root certificate'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/info.gif' alt='$Lang::tr{'show root certificate'}' title='$Lang::tr{'show root certificate'}' /> </form> </td> - <td width='3%' align='center'> + <td width='3%' align='center' $col1> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'download root certificate'}' src='/images/floppy.gif' alt='$Lang::tr{'download root certificate'}' title='$Lang::tr{'download root certificate'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download root certificate'}' /> </form> </td> - <td width='4%'> </td></tr> + <td width='4%' $col1> </td></tr> END ; } else { # display rootcert generation buttons print <<END - <tr bgcolor='$color{'color22'}'> - <td class='base'>$Lang::tr{'root certificate'}:</td> - <td class='base'>$Lang::tr{'not present'}</td> - <td colspan='3'> </td></tr> + <tr> + <td class='base' $col1>$Lang::tr{'root certificate'}:</td> + <td class='base' $col1>$Lang::tr{'not present'}</td> + <td colspan='3' $col1> </td></tr> END ; } @@ -2859,61 +2864,63 @@ END my $hostsubject = &Header::cleanhtml(getsubjectfromcert ("${General::swroot}/certs/hostcert.pem"));
print <<END - <tr bgcolor='$color{'color20'}'> - <td class='base'>$Lang::tr{'host certificate'}</td> - <td class='base'>$hostsubject</td> - <td width='3%' align='center'> + <tr> + <td class='base' $col2>$Lang::tr{'host certificate'}</td> + <td class='base' $col2>$hostsubject</td> + <td width='3%' align='center' $col2> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'show host certificate'}' /> <input type='image' name='$Lang::tr{'show host certificate'}' src='/images/info.gif' alt='$Lang::tr{'show host certificate'}' title='$Lang::tr{'show host certificate'}' /> </form> </td> - <td width='3%' align='center'> + <td width='3%' align='center' $col2> <form method='post' action='$ENV{'SCRIPT_NAME'}'> - <input type='image' name='$Lang::tr{'download host certificate'}' src='/images/floppy.gif' alt='$Lang::tr{'download host certificate'}' title='$Lang::tr{'download host certificate'}' /> - <input type='hidden' name='ACTION' value='$Lang::tr{'download host certificate'}' /> + <input type='image' name="$Lang::tr{'download host certificate'}" src='/images/floppy.gif' alt="$Lang::tr{'download host certificate'}" title="$Lang::tr{'download host certificate'}" /> + <input type='hidden' name='ACTION' value="$Lang::tr{'download host certificate'}" /> </form> </td> - <td width='4%'> </td></tr> + <td width='4%' $col2> </td></tr> END ; } else { # Nothing print <<END - <tr bgcolor='$color{'color20'}'> - <td width='25%' class='base'>$Lang::tr{'host certificate'}:</td> - <td class='base'>$Lang::tr{'not present'}</td> - <td colspan='3'> </td></tr> + <tr> + <td width='25%' class='base' $col2>$Lang::tr{'host certificate'}:</td> + <td class='base' $col2>$Lang::tr{'not present'}</td> + <td colspan='3' $col2> </td></tr> END ; }
- my $rowcolor = 0; - if (keys %cahash > 0) { - foreach my $key (keys %cahash) { - if ($rowcolor++ % 2) { - print "<tr bgcolor='$color{'color20'}'>\n"; - } else { - print "<tr bgcolor='$color{'color22'}'>\n"; - } - print "<td class='base'>$cahash{$key}[0]</td>\n"; - print "<td class='base'>$cahash{$key}[1]</td>\n"; + my $rowcolor = 0; + if (keys %cahash > 0) { + foreach my $key (keys %cahash) { + if ($rowcolor++ % 2) { + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; + } else { + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; + } + print "<td class='base' $col>$cahash{$key}[0]</td>\n"; + print "<td class='base' $col>$cahash{$key}[1]</td>\n"; print <<END - <td align='center'> + <td align='center' $col> <form method='post' name='cafrm${key}a' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'show ca certificate'}' src='/images/info.gif' alt='$Lang::tr{'show ca certificate'}' title='$Lang::tr{'show ca certificate'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'show ca certificate'}' /> <input type='hidden' name='KEY' value='$key' /> </form> </td> - <td align='center'> + <td align='center' $col> <form method='post' name='cafrm${key}b' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'download ca certificate'}' src='/images/floppy.gif' alt='$Lang::tr{'download ca certificate'}' title='$Lang::tr{'download ca certificate'}' /> <input type='hidden' name='ACTION' value='$Lang::tr{'download ca certificate'}' /> <input type='hidden' name='KEY' value='$key' /> </form> </td> - <td align='center'> + <td align='center' $col> <form method='post' name='cafrm${key}c' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove ca certificate'}' /> <input type='image' name='$Lang::tr{'remove ca certificate'}' src='/images/delete.gif' alt='$Lang::tr{'remove ca certificate'}' title='$Lang::tr{'remove ca certificate'}' /> diff --git a/html/cgi-bin/wakeonlan.cgi b/html/cgi-bin/wakeonlan.cgi index 8ea4ae0..f403ea3 100644 --- a/html/cgi-bin/wakeonlan.cgi +++ b/html/cgi-bin/wakeonlan.cgi @@ -292,16 +292,17 @@ print "</form>\n"; &Header::openbox('100%', 'left', "$Lang::tr{'current devices'}");
print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> -<td align='center' width='20%'><b>$Lang::tr{'mac address'}</b></td> -<td align='center' width='10%'><b>$Lang::tr{'interface'}</b></td> -<td align='center' width='60%'><b>$Lang::tr{'remark'}</b></td> -<td align='center' colspan='2'><b>$Lang::tr{'action'}</b></td> +<th align='center' width='20%'><b>$Lang::tr{'mac address'}</b></th> +<th align='center' width='10%'><b>$Lang::tr{'interface'}</b></th> +<th align='center' width='60%'><b>$Lang::tr{'remark'}</b></th> +<th align='center' colspan='2'><b>$Lang::tr{'action'}</b></th> +<th></th> </tr> END ; - +my $col=""; for $i ( 0 .. $#wol_devices ) { my $wol_mac = $wol_devices[$i]{'MAC'}; @@ -310,22 +311,25 @@ for $i ( 0 .. $#wol_devices )
if ( (($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update')) && ($i == $cgiparams{'ID'}) ) { - print "<tr bgcolor='${Header::colouryellow}'>"; + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ( $i % 2) { - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } - else + else { - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; }
print <<END -<td align='center'>$wol_mac</td> -<td align='center'>$Lang::tr{"$wol_iface"}</td> -<td align='left'>$wol_txt</td> -<td align='center'> +<td align='center' $col>$wol_mac</td> +<td align='center' $col>$Lang::tr{"$wol_iface"}</td> +<td align='left' $col>$wol_txt</td> +<td align='center' $col> END ; if ( (($wol_iface eq 'blue') && ! &haveBlueNet()) @@ -347,14 +351,14 @@ END } print <<END </td> -<td align='center'> +<td align='center' $col> <form method='post' name='frmb$i' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='edit' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> <input type='hidden' name='ID' value='$i' /> </form> </td> -<td align='center'> +<td align='center' $col> <form method='post' name='frmc$i' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='remove' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/wireless.cgi b/html/cgi-bin/wireless.cgi index ecff179..0755958 100644 --- a/html/cgi-bin/wireless.cgi +++ b/html/cgi-bin/wireless.cgi @@ -260,13 +260,13 @@ my @current = <FILE>; close (FILE);
print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> -<td align='center' width='20%'><b>$Lang::tr{'hostname'}</b></td> -<td align='center' width='20%'><b>$Lang::tr{'source ip'}</b></td> -<td align='center' width='20%'><b>$Lang::tr{'mac address'}</b></td> -<td align='center' width='35%'><b>$Lang::tr{'remark'}</b></td> -<td align='center' colspan='3'><b>$Lang::tr{'action'}</b></td> +<th align='center' width='20%'><b>$Lang::tr{'hostname'}</b></th> +<th align='center' width='20%'><b>$Lang::tr{'source ip'}</b></th> +<th align='center' width='20%'><b>$Lang::tr{'mac address'}</b></t> +<th align='center' width='35%'><b>$Lang::tr{'remark'}</b></th> +<th align='center' colspan='3'><b>$Lang::tr{'action'}</b></th> </tr> END ; @@ -333,20 +333,24 @@ foreach my $line (@current) else { $gif = 'off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'};}
my $remark = &Header::cleanhtml($temp[4]); + my $col="";
if ($cgiparams{'ACTION'} eq 'edit' && $cgiparams{'ID'} eq $id) { - print "<tr bgcolor='${Header::colouryellow}'>\n"; + print "<tr>"; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($id % 2) { - print "<tr bgcolor='${Header::table1colour}'>\n"; + print "<tr>"; + $col="bgcolor='${Header::table1colour}'"; } else { - print "<tr bgcolor='${Header::table2colour}'>\n"; + print "<tr>"; + $col="bgcolor='${Header::table2colour}'"; } - print "<td align='center'>$hname</td>\n"; - print "<td align='center'>$sourceip</td>\n"; - print "<td align='center'>$sourcemac</td>\n"; - print "<td align='center'>$remark</td>\n"; + print "<td align='center' $col>$hname</td>\n"; + print "<td align='center' $col>$sourceip</td>\n"; + print "<td align='center' $col>$sourcemac</td>\n"; + print "<td align='center' $col>$remark</td>\n"; print<<END -<td align='center'> +<td align='center' $col> <form method='post' name='frma$id' action='$ENV{'SCRIPT_NAME'}'> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> <input type='hidden' name='ACTION' value='toggle'}' /> @@ -355,7 +359,7 @@ print<<END </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' name='frmb$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='edit' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> @@ -363,7 +367,7 @@ print<<END </form> </td>
-<td align='center'> +<td align='center' $col> <form method='post' name='frmc$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='remove' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> @@ -405,12 +409,13 @@ sub printblueleases
&Header::openbox('100%', 'left', "$Lang::tr{'current dhcp leases on blue'}"); print <<END -<table width='100%'> +<table width='100%' class='tbl'> <tr> -<td width='25%' align='center'><b>$Lang::tr{'ip address'}</b></td> -<td width='25%' align='center'><b>$Lang::tr{'mac address'}</b></td> -<td width='20%' align='center'><b>$Lang::tr{'hostname'}</b></td> -<td width='30%' align='center'><b>$Lang::tr{'lease expires'} (local time d/m/y)</b></td> +<th width='25%' align='center'><b>$Lang::tr{'ip address'}</b></th> +<th width='25%' align='center'><b>$Lang::tr{'mac address'}</b></th> +<th width='20%' align='center'><b>$Lang::tr{'hostname'}</b></th> +<th width='30%' align='center'><b>$Lang::tr{'lease expires'} (local time d/m/y)</b></th> +<th></th> </tr> END ; @@ -459,18 +464,21 @@ END foreach my $key (sort blueleasesort keys %entries) {
my $hostname = &Header::cleanhtml($entries{$key}->{HOSTNAME},"y"); + my $col="";
if ($id % 2) { - print "<tr bgcolor='$Header::table2colour'>"; + print "<tr>"; + $col="bgcolor='$Header::table2colour'"; } else { - print "<tr bgcolor='$Header::table1colour'>"; + print "<tr>"; + $col="bgcolor='$Header::table1colour'"; }
print <<END -<td align='center'>$entries{$key}->{IPADDR}</td> -<td align='center'>$entries{$key}->{ETHER}</td> -<td align='center'> $hostname </td> -<td align='center'> +<td align='center' $col>$entries{$key}->{IPADDR}</td> +<td align='center' $col>$entries{$key}->{ETHER}</td> +<td align='center' $col> $hostname </td> +<td align='center' $col> END ;
@@ -493,7 +501,7 @@ END }
print <<END -<td align='center'> +<td align='center' $col> <form method='post' name='frmd$id' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='add' /> <input type='hidden' name='SOURCE_IP' value='' /> diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi index 3c52803..a2d0273 100644 --- a/html/cgi-bin/wirelessclient.cgi +++ b/html/cgi-bin/wirelessclient.cgi @@ -258,11 +258,14 @@ sub showMainBox() {
<br><hr><br>
- <table width="100%"> + <table width="100%" class='tbl'> <tr> <th align='center'>$Lang::tr{'wlan client ssid'}</th> <th align='center'>$Lang::tr{'wlan client encryption'}</th> <th align='center'>$Lang::tr{'priority'}</th> + <th></th> + <th></th> + <th></th> </tr> END
@@ -271,6 +274,7 @@ END #
my $key = 0; + my $col=""; foreach my $line (@configs) { # Skip commented lines. my $firstchar = substr($line, 0, 1); @@ -292,9 +296,11 @@ END
# Colorize each line if ($key % 2) { - print "<tr bgcolor='$color{'color22'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; } else { - print "<tr bgcolor='$color{'color20'}'>"; + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; }
my $encryption_mode = $Lang::tr{'unknown'}; @@ -332,24 +338,24 @@ END }
print <<END; - <td align='center'>$config[5]</td> - <td align='center'>$encryption_mode</td> - <td align='center'>$config[7]</td> - <td align='center' width='5%'> + <td align='center' $col>$config[5]</td> + <td align='center' $col>$encryption_mode</td> + <td align='center' $col>$config[7]</td> + <td align='center' width='5%' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' /> <input type='hidden' name='ID' value='$config[0]' /> </form> </td> - <td align='center' width='5%'> + <td align='center' width='5%' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' /> <input type='hidden' name='ID' value='$config[0]' /> </form> </td> - <td align='center' width='5%'> + <td align='center' width='5%' $col> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' /> diff --git a/html/cgi-bin/xtaccess.cgi b/html/cgi-bin/xtaccess.cgi deleted file mode 100644 index 3fc2190..0000000 --- a/html/cgi-bin/xtaccess.cgi +++ /dev/null @@ -1,377 +0,0 @@ -#!/usr/bin/perl -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -use strict; - -# enable only the following on debugging purpose -#use warnings; -#use CGI::Carp 'fatalsToBrowser'; - -require '/var/ipfire/general-functions.pl'; -require "${General::swroot}/lang.pl"; -require "${General::swroot}/header.pl"; - -#workaround to suppress a warning when a variable is used only once -my @dummy = ( ${Header::colouryellow} ); -undef (@dummy); - -my %cgiparams=(); -my %checked=(); -my %selected=(); -my $errormessage = ''; -my $filename = "${General::swroot}/xtaccess/config"; -my $aliasfile = "${General::swroot}/ethernet/aliases"; -my $changed = 'no'; - -my %color = (); -my %mainsettings = (); -&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); - -&Header::showhttpheaders(); - -$cgiparams{'ENABLED'} = 'off'; -$cgiparams{'ACTION'} = ''; -$cgiparams{'SRC'} = ''; -$cgiparams{'DEST_PORT'} = ''; -$cgiparams{'REMARK'} =''; -&Header::getcgihash(%cgiparams); -open(FILE, $filename) or die 'Unable to open config file.'; -my @current = <FILE>; -close(FILE); - -if ($cgiparams{'ACTION'} eq $Lang::tr{'add'}) -{ - unless($cgiparams{'PROTOCOL'} =~ /^(tcp|udp)$/) { $errormessage = $Lang::tr{'invalid input'}; } - unless(&General::validipormask($cgiparams{'SRC'})) - { - if ($cgiparams{'SRC'} ne '') { - $errormessage = $Lang::tr{'source ip bad'}; } - else { - $cgiparams{'SRC'} = '0.0.0.0/0'; } - } - unless($errormessage){ $errormessage = &General::validportrange($cgiparams{'DEST_PORT'},'dst'); } - if ( ! $errormessage) - { - $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'}); - - if($cgiparams{'EDITING'} eq 'no') { - open(FILE,">>$filename") or die 'Unable to open config file.'; - flock FILE, 2; - print FILE "$cgiparams{'PROTOCOL'},$cgiparams{'SRC'},$cgiparams{'DEST_PORT'},$cgiparams{'ENABLED'},$cgiparams{'DEST'},$cgiparams{'REMARK'}\n"; - } else { - open(FILE, ">$filename") or die 'Unable to open config file.'; - flock FILE, 2; - my $id = 0; - foreach my $line (@current) - { - $id++; - if ($cgiparams{'EDITING'} eq $id) { - print FILE "$cgiparams{'PROTOCOL'},$cgiparams{'SRC'},$cgiparams{'DEST_PORT'},$cgiparams{'ENABLED'},$cgiparams{'DEST'},$cgiparams{'REMARK'}\n"; - } else { print FILE "$line"; } - } - } - close(FILE); - undef %cgiparams; - $changed = 'yes'; - &General::log($Lang::tr{'external access rule added'}); - system('/usr/local/bin/setxtaccess'); - } else { - # stay on edit mode if an error occur - if ($cgiparams{'EDITING'} ne 'no') - { - $cgiparams{'ACTION'} = $Lang::tr{'edit'}; - $cgiparams{'ID'} = $cgiparams{'EDITING'}; - } - } -} -if ($cgiparams{'ACTION'} eq $Lang::tr{'remove'}) -{ - my $id = 0; - open(FILE, ">$filename") or die 'Unable to open config file.'; - flock FILE, 2; - foreach my $line (@current) - { - $id++; - unless ($cgiparams{'ID'} eq $id) { print FILE "$line"; } - } - close(FILE); - system('/usr/local/bin/setxtaccess'); - &General::log($Lang::tr{'external access rule removed'}); -} -if ($cgiparams{'ACTION'} eq $Lang::tr{'toggle enable disable'}) -{ - open(FILE, ">$filename") or die 'Unable to open config file.'; - flock FILE, 2; - my $id = 0; - foreach my $line (@current) - { - $id++; - unless ($cgiparams{'ID'} eq $id) { print FILE "$line"; } - else - { - chomp($line); - my @temp = split(/,/,$line); - print FILE "$temp[0],$temp[1],$temp[2],$cgiparams{'ENABLE'},$temp[4],$temp[5]\n"; - } - } - close(FILE); - system('/usr/local/bin/setxtaccess'); -} -if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) -{ - my $id = 0; - foreach my $line (@current) - { - $id++; - if ($cgiparams{'ID'} eq $id) - { - chomp($line); - my @temp = split(/,/,$line); - $cgiparams{'PROTOCOL'} = $temp[0]; - $cgiparams{'SRC'} = $temp[1]; - $cgiparams{'DEST_PORT'} = $temp[2]; - $cgiparams{'ENABLED'} = $temp[3]; - $cgiparams{'DEST'} = $temp[4]; - $cgiparams{'REMARK'} = $temp[5]; - } - } -} - -if ($cgiparams{'ACTION'} eq '') -{ - $cgiparams{'PROTOCOL'} = 'tcp'; - $cgiparams{'DEST'} = '0.0.0.0'; - $cgiparams{'ENABLED'} = 'on'; -} - -$selected{'PROTOCOL'}{'udp'} = ''; -$selected{'PROTOCOL'}{'tcp'} = ''; -$selected{'PROTOCOL'}{$cgiparams{'PROTOCOL'}} = "selected='selected'"; - -$selected{'DEST'}{$cgiparams{'DEST'}} = "selected='selected'"; - -$checked{'ENABLED'}{'off'} = ''; -$checked{'ENABLED'}{'on'} = ''; -$checked{'ENABLED'}{$cgiparams{'ENABLED'}} = "checked='checked'"; - -&Header::openpage($Lang::tr{'external access configuration'}, 1, ''); - -&Header::openbigbox('100%', 'left', '', $errormessage); - -if ($errormessage) { - &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); - print "<class name='base'>$errormessage\n"; - print " </class>\n"; - &Header::closebox(); -} - -print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n"; - -my $buttontext = $Lang::tr{'add'}; -if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) { - &Header::openbox('100%', 'left', $Lang::tr{'edit a rule'}); - $buttontext = $Lang::tr{'update'}; -} else { - &Header::openbox('100%', 'left', $Lang::tr{'add a new rule'}); -} -print <<END -<table width='100%'> -<tr> -<td width='10%'> -<select name='PROTOCOL'> -<option value='udp' $selected{'PROTOCOL'}{'udp'}>UDP</option> -<option value='tcp' $selected{'PROTOCOL'}{'tcp'}>TCP</option> -</select> -</td> -<td class='base'><font color='${Header::colourred}'>$Lang::tr{'source network'}</font></td> -<td><input type='text' name='SRC' value='$cgiparams{'SRC'}' size='32' /></td> -<td class='base'><font color='${Header::colourred}'>$Lang::tr{'destination port'}:</font></td> -<td><input type='text' name='DEST_PORT' value='$cgiparams{'DEST_PORT'}' size='5' /></td> -</tr> -</table> -<table width='100%'> -<tr> -<td width='10%' class='base'>$Lang::tr{'enabled'}<input type='checkbox' name='ENABLED' $checked{'ENABLED'}{'on'} /></td> -<td class='base'><font color='${Header::colourred}'>$Lang::tr{'destination ip'}: </font> -<select name='DEST'> -<option value='0.0.0.0' $selected{'DEST'}{'0.0.0.0'}>DEFAULT IP</option> -END -; - -open(ALIASES, "$aliasfile") or die 'Unable to open aliases file.'; -while (<ALIASES>) -{ - chomp($_); - my @temp = split(/,/,$_); - if ($temp[1] eq 'on') { - print "<option value='$temp[0]' $selected{'DEST'}{$temp[0]}>$temp[0]"; - if (defined $temp[2] and ($temp[2] ne '')) { print " ($temp[2])"; } - print "</option>\n"; - } -} -close(ALIASES); -print <<END -</select> -</td> -</tr> -</table> -<table width='100%'> -<tr> -<td width ='10%' class='base'> -<font class='boldbase'>$Lang::tr{'remark'}:</font> <img src='/blob.gif' alt='*' /> -</td> -<td width='65%'> -<input type='text' name='REMARK' value='$cgiparams{'REMARK'}' size='55' maxlength='50' /> -</td> -<td width='25%' align='center'> -<input type='hidden' name='ACTION' value='$Lang::tr{'add'}' /> -<input type='submit' name='SUBMIT' value='$buttontext' /> -</td> -</tr> -</table> -<table width='100%'> -<tr> -<td class='base' width='30%'><img src='/blob.gif' alt ='*' align='top' /> <font class='base'>$Lang::tr{'this field may be blank'}</font> -</td> -</tr> -</table> -END -; -if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) { - print "<input type='hidden' name='EDITING' value='$cgiparams{'ID'}' />\n"; -} else { - print "<input type='hidden' name='EDITING' value='no' />\n"; -} - -&Header::closebox(); -print "</form>\n"; - -&Header::openbox('100%', 'left', $Lang::tr{'current rules'}); -print <<END -<table width='100%'> -<tr> -<td width='10%' class='boldbase' align='center'><b>$Lang::tr{'proto'}</b></td> -<td width='20%' class='boldbase' align='center'><b>$Lang::tr{'source ip'}</b></td> -<td width='20%' class='boldbase' align='center'><b>$Lang::tr{'destination ip'}</b></td> -<td width='15%' class='boldbase' align='center'><b>$Lang::tr{'destination port'}</b></td> -<td width='30%' class='boldbase' align='center'><b>$Lang::tr{'remark'}</b></td> -<td width='5%' class='boldbase' colspan='3' align='center'><b>$Lang::tr{'action'}</b></td> -</tr> -END -; - -# If something has happened re-read config -if($cgiparams{'ACTION'} ne '' or $changed ne 'no') -{ - open(FILE, $filename) or die 'Unable to open config file.'; - @current = <FILE>; - close(FILE); -} -my $id = 0; -foreach my $line (@current) -{ - $id++; - chomp($line); - my @temp = split(/,/,$line); - my $protocol = ''; - my $gif = ''; - my $gdesc = ''; - my $toggle = ''; - if ($temp[0] eq 'udp') { - $protocol = 'UDP'; } - else { - $protocol = 'TCP' } - if($cgiparams{'ACTION'} eq $Lang::tr{'edit'} && $cgiparams{'ID'} eq $id) { - print "<tr bgcolor='${Header::colouryellow}'>\n"; } - elsif ($id % 2) { - print "<tr bgcolor='$color{'color22'}'>\n"; } - else { - print "<tr bgcolor='$color{'color20'}'>\n"; } - if ($temp[3] eq 'on') { $gif='on.gif'; $toggle='off'; $gdesc=$Lang::tr{'click to disable'};} - else { $gif='off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'}; } - if ($temp[1] eq '0.0.0.0/0') { - $temp[1] = $Lang::tr{'caps all'}; } - # catch for 'old-style' rules file - assume default ip if - # none exists - if (!&General::validip($temp[4]) || $temp[4] eq '0.0.0.0') { - $temp[4] = 'DEFAULT IP'; } - $temp[5] = '' unless defined $temp[5]; -print <<END -<td align='center'>$protocol</td> -<td align='center'>$temp[1]</td> -<td align='center'>$temp[4]</td> -<td align='center'>$temp[2]</td> -<td align='left'> $temp[5]</td> -<td align='center'> -<form method='post' name='frma$id' action='$ENV{'SCRIPT_NAME'}'> -<input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' title='$gdesc' alt='$gdesc' /> -<input type='hidden' name='ID' value='$id' /> -<input type='hidden' name='ENABLE' value='$toggle' /> -<input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' /> -</form> -</td> -<td align='center'> -<form method='post' name='frmb$id' action='$ENV{'SCRIPT_NAME'}'> -<input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' title='$Lang::tr{'edit'}' alt='$Lang::tr{'edit'}' /> -<input type='hidden' name='ID' value='$id' /> -<input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' /> -</form> -</td> -<td align='center'> -<form method='post' name='frmc$id' action='$ENV{'SCRIPT_NAME'}'> -<input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' title='$Lang::tr{'remove'}' alt='$Lang::tr{'remove'}' /> -<input type='hidden' name='ID' value='$id' /> -<input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' /> -</form> -</td> - -</tr> -END - ; -} -print "</table>\n"; - -# If the xt access file contains entries, print Key to action icons -if ( ! -z "$filename") { -print <<END -<table> -<tr> - <td class='boldbase'> <b>$Lang::tr{'legend'}:</b></td> - <td> <img src='/images/on.gif' alt='$Lang::tr{'click to disable'}' /></td> - <td class='base'>$Lang::tr{'click to disable'}</td> - <td> <img src='/images/off.gif' alt='$Lang::tr{'click to enable'}' /></td> - <td class='base'>$Lang::tr{'click to enable'}</td> - <td> <img src='/images/edit.gif' alt='$Lang::tr{'edit'}' /></td> - <td class='base'>$Lang::tr{'edit'}</td> - <td> <img src='/images/delete.gif' alt='$Lang::tr{'remove'}' /></td> - <td class='base'>$Lang::tr{'remove'}</td> -</tr> -</table> -END -; -} - -&Header::closebox(); - -&Header::closebigbox(); - -&Header::closepage(); diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index 02b3fed..9e834cd 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -16,6 +16,64 @@ html { height: 100%; }
+/* This decorates all tables with class="tbl" */ + +table { + *border-collapse: collapse; /* IE7 and lower */ + border-spacing: 0; +} + +.tbl th { + color: #000000; + border-top: 1px solid grey; + border-bottom: 1px solid grey; + background: #cccccc; +} + +.tbl th:first-child { + border-left: 1px solid grey; + border-top: 1px solid grey; + border-bottom: 1px solid grey; +} + +.tbl th:last-child { + border-right: 1px solid grey; + border-top: 1px solid grey; + border-bottom: 1px solid grey; +} + +.tbl th:only-child { + border: 1px solid grey; +} + +.tbl tr td:first-child { + border-left: 1px solid grey; +} + +.tbl tr td:last-child { + border-right: 1px solid grey; +} + +.tbl tr:first-child td:only-child { + border-top: 1px solid grey; +} + +.tbl tr:last-child td:only-child { + border-bottom: 1px solid grey; +} + +.tbl tr:last-child td:first-child { + border-bottom: 1px solid grey; +} + +.tbl tr:last-child td:last-child { + border-bottom: 1px solid grey; +} + +.tbl tr:last-child td { + border-bottom: 1px solid grey; +} + body { /* SVG as background image (IE9/Chrome/Safari/Opera) */ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2ODQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMTAwJSIgeTE9IjEwMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjODgwNDAwIiBvZmZzZXQ9IjU3JSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c2ODQpIiAvPgo8L3N2Zz4=); @@ -58,6 +116,7 @@ body { font-family: "trebuchet ms", helvetica, sans-serif; }
+ h1, h2, h3, h4, h5, h6 { font-size: 20px; font-weight: normal; diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 568f057..ddc0088 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1269,6 +1269,7 @@ 'ipfire side is invalid' => 'IPFire Seite ist ungültig.', 'ipfires hostname' => 'IPFire's Hostname', 'ipinfo' => 'IP-Info', +'ipsec network' => 'IPsec-Netzwerke', 'iptable rules' => 'IPTable-Regeln', 'iptmangles' => 'IPTable Mangles', 'iptnats' => 'IPTable Network Address Translation', @@ -1536,6 +1537,7 @@ 'openvpn fragment allowed with udp' => '"fragment" kann nur in Kombination mit dem UDP-Protokoll genutzt werden.', 'openvpn log' => 'OpenVPN Log', 'openvpn mssfix allowed with udp' => '"mssfix" kann nur in Kombination mit dem UDP-Protokoll genutzt werden.', +'openvpn network' => 'OpenVPN-Netzwerke', 'openvpn prefix local subnet' => 'Die Prefix-Notation wird nicht unterstützt. Bitte geben Sie eine Subnetzmaske beim lokalen Subnetz ein wie z.B. 255.255.255.0.', 'openvpn prefix openvpn subnet' => 'Die Prefix-Notation wird nicht unterstützt. Bitte geben Sie eine Subnetzmaske beim OpenVPN-Subnetz ein wie z.B. 255.255.255.0.', 'openvpn prefix remote subnet' => 'Die Prefix-Notation wird nicht unterstützt. Bitte geben Sie eine Subnetzmaske beim entfernten Subnetz ein wie z.B. 255.255.255.0.', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 451ea79..7d4546d 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1298,6 +1298,7 @@ 'ipfire side is invalid' => 'IPFire side is invalid.', 'ipfires hostname' => 'IPFire's Hostname', 'ipinfo' => 'IP info', +'ipsec network' => 'IPsec network', 'iptable rules' => 'IPTable rules', 'iptmangles' => 'IPTable Mangles', 'iptnats' => 'IPTable Network Address Translation', @@ -1566,6 +1567,7 @@ 'openvpn fragment allowed with udp' => 'Using fragment is only allowed when using the UDP protocol.', 'openvpn log' => 'OpenVPN Log', 'openvpn mssfix allowed with udp' => 'Using "mssfix" is only allowed when using the UDP protocol.', +'openvpn network' => 'OpenVPN networks', 'openvpn prefix local subnet' => 'Using the prefix notation is not supported for the local subnet. Please enter a subnet mask like 255.255.255.0.', 'openvpn prefix openvpn subnet' => 'Using the prefix notation is not supported for the OpenVPN subnet. Please enter a subnet mask like 255.255.255.0.', 'openvpn prefix remote subnet' => 'Using the prefix notation is not supported for the remote subnet. Please enter a subnet mask like 255.255.255.0.',
hooks/post-receive -- IPFire 2.x development tree