Themeable Webinterface mit neuem Style.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@364 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
@@ -43,12 +43,11 @@ my $menu = \%menuhash;
|
||||
%settings = ();
|
||||
%ethsettings = ();
|
||||
@URI = ();
|
||||
$Header::supported=0;
|
||||
|
||||
### Make sure this is an SSL request
|
||||
if ($ENV{'SERVER_ADDR'} && $ENV{'HTTPS'} ne 'on') {
|
||||
print "Status: 302 Moved\r\n";
|
||||
print "Location: https://$ENV{'SERVER_ADDR'}:10443/$ENV{'PATH_INFO'}\r\n\r\n";
|
||||
print "Location: https://$ENV{'SERVER_ADDR'}:444/$ENV{'PATH_INFO'}\r\n\r\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
@@ -98,6 +97,7 @@ if (open(MYFile, "<${swroot}/firebuild")) {
|
||||
|
||||
require "${swroot}/langs/en.pl";
|
||||
require "${swroot}/langs/${language}.pl";
|
||||
eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
|
||||
|
||||
sub orange_used () {
|
||||
if ($ethsettings{'CONFIG_TYPE'} =~ /^[1357]$/) {
|
||||
@@ -580,382 +580,6 @@ sub gettitle($) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
sub showmenu() {
|
||||
print <<EOF
|
||||
<div id="menu-top">
|
||||
<ul>
|
||||
EOF
|
||||
;
|
||||
foreach my $k1 ( sort keys %$menu ) {
|
||||
if (! $menu->{$k1}{'enabled'}) {
|
||||
next;
|
||||
}
|
||||
|
||||
my $link = getlink($menu->{$k1});
|
||||
if ($link eq '') {
|
||||
next;
|
||||
}
|
||||
if (! is_menu_visible($link)) {
|
||||
next;
|
||||
}
|
||||
if ($menu->{$k1}->{'selected'}) {
|
||||
print '<li class="selected">';
|
||||
} else {
|
||||
print '<li>';
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
<div class="rcorner">
|
||||
<a href="$link">$menu->{$k1}{'caption'}</a>
|
||||
</div>
|
||||
</li>
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
</ul>
|
||||
</div>
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
sub getselected($) {
|
||||
my $root = shift;
|
||||
if (!$root) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
foreach my $item (%$root) {
|
||||
if ($root->{$item}{'selected'}) {
|
||||
return $root->{$item};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub showsubsection($$) {
|
||||
my $root = shift;
|
||||
my $id = shift;
|
||||
if ($id eq '') {
|
||||
$id = 'menu-left';
|
||||
}
|
||||
|
||||
if (! $root) {
|
||||
return;
|
||||
}
|
||||
my $selected = getselected($root);
|
||||
if (! $selected) {
|
||||
return;
|
||||
}
|
||||
my $submenus = $selected->{'subMenu'};
|
||||
if (! $submenus) {
|
||||
return;
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
<div id="$id">
|
||||
<ul>
|
||||
EOF
|
||||
;
|
||||
foreach my $item (sort keys %$submenus) {
|
||||
my $hash = $submenus->{$item};
|
||||
if (! $hash->{'enabled'}) {
|
||||
next;
|
||||
}
|
||||
|
||||
my $link = getlink($hash);
|
||||
if ($link eq '') {
|
||||
next;
|
||||
}
|
||||
if (! is_menu_visible($link)) {
|
||||
next;
|
||||
}
|
||||
if ($hash->{'selected'}) {
|
||||
print '<li class="selected">';
|
||||
} else {
|
||||
print '<li>';
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
<a href="$link">$hash->{'caption'}</a>
|
||||
</li>
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
</ul>
|
||||
</div>
|
||||
EOF
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub showsubsubsection($) {
|
||||
my $root = shift;
|
||||
if (!$root) {
|
||||
return;
|
||||
}
|
||||
my $selected = getselected($root);
|
||||
if (! $selected) {
|
||||
return
|
||||
}
|
||||
if (! $selected->{'subMenu'}) {
|
||||
return
|
||||
}
|
||||
|
||||
showsubsection($selected->{'subMenu'}, 'menu-subtop');
|
||||
}
|
||||
|
||||
|
||||
sub get_helpuri() {
|
||||
my $helpfile = '';
|
||||
if ($URI[0] =~ /.*\/([^\/]+)\.cgi/) {
|
||||
$helpfile = $1;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
$helpfile .= '.help.html';
|
||||
|
||||
my $helpuri = '/doc/'.$language.'/'.$helpfile;
|
||||
if (! -e $ENV{'DOCUMENT_ROOT'}.$helpuri) {
|
||||
return '';
|
||||
}
|
||||
return $helpuri;
|
||||
}
|
||||
|
||||
|
||||
sub openpage {
|
||||
my $title = shift;
|
||||
my $boh = shift;
|
||||
my $extrahead = shift;
|
||||
|
||||
@URI=split ('\?', $ENV{'REQUEST_URI'} );
|
||||
&readhash("${swroot}/main/settings", \%settings);
|
||||
&genmenu();
|
||||
|
||||
my $h2 = gettitle($menu);
|
||||
my $helpuri = get_helpuri();
|
||||
|
||||
$title = "IPFire - $title";
|
||||
if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
|
||||
$title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title";
|
||||
}
|
||||
|
||||
print <<END
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>$title</title>
|
||||
|
||||
$extrahead
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
END
|
||||
;
|
||||
if ($settings{'FX'} ne 'off') {
|
||||
print <<END
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)">
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)">
|
||||
END
|
||||
;
|
||||
}
|
||||
print <<END
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<style type="text/css">\@import url(/include/style.css);</style>
|
||||
<style type="text/css">\@import url(/include/menu.css);</style>
|
||||
<style type="text/css">\@import url(/include/content.css);</style>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
function swapVisibility(id) {
|
||||
el = document.getElementById(id);
|
||||
if(el.style.display != 'block') {
|
||||
el.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
el.style.display = 'none'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- IPFIRE HEADER -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="header">
|
||||
<img id="logo-product" src="/images/logo_ipfire.gif">
|
||||
<div id="header-icons">
|
||||
<a href="http://users.ipfire.eu/" target="_blank"><img border="0" src="/images/help.gif"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
END
|
||||
;
|
||||
|
||||
&showmenu();
|
||||
|
||||
print <<END
|
||||
<div id="content">
|
||||
<table width="90%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
END
|
||||
;
|
||||
|
||||
&showsubsection($menu);
|
||||
|
||||
print <<END
|
||||
<p><center><img src="/images/iptux.png" width='160px' height='160px'></center></p>
|
||||
</td>
|
||||
<td width="100%" valign="top">
|
||||
<div id="page-content">
|
||||
<h2>$h2</h2>
|
||||
END
|
||||
;
|
||||
|
||||
&showsubsubsection($menu);
|
||||
}
|
||||
|
||||
sub openpagewithoutmenu {
|
||||
my $title = shift;
|
||||
my $boh = shift;
|
||||
my $extrahead = shift;
|
||||
|
||||
@URI=split ('\?', $ENV{'REQUEST_URI'} );
|
||||
&readhash("${swroot}/main/settings", \%settings);
|
||||
&genmenu();
|
||||
|
||||
my $h2 = gettitle($menu);
|
||||
my $helpuri = get_helpuri();
|
||||
|
||||
$title = "IPFire - $title";
|
||||
if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
|
||||
$title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title";
|
||||
}
|
||||
|
||||
print <<END
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>$title</title>
|
||||
|
||||
$extrahead
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
END
|
||||
;
|
||||
if ($settings{'FX'} eq 'on') {
|
||||
print <<END
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)">
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)">
|
||||
END
|
||||
;
|
||||
}
|
||||
print <<END
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<style type="text/css">\@import url(/include/style.css);</style>
|
||||
<style type="text/css">\@import url(/include/menu.css);</style>
|
||||
<style type="text/css">\@import url(/include/content.css);</style>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
function swapVisibility(id) {
|
||||
el = document.getElementById(id);
|
||||
if(el.style.display != 'block') {
|
||||
el.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
el.style.display = 'none'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- IPFIRE HEADER -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="header">
|
||||
<img id="logo-product" src="/images/logo_ipfire.gif">
|
||||
<div id="header-icons">
|
||||
<a href="http://users.ipfire.eu/" target="_blank"><img border="0" src="/images/help.gif"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
END
|
||||
;
|
||||
print <<END
|
||||
<div id="content">
|
||||
<table width="90%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<p><center><img src="/images/iptux.png" width='160px' height='160px'></center></p>
|
||||
</td>
|
||||
<td width="100%" valign="top">
|
||||
<div id="page-content">
|
||||
<h2>$h2</h2>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
sub closepage () {
|
||||
my $status = &connectionstatus();
|
||||
$uptime = `/usr/bin/uptime`;
|
||||
|
||||
print <<END
|
||||
<div align="center">
|
||||
<p>
|
||||
<div style="font-size: 9px"><b>Status:</b> $status <b>Uptime:</b>$uptime <b>Version:</b> $FIREBUILD</div>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
sub openbigbox
|
||||
{
|
||||
my $width = $_[0];
|
||||
my $align = $_[1];
|
||||
my $sideimg = $_[2];
|
||||
|
||||
if ($errormessage) {
|
||||
$bgcolor = "style='background-color: $colourerr;'";
|
||||
} else {
|
||||
$bgcolor = '';
|
||||
}
|
||||
}
|
||||
|
||||
sub closebigbox
|
||||
{
|
||||
# print "</td></tr></table></td></tr></table>\n"
|
||||
}
|
||||
|
||||
sub openbox
|
||||
{
|
||||
$width = $_[0];
|
||||
$align = $_[1];
|
||||
$caption = $_[2];
|
||||
|
||||
if ($caption) { print "<h3>$caption</h3>\n"; } else { print " "; }
|
||||
|
||||
print "<table class=\"list\"><tr><td align=\"$align\">\n";
|
||||
}
|
||||
|
||||
sub closebox
|
||||
{
|
||||
print "</td></tr></table><br><br>";
|
||||
}
|
||||
|
||||
sub writehash
|
||||
{
|
||||
my $filename = $_[0];
|
||||
@@ -1457,19 +1081,19 @@ sub connectionstatus
|
||||
} elsif ($pppsettings{'TYPE'} eq 'eagleusbadsl') {
|
||||
$speed = `/usr/sbin/eaglestat | /bin/grep Rate`;
|
||||
}
|
||||
$connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused (\@$speed)</span>";
|
||||
$connstate = "$Lang::tr{'connected'} ($timestr) $profileused (\@$speed)";
|
||||
} else {
|
||||
$connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused</span>";
|
||||
$connstate = "$Lang::tr{'connected'} ($timestr) $profileused";
|
||||
}
|
||||
} else {
|
||||
if (-e "${General::swroot}/red/dial-on-demand") {
|
||||
$connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'dod waiting'} $profileused</span>";
|
||||
$connstate = "$Lang::tr{'dod waiting'} $profileused";
|
||||
} else {
|
||||
$connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} $profileused</span>";
|
||||
$connstate = "$Lang::tr{'connecting'} $profileused";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>";
|
||||
$connstate = "$Lang::tr{'idle'} $profileused";
|
||||
}
|
||||
return $connstate;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ require 'CONFIG_ROOT/general-functions.pl';
|
||||
use strict;
|
||||
|
||||
### A cache file to avoid long recalculation
|
||||
$Lang::CacheLang = '/var/run/cache-lang.pl';
|
||||
$Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
|
||||
|
||||
# When you want to add your own language strings/entries to the ipcop language file,
|
||||
# you should create a file with <PREFIX>.<LANG>.pl into CONFIG_ROOT/addon-lang dir
|
||||
|
||||
@@ -5,5 +5,5 @@ usr/lib/perl5/site_perl/5.8.8/i586-linux/Compress/Zlib.pm
|
||||
#usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Compress/Zlib/.packlist
|
||||
#usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Compress/Zlib/Zlib.bs
|
||||
usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Compress/Zlib/Zlib.so
|
||||
#usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Compress/Zlib/autosplit.ix
|
||||
usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Compress/Zlib/autosplit.ix
|
||||
#usr/share/man/man3/Compress::Zlib.3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
bin/[
|
||||
#bin/[
|
||||
bin/chgrp
|
||||
bin/chmod
|
||||
bin/chown
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#home/httpd/html/graphs
|
||||
#srv/web/ipfire/html/graphs
|
||||
#usr/bin/rrdcgi
|
||||
usr/bin/rrdtool
|
||||
usr/bin/rrdupdate
|
||||
|
||||
@@ -100,14 +100,14 @@ usr/local/bin/vpn-restart
|
||||
#usr/share/terminfo
|
||||
#usr/share/zoneinfo
|
||||
#var
|
||||
var/cache
|
||||
#var/cache
|
||||
var/empty
|
||||
#var/lib
|
||||
#var/lib/locate
|
||||
#var/lib/misc
|
||||
#var/local
|
||||
var/lock
|
||||
var/log
|
||||
#var/log
|
||||
var/log/btmp
|
||||
var/log/lastlog
|
||||
var/log/wtmp
|
||||
@@ -115,5 +115,5 @@ var/mail
|
||||
#var/opt
|
||||
var/run
|
||||
var/run/utmp
|
||||
var/spool
|
||||
#var/spool
|
||||
var/tmp
|
||||
|
||||
@@ -186,7 +186,6 @@
|
||||
* reiserfsprogs-3.6.19
|
||||
* rp-pppoe-3.8
|
||||
* rrdtool-1.2.15
|
||||
* rrdtool-1.2.15_dfghjk
|
||||
* rsync-2.6.8
|
||||
* samba-3.0.23b
|
||||
* screen-4.0.2
|
||||
|
||||
@@ -77,6 +77,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
|
||||
$mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
|
||||
$mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
|
||||
$mainsettings{'FX'} = $cgiparams{'FX'};
|
||||
$mainsettings{'THEME'} = $cgiparams{'theme'};
|
||||
$mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
|
||||
&General::writehash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&Lang::reload($cgiparams{'lang'});
|
||||
@@ -100,6 +101,12 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
|
||||
$cgiparams{'FX'} = 'on';
|
||||
}
|
||||
|
||||
if ($mainsettings{'THEME'}) {
|
||||
$cgiparams{'THEME'} = $mainsettings{'THEME'};
|
||||
} else {
|
||||
$cgiparams{'THEME'} = 'ipfire';
|
||||
}
|
||||
|
||||
if($mainsettings{'REFRESHINDEX'}) {
|
||||
$cgiparams{'REFRESHINDEX'} = $mainsettings{'REFRESHINDEX'};
|
||||
} else {
|
||||
@@ -114,6 +121,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
|
||||
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
|
||||
$cgiparams{'REFRESHINDEX'} = 'off';
|
||||
$cgiparams{'FX'} = 'on';
|
||||
$cgiparams{'THEME'} = 'ipfire';
|
||||
}
|
||||
|
||||
$checked{'WINDOWWITHHOSTNAME'}{'off'} = '';
|
||||
@@ -192,6 +200,37 @@ END
|
||||
;
|
||||
}
|
||||
|
||||
print <<END
|
||||
</select></td></tr>
|
||||
<tr>
|
||||
<td colspan='2'><hr /><p><b>$Lang::tr{'theme'}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><select name='theme'>
|
||||
END
|
||||
;
|
||||
|
||||
my $dir = "/srv/web/ipfire/html/themes";
|
||||
local *DH;
|
||||
my ($item, $file);
|
||||
my @files;
|
||||
|
||||
opendir (DH, $dir);
|
||||
while ($file = readdir (DH)) {
|
||||
next if ( $file =~ /^\./ );
|
||||
push (@files, $file);
|
||||
}
|
||||
closedir (DH);
|
||||
|
||||
foreach $item (sort (@files)) {
|
||||
if ( "$mainsettings{'THEME'}" eq "$item" ) {
|
||||
print "<option value='$item' selected='selected'>$item</option>\n";
|
||||
} else {
|
||||
print "<option value='$item'>$item</option>\n";
|
||||
}
|
||||
}
|
||||
|
||||
print <<END
|
||||
</select></td></tr>
|
||||
<tr>
|
||||
|
||||
BIN
html/html/themes/ipfire/images/n1.gif
Normal file
|
After Width: | Height: | Size: 1014 B |
BIN
html/html/themes/ipfire/images/n2.gif
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
html/html/themes/ipfire/images/n3.gif
Normal file
|
After Width: | Height: | Size: 155 B |
BIN
html/html/themes/ipfire/images/n4.gif
Normal file
|
After Width: | Height: | Size: 155 B |
BIN
html/html/themes/ipfire/images/n5.gif
Normal file
|
After Width: | Height: | Size: 72 B |
BIN
html/html/themes/ipfire/images/n6.gif
Normal file
|
After Width: | Height: | Size: 70 B |
BIN
html/html/themes/ipfire/images/spacer.gif
Normal file
|
After Width: | Height: | Size: 43 B |
326
html/html/themes/ipfire/include/functions.pl
Normal file
@@ -0,0 +1,326 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
sub showmenu() {
|
||||
print <<EOF
|
||||
<div id="menu">
|
||||
<ul>
|
||||
EOF
|
||||
;
|
||||
foreach my $k1 ( sort keys %$menu ) {
|
||||
if (! $menu->{$k1}{'enabled'}) {
|
||||
next;
|
||||
}
|
||||
my $link = getlink($menu->{$k1});
|
||||
if ($link eq '') {
|
||||
next;
|
||||
}
|
||||
if (! is_menu_visible($link)) {
|
||||
next;
|
||||
}
|
||||
if ($menu->{$k1}->{'selected'}) {
|
||||
print "<li><a href=\"$link\" class=\"active\">$menu->{$k1}{'caption'}</a></li>";
|
||||
} else {
|
||||
print "<li><a href=\"$link\">$menu->{$k1}{'caption'}</a></li>";
|
||||
}
|
||||
}
|
||||
print <<EOF
|
||||
</ul>
|
||||
</div>
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
sub getselected($) {
|
||||
my $root = shift;
|
||||
if (!$root) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
foreach my $item (%$root) {
|
||||
if ($root->{$item}{'selected'}) {
|
||||
return $root->{$item};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub showsubsection($$) {
|
||||
my $root = shift;
|
||||
|
||||
if (! $root) {
|
||||
return;
|
||||
}
|
||||
my $selected = getselected($root);
|
||||
if (! $selected) {
|
||||
return;
|
||||
}
|
||||
my $submenus = $selected->{'subMenu'};
|
||||
if (! $submenus) {
|
||||
return;
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
<h4><span>Side</span>menu</h4>
|
||||
<ul class="links">
|
||||
EOF
|
||||
;
|
||||
foreach my $item (sort keys %$submenus) {
|
||||
my $hash = $submenus->{$item};
|
||||
if (! $hash->{'enabled'}) {
|
||||
next;
|
||||
}
|
||||
my $link = getlink($hash);
|
||||
if ($link eq '') {
|
||||
next;
|
||||
}
|
||||
if (! is_menu_visible($link)) {
|
||||
next;
|
||||
}
|
||||
if ($hash->{'selected'}) {
|
||||
print '<li class="selected">';
|
||||
} else {
|
||||
print '<li>';
|
||||
}
|
||||
|
||||
print "<a href=\"$link\">$hash->{'caption'}</a></li>";
|
||||
}
|
||||
|
||||
print <<EOF
|
||||
</ul>
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
sub showsubsubsection($) {
|
||||
my $root = shift;
|
||||
if (!$root) {
|
||||
return;
|
||||
}
|
||||
my $selected = getselected($root);
|
||||
if (! $selected) {
|
||||
return
|
||||
}
|
||||
if (! $selected->{'subMenu'}) {
|
||||
return
|
||||
}
|
||||
|
||||
showsubsection($selected->{'subMenu'}, 'menu-subtop');
|
||||
}
|
||||
|
||||
sub openpage {
|
||||
my $title = shift;
|
||||
my $boh = shift;
|
||||
my $extrahead = shift;
|
||||
|
||||
@URI=split ('\?', $ENV{'REQUEST_URI'} );
|
||||
&readhash("${swroot}/main/settings", \%settings);
|
||||
&genmenu();
|
||||
|
||||
my $h2 = gettitle($menu);
|
||||
|
||||
$title = "IPFire - $title";
|
||||
if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
|
||||
$title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title";
|
||||
}
|
||||
|
||||
print <<END
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>$title</title>
|
||||
|
||||
$extrahead
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
END
|
||||
;
|
||||
if ($settings{'FX'} ne 'off') {
|
||||
print <<END
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
|
||||
END
|
||||
;
|
||||
}
|
||||
print <<END
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="/themes/ipfire/include/style.css" />
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
function swapVisibility(id) {
|
||||
el = document.getElementById(id);
|
||||
if(el.style.display != 'block') {
|
||||
el.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
el.style.display = 'none'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- IPFIRE HEADER -->
|
||||
|
||||
<div id="header">
|
||||
|
||||
<div id="header_inner" class="fixed">
|
||||
|
||||
<div id="logo">
|
||||
<h1><span>IPFire</span></h1>
|
||||
<h2>$h2</h2>
|
||||
</div>
|
||||
|
||||
END
|
||||
;
|
||||
&showmenu();
|
||||
|
||||
print <<END
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<div id="main_inner" class="fixed">
|
||||
<div id="primaryContent_2columns">
|
||||
<div id="columnA_2columns">
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
sub openpagewithoutmenu {
|
||||
my $title = shift;
|
||||
my $boh = shift;
|
||||
my $extrahead = shift;
|
||||
|
||||
@URI=split ('\?', $ENV{'REQUEST_URI'} );
|
||||
&readhash("${swroot}/main/settings", \%settings);
|
||||
&genmenu();
|
||||
|
||||
my $h2 = gettitle($menu);
|
||||
|
||||
$title = "IPFire - $title";
|
||||
if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
|
||||
$title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title";
|
||||
}
|
||||
|
||||
print <<END
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>$title</title>
|
||||
|
||||
$extrahead
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
END
|
||||
;
|
||||
if ($settings{'FX'} ne 'off') {
|
||||
print <<END
|
||||
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
|
||||
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
|
||||
END
|
||||
;
|
||||
}
|
||||
print <<END
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="/include/style.css" />
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
function swapVisibility(id) {
|
||||
el = document.getElementById(id);
|
||||
if(el.style.display != 'block') {
|
||||
el.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
el.style.display = 'none'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- IPFIRE HEADER -->
|
||||
|
||||
<div id="header">
|
||||
|
||||
<div id="header_inner" class="fixed">
|
||||
|
||||
<div id="logo">
|
||||
<h1><span>IPFire</span></h1>
|
||||
<h2>$h2</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<div id="main_inner" class="fixed">
|
||||
<div id="primaryContent_2columns">
|
||||
<div id="columnA_2columns">
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
sub closepage () {
|
||||
my $status = &connectionstatus();
|
||||
$uptime = `/usr/bin/uptime`;
|
||||
|
||||
print <<END
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="secondaryContent_2columns">
|
||||
|
||||
<div id="columnC_2columns">
|
||||
END
|
||||
;
|
||||
&showsubsection($menu);
|
||||
&showsubsubsection($menu);
|
||||
|
||||
print <<END
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
<div id="footer" class="fixed">
|
||||
<b>Status:</b> $status <b>Uptime:</b>$uptime <b>Version:</b> $FIREBUILD
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
sub openbigbox
|
||||
{
|
||||
}
|
||||
|
||||
sub closebigbox
|
||||
{
|
||||
}
|
||||
|
||||
sub openbox
|
||||
{
|
||||
$width = $_[0];
|
||||
$align = $_[1];
|
||||
$caption = $_[2];
|
||||
|
||||
print <<END
|
||||
<!-- openbox -->
|
||||
<div class="post" align="$align">
|
||||
END
|
||||
;
|
||||
|
||||
if ($caption) { print "<h3>$caption</h3>\n"; } else { print " "; }
|
||||
}
|
||||
|
||||
sub closebox
|
||||
{
|
||||
print <<END
|
||||
</div>
|
||||
<br class="clear" />
|
||||
<!-- closebox -->
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
1;
|
||||
430
html/html/themes/ipfire/include/style.css
Normal file
@@ -0,0 +1,430 @@
|
||||
/*
|
||||
|
||||
Nonzero1.0 by nodethirtythree design
|
||||
http://www.nodethirtythree.com
|
||||
missing in a maze
|
||||
|
||||
*/
|
||||
|
||||
/* This controls the width of the fluid width layouts */
|
||||
|
||||
div.fluid
|
||||
{
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
/* This controls the width of the fixed width layouts */
|
||||
|
||||
div.fixed
|
||||
{
|
||||
width: 950px !important;
|
||||
}
|
||||
|
||||
/* Basic Stuff */
|
||||
|
||||
*
|
||||
{
|
||||
margin: 0em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
background-color: #fff;
|
||||
color: #585858;
|
||||
font-size: 9pt;
|
||||
font-family: "trebuchet ms", helvetica, sans-serif;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6
|
||||
{
|
||||
font-weight: normal;
|
||||
letter-spacing: -1px;
|
||||
text-transform: lowercase;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h3,h4,h5,h6
|
||||
{
|
||||
color: #66000F;
|
||||
}
|
||||
|
||||
h1 span
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3 span
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h4 span
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
br.clear
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
padding: 3px;
|
||||
border: solid 1px #e1e1e1;
|
||||
}
|
||||
|
||||
img.floatTL
|
||||
{
|
||||
float: left;
|
||||
margin-right: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
text-decoration: underline;
|
||||
color: #D90000;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul.links
|
||||
{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.links li
|
||||
{
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
ul.links li.first
|
||||
{
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
#header
|
||||
{
|
||||
width:100%;
|
||||
height:122px;
|
||||
background: #440000 url('/themes/ipfire/images/n1.gif') repeat-x;
|
||||
}
|
||||
|
||||
#header_inner
|
||||
{
|
||||
position: relative;
|
||||
width: 950px;
|
||||
height:122px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Logo */
|
||||
|
||||
#logo
|
||||
{
|
||||
position: absolute;
|
||||
bottom: 0.6em;
|
||||
}
|
||||
|
||||
#logo h1
|
||||
{
|
||||
display: inline;
|
||||
color: #fff;
|
||||
font-size: 2.6em;
|
||||
}
|
||||
|
||||
#logo h2
|
||||
{
|
||||
display: inline;
|
||||
padding-left: 0.5em;
|
||||
color: #E5CCD0;
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
|
||||
#menu
|
||||
{
|
||||
position: absolute;
|
||||
right: 0em;
|
||||
bottom: 0em;
|
||||
}
|
||||
|
||||
#menu ul
|
||||
{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#menu li
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#menu li a
|
||||
{
|
||||
margin-left: 0.5em;
|
||||
display: block;
|
||||
padding: 1.1em 1.4em 1.0em 1.4em;
|
||||
background: #fff url('/themes/ipfire/images/n4.gif') repeat-x;
|
||||
border: solid 1px #fff;
|
||||
color: #616161;
|
||||
font-weight: bold;
|
||||
font-size: 1.0em;
|
||||
text-transform: lowercase;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#menu li a.active
|
||||
{
|
||||
background: #CA2F2F url('/themes/ipfire/images/n3.gif') repeat-x;
|
||||
color: #fff;
|
||||
border: solid 1px #A94B4B;
|
||||
}
|
||||
|
||||
/* Main */
|
||||
|
||||
#main
|
||||
{
|
||||
background: #fff url('/themes/ipfire/images/n2.gif') 0px 1px repeat-x;
|
||||
}
|
||||
|
||||
#main_inner p
|
||||
{
|
||||
text-align: justify;
|
||||
margin-bottom: 2.0em;
|
||||
}
|
||||
|
||||
#main_inner ul
|
||||
{
|
||||
margin-bottom: 2.0em;
|
||||
}
|
||||
|
||||
#main_inner
|
||||
{
|
||||
position: relative;
|
||||
width: 950px;
|
||||
margin: 0 auto;
|
||||
padding-top: 3.5em;
|
||||
}
|
||||
|
||||
#main_inner h3,h4
|
||||
{
|
||||
border-bottom: dotted 1px #E1E1E1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#main_inner h3
|
||||
{
|
||||
font-size: 2.1em;
|
||||
padding-bottom: 0.1em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
#main_inner h4
|
||||
{
|
||||
font-size: 1.2em;
|
||||
padding-bottom: 0.175em;
|
||||
margin-bottom: 1.4em;
|
||||
margin-top: 0.95em;
|
||||
}
|
||||
|
||||
#main_inner .post
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#main_inner .post h3
|
||||
{
|
||||
position: relative;
|
||||
font-size: 1.7em;
|
||||
padding-bottom: 1.2em;
|
||||
}
|
||||
|
||||
#main_inner .post ul.post_info
|
||||
{
|
||||
list-style: none;
|
||||
position: absolute;
|
||||
top: 3em;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
#main_inner .post ul.post_info li
|
||||
{
|
||||
background-position: 0em 0.2em;
|
||||
background-repeat: no-repeat;
|
||||
display: inline;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
#main_inner .post ul.post_info li.date
|
||||
{
|
||||
background-image: url('/themes/ipfire/images/n5.gif');
|
||||
}
|
||||
|
||||
#main_inner .post ul.post_info li.comments
|
||||
{
|
||||
background-image: url('/themes/ipfire/images/n6.gif');
|
||||
margin-left: 1.1em;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
#footer
|
||||
{
|
||||
width: 950px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
clear: both;
|
||||
border-top: dotted 1px #E1E1E1;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.0em;
|
||||
padding-top: 1.0em;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
/* Search */
|
||||
|
||||
input.button
|
||||
{
|
||||
background: #CA2F2F url('/themes/ipfire/images/n3.gif') repeat-x;
|
||||
color: #fff;
|
||||
border: solid 1px #A94B4B;
|
||||
font-weight: bold;
|
||||
text-transform: lowercase;
|
||||
font-size: 0.8em;
|
||||
height: 2.0em;
|
||||
}
|
||||
|
||||
input.text
|
||||
{
|
||||
border: solid 1px #F1F1F1;
|
||||
font-size: 1.0em;
|
||||
padding: 0.25em 0.25em 0.25em 0.25em;
|
||||
}
|
||||
|
||||
#search
|
||||
{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-bottom: 2.0em;
|
||||
}
|
||||
|
||||
#search input.text
|
||||
{
|
||||
position: absolute;
|
||||
top: 0em;
|
||||
left: 0em;
|
||||
width: 9.5em;
|
||||
}
|
||||
|
||||
#search input.button
|
||||
{
|
||||
position: absolute;
|
||||
top: 0em;
|
||||
right: 0em;
|
||||
min-width: 2.0em;
|
||||
max-width: 2.5em;
|
||||
}
|
||||
|
||||
/* LAYOUT - 3 COLUMNS */
|
||||
|
||||
/* Primary content */
|
||||
|
||||
#primaryContent_3columns
|
||||
{
|
||||
position: relative;
|
||||
margin-right: 34em;
|
||||
}
|
||||
|
||||
#columnA_3columns
|
||||
{
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin-right: -34em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
/* Secondary Content */
|
||||
|
||||
#secondaryContent_3columns
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
#columnB_3columns
|
||||
{
|
||||
width: 13.0em;
|
||||
float: left;
|
||||
padding: 0em 2em 0.5em 2em;
|
||||
border-left: dotted 1px #E1E1E1;
|
||||
}
|
||||
|
||||
#columnC_3columns
|
||||
{
|
||||
width: 13.0em;
|
||||
float: left;
|
||||
padding: 0em 0em 0.5em 2em;
|
||||
border-left: dotted 1px #E1E1E1;
|
||||
}
|
||||
|
||||
/* LAYOUT - 2 COLUMNS */
|
||||
|
||||
/* Primary content */
|
||||
|
||||
#primaryContent_2columns
|
||||
{
|
||||
position: relative;
|
||||
margin-right: 17em;
|
||||
}
|
||||
|
||||
#columnA_2columns
|
||||
{
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin-right: -17em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
/* Secondary Content */
|
||||
|
||||
#secondaryContent_2columns
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
#columnC_2columns
|
||||
{
|
||||
width: 13.0em;
|
||||
float: left;
|
||||
padding: 0em 0em 0.5em 2em;
|
||||
border-left: dotted 1px #E1E1E1;
|
||||
}
|
||||
|
||||
/* LAYOUT - COLUMNLESS */
|
||||
|
||||
/* Primary content */
|
||||
|
||||
#primaryContent_columnless
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#columnA_columnless
|
||||
{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1522,6 +1522,7 @@
|
||||
'ConnSched up' => 'Hoch',
|
||||
'ConnSched ipsecstart' => 'IPSec (neu)starten',
|
||||
'ConnSched ipsecstop' => 'IPSec stop',
|
||||
'theme' => 'Style',
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -1556,5 +1556,6 @@
|
||||
'ConnSched up' => 'Up',
|
||||
'ConnSched ipsecstart' => 'IPSec (re)start',
|
||||
'ConnSched ipsecstop' => 'IPSec stop',
|
||||
'theme' => 'Theme',
|
||||
|
||||
);
|
||||
|
||||