package Header;
use CGI();
+use HTML::Entities();
use Socket;
use Time::Local;
};
};
-### Read IPFire Buildversion
-$FIREBUILD = "File not found: firebuild\n";
-if (open(MYFile, "<${swroot}/firebuild")) {
- $FIREBUILD = <MYFile>;
- chomp($FIREBUILD);
- $FIREBUILD = "(Build: $FIREBUILD)";
- close(MYFile);
-};
-
require "${swroot}/langs/en.pl";
require "${swroot}/langs/${language}.pl";
eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
eval `/bin/cat /var/ipfire/menu.d/*.menu`;
eval `/bin/cat /var/ipfire/menu.d/*.main`;
- if (! blue_used() && ! orange_used()) {
- $menu->{'05.firewall'}{'subMenu'}->{'40.dmz'}{'enabled'} = 0;
- }
if (! blue_used()) {
- $menu->{'05.firewall'}{'subMenu'}->{'30.wireless'}{'enabled'} = 0;
+ $menu->{'05.firewall'}{'subMenu'}->{'60.wireless'}{'enabled'} = 0;
}
if ( $ethsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
$menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
}
+
+ if (&General::RedIsWireless()) {
+ $menu->{'01.system'}{'subMenu'}->{'21.wlan'}{'enabled'} = 1;
+ }
}
sub showhttpheaders
{
- print "Pragma: no-cache\n";
- print "Cache-control: no-cache\n";
+ print "Cache-control: private\n";
print "Connection: close\n";
- print "Content-type: text/html\n\n";
+ print "Content-type: text/html; charset=UTF-8\n\n";
}
sub is_menu_visible($) {
return (($ip >= $start) && ($ip <= $end));
}
-sub cleanhtml
-{
+sub escape($) {
+ my $s = shift;
+ return HTML::Entities::encode_entities($s);
+}
+
+sub cleanhtml {
my $outstring =$_[0];
$outstring =~ tr/,/ / if not defined $_[1] or $_[1] ne 'y';
- $outstring =~ s/&/&/g;
- $outstring =~ s/\'/'/g;
- $outstring =~ s/\"/"/g; #" This is just a workaround for the syntax highlighter
- $outstring =~ s/</</g;
- $outstring =~ s/>/>/g;
- return $outstring;
+
+ return escape($outstring);
}
sub connectionstatus