package Header;
use CGI();
+use File::Basename;
use HTML::Entities();
use Socket;
use Time::Local;
};
};
+our $THEME_NAME = $settings{'THEME'};
+
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 /srv/web/ipfire/html/themes/$THEME_NAME/include/functions.pl`;
sub orange_used () {
if ($ethsettings{'CONFIG_TYPE'} =~ /^[24]$/) {
etc/issue
etc/rc.d/init.d/network
srv/web/ipfire/cgi-bin/credits.cgi
+srv/web/ipfire/cgi-bin/gui.cgi
srv/web/ipfire/cgi-bin/index.cgi
srv/web/ipfire/cgi-bin/netinternal.cgi
srv/web/ipfire/cgi-bin/ovpnmain.cgi
srv/web/ipfire/cgi-bin/urlfilter.cgi
srv/web/ipfire/cgi-bin/vpnmain.cgi
srv/web/ipfire/html/themes/darkdos
-srv/web/ipfire/html/themes/ipfire/include/functions.pl
-srv/web/ipfire/html/themes/maniac/include/functions.pl
+srv/web/ipfire/html/themes/ipfire
+srv/web/ipfire/html/themes/ipfire-legacy
+srv/web/ipfire/html/themes/maniac
var/ipfire/backup/bin/backup.pl
var/ipfire/backup/exclude
var/ipfire/backup/include
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
+# Remove the old default theme
+rm -rf /srv/web/ipfire/html/themes/ipfire
+
# Stop services
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: untranslated string: server restart
WARNING: untranslated string: snat new source ip address
WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
WARNING: untranslated string: system information
WARNING: untranslated string: tor
WARNING: untranslated string: tor accounting
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: untranslated string: snat new source ip address
WARNING: untranslated string: snort working
WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
WARNING: untranslated string: system information
WARNING: untranslated string: tor
WARNING: untranslated string: tor accounting
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: untranslated string: routing config changed
WARNING: untranslated string: routing table
WARNING: untranslated string: snat new source ip address
+WARNING: untranslated string: support donation
WARNING: untranslated string: tor
WARNING: untranslated string: tor accounting
WARNING: untranslated string: tor accounting bytes
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: untranslated string: server restart
WARNING: untranslated string: snat new source ip address
WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
WARNING: untranslated string: system information
WARNING: untranslated string: tor
WARNING: untranslated string: tor accounting
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: untranslated string: server restart
WARNING: untranslated string: snat new source ip address
WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
WARNING: untranslated string: tor
WARNING: untranslated string: tor accounting
WARNING: untranslated string: tor accounting bytes
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
WARNING: translation string unused: dmz pinhole configuration
WARNING: translation string unused: dmz pinhole rule added
WARNING: translation string unused: dmz pinhole rule removed
WARNING: untranslated string: routing config changed
WARNING: untranslated string: routing table
WARNING: untranslated string: snat new source ip address
+WARNING: untranslated string: support donation
WARNING: untranslated string: tor directory port
WARNING: untranslated string: tor errmsg invalid directory port
WARNING: untranslated string: urlfilter redirect template
< snat new source ip address
< snort working
< static routes
+< support donation
< system information
< tor
< tor 0 = disabled
< Set time on boot
< snat new source ip address
< static routes
+< support donation
< system information
< tor
< tor 0 = disabled
< server restart
< snat new source ip address
< static routes
+< support donation
< tor
< tor 0 = disabled
< tor accounting
< server restart
< snat new source ip address
< static routes
+< support donation
< tor
< tor 0 = disabled
< tor accounting
my $errormessage='';
-$cgiparams{'FX'} = 'off';
$cgiparams{'SPEED'} = 'off';
$cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
$cgiparams{'REBOOTQUESTION'} = 'off';
$mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
$mainsettings{'REBOOTQUESTION'} = $cgiparams{'REBOOTQUESTION'};
$mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
- $mainsettings{'FX'} = $cgiparams{'FX'};
$mainsettings{'SPEED'} = $cgiparams{'SPEED'};
$mainsettings{'THEME'} = $cgiparams{'theme'};
$mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
if ($mainsettings{'WINDOWWITHHOSTNAME'}) {
$cgiparams{'WINDOWWITHHOSTNAME'} = $mainsettings{'WINDOWWITHHOSTNAME'};
} else {
- $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
+ $cgiparams{'WINDOWWITHHOSTNAME'} = 'on';
}
if ($mainsettings{'REBOOTQUESTION'}) {
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
}
- if ($mainsettings{'FX'}) {
- $cgiparams{'FX'} = $mainsettings{'FX'};
- } else {
- $cgiparams{'FX'} = 'on';
- }
-
if ($mainsettings{'THEME'}) {
$cgiparams{'THEME'} = $mainsettings{'THEME'};
} else {
# Default settings
if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
{
- $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
+ $cgiparams{'WINDOWWITHHOSTNAME'} = 'on';
$cgiparams{'REBOOTQUESTION'} = 'on';
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
$cgiparams{'REFRESHINDEX'} = 'off';
- $cgiparams{'FX'} = 'on';
$cgiparams{'SPEED'} = 'on';
$cgiparams{'THEME'} = 'ipfire';
}
$checked{'REFRESHINDEX'}{'on'} = '';
$checked{'REFRESHINDEX'}{$cgiparams{'REFRESHINDEX'}} = "checked='checked'";
-$checked{'FX'}{'off'} = '';
-$checked{'FX'}{'on'} = '';
-$checked{'FX'}{$cgiparams{'FX'}} = "checked='checked'";
-
$checked{'SPEED'}{'off'} = '';
$checked{'SPEED'}{'on'} = '';
$checked{'SPEED'}{$cgiparams{'SPEED'}} = "checked='checked'";
<tr>
<td colspan='2'><p><b>$Lang::tr{'display'}</b></td>
</tr>
-<tr>
- <td><input type='checkbox' name='FX' $checked{'FX'}{'on'} /></td>
- <td>$Lang::tr{'display webinterface effects'}</td>
-</tr>
<tr>
<td><input type='checkbox' name='WINDOWWITHHOSTNAME' $checked{'WINDOWWITHHOSTNAME'}{'on'} /></td>
<td>$Lang::tr{'display hostname in window title'}</td>
<head>
<title>$title</title>
$extrahead
-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/darkdos/include/style.css" />
<script language="javascript" type="text/javascript">
--- /dev/null
+color1=#CD5B45
+color2=#EE6A50
+color3=#FF7256
+color4=#EE9572
+color5=#FFA07A
+color6=#CDAF95
+color7=#EECBAD
+color8=#FFDAB9
+color9=#FFE4C4
+color10=#FFCCCC
+color11=#0000FF
+color12=#00FF00
+color13=#FF0000
+color14=#FFD700
+color15=#CCCCCC
+color16=#40E0D0
+color17=#90EE90
+color18=#F4A460
+color19=#EAE9EE
+color20=#D6D6D6
+color21=#FFFFFF
+color22=#F0F0F0
+color23=#FF00FF
+color24=#6464FF
+color25=#FF6464
--- /dev/null
+#!/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/>. #
+# #
+###############################################################################
+
+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'} );
+ &General::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
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+ <title>$title</title>
+ $extrahead
+ <link rel="shortcut icon" href="/favicon.ico" />
+ <link rel="stylesheet" type="text/css" href="/themes/ipfire-legacy/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>
+END
+;
+if ($settings{'SPEED'} ne 'off') {
+print <<END
+ <script type="text/javascript" src="/include/jquery.js"></script>
+ <script type="text/javascript">
+ var t_current;
+ var t_last;
+ var rxb_current;
+ var rxb_last;
+ var txb_current;
+ var txb_last;
+ function refreshInetInfo() {
+ \$.ajax({
+ url: '/cgi-bin/speed.cgi',
+ success: function(xml){
+ t_current = new Date();
+ var t_diff = t_current - t_last;
+ t_last = t_current;
+
+ rxb_current = \$("rxb",xml).text();
+ var rxb_diff = rxb_current - rxb_last;
+ rxb_last = rxb_current;
+
+ var rx_kbs = rxb_diff/t_diff;
+ rx_kbs = Math.round(rx_kbs*10)/10;
+
+ txb_current = \$("txb",xml).text();
+ var txb_diff = txb_current - txb_last;
+ txb_last = txb_current;
+
+ var tx_kbs = txb_diff/t_diff;
+ tx_kbs = Math.round(tx_kbs*10)/10;
+
+ \$("#rx_kbs").text(rx_kbs + ' kb/s');
+ \$("#tx_kbs").text(tx_kbs + ' kb/s');
+ }
+ });
+ window.setTimeout("refreshInetInfo()", 3000);
+ }
+ \$(document).ready(function(){
+ refreshInetInfo();
+ });
+ </script>
+ </head>
+ <body>
+END
+;
+}
+else {
+print "</head><body>";}
+print <<END
+<!-- IPFIRE HEADER -->
+
+<div id="header">
+
+ <div id="header_inner" class="fixed">
+
+ <div id="logo">
+END
+;
+ if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
+ print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />";
+ } else {
+ print "<h1><span>IPFire</span></h1><br />";
+ }
+ print <<END
+ <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'} );
+ &General::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
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+ <title>$title</title>
+ $extrahead
+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();
+ my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
+ $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
+ $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
+ $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
+ $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
+ $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;
+
+ 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
+END
+;
+if ($settings{'SPEED'} ne 'off') {
+print <<END
+ <br />
+ <b>$Lang::tr{'bandwidth usage'}:</b>
+ $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span>
+
+END
+;
+}
+print <<END
+ </div>
+ </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;
{
width:100%;
height:122px;
-background: #440000 url('/themes/ipfire/images/n1.gif') repeat-x;
+background: #440000 url('../images/n1.gif') repeat-x;
}
#header_inner
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;
+background: #fff url('../images/n4.gif') repeat-x;
border: solid 1px #fff;
color: #616161;
font-weight: bold;
#menu li a.active
{
-background: #CA2F2F url('/themes/ipfire/images/n3.gif') repeat-x;
+background: #CA2F2F url('../images/n3.gif') repeat-x;
color: #fff;
border: solid 1px #A94B4B;
}
#main
{
-background: #fff url('/themes/ipfire/images/n2.gif') 0px 1px repeat-x;
+background: #fff url('../images/n2.gif') 0px 1px repeat-x;
}
#main_inner p
#main_inner .post ul.post_info li.date
{
-background-image: url('/themes/ipfire/images/n5.gif');
+background-image: url('../images/n5.gif');
}
#main_inner .post ul.post_info li.comments
{
-background-image: url('/themes/ipfire/images/n6.gif');
+background-image: url('../images/n6.gif');
margin-left: 1.1em;
}
input.button
{
-background: #CA2F2F url('/themes/ipfire/images/n3.gif') repeat-x;
+background: #CA2F2F url('../images/n3.gif') repeat-x;
color: #fff;
border: solid 1px #A94B4B;
font-weight: bold;
--- /dev/null
+
+.bigbox {
+ margin-top: 1em;
+ border-radius: 8px 8px 8px 8px;
+ -webkit-border-radius: 8px 8px 8px 8px;
+}
+
+#main_inner .post {
+ border-radius: 8px 8px 8px 8px;
+ -webkit-border-radius: 8px 8px 8px 8px;
+}
+
+#cssmenu a {
+ border-radius: 8px 8px 8px 8px;
+ -webkit-border-radius: 8px 8px 8px 8px;
+}
+
+#cssmenu .has-sub ul li a {
+ border-radius: 7px 7px 7px 7px;
+}
+
+#cssmenu .has-sub ul li:hover a {
+ box-shadow: inset 0 5px 1px rgba(0, 0, 0, 0.15);
+ -webkit-box-shadow: inset 0 5px 1px rgba(0, 0, 0, 0.15);
+}
+
+/* Table */
+/* when using class='bordered' after tabletag */
+
+table {
+ *border-collapse: collapse; /* IE7 and lower */
+ border-spacing: 0;
+}
+
+.bordered th{
+ border-top: 1px solid grey;
+ border-bottom: 1px solid grey;
+ background: #cccccc;
+}
+
+.bordered th:first-child{
+ -moz-border-radius: 6px 0 0 0;
+ -webkit-border-radius: 6px 0 0 0;
+ border-radius: 6px 0 0 0;
+ border-left: 1px solid grey;
+ border-top: 1px solid grey;
+ border-bottom: 1px solid grey;
+}
+
+.bordered th:last-child {
+ -moz-border-radius: 0 6px 0 0;
+ -webkit-border-radius: 0 6px 0 0;
+ border-radius: 0 6px 0 0;
+ border-right: 1px solid grey;
+ border-top: 1px solid grey;
+ border-bottom: 1px solid grey;
+}
+
+.bordered th:only-child{
+ -moz-border-radius: 6px 6px 0 0;
+ -webkit-border-radius: 6px 6px 0 0;
+ border-radius: 6px 6px 0 0;
+ border: 1px solid grey;
+}
+
+.bordered tr:first-child td:first-child{
+ -moz-border-radius: 6px 0 0 0;
+ -webkit-border-radius: 6px 0 0 0;
+ border-radius: 6px 0 0 0;
+ border-left: 1px solid grey;
+ border-top: 1px solid grey;
+}
+
+.bordered tr:first-child td:last-child{
+ -moz-border-radius: 0 6px 0 0;
+ -webkit-border-radius: 0 6px 0 0;
+ border-radius: 0 6px 0 0;
+ border-top: 1px solid grey;
+}
+
+.bordered tr:first-child td:only-child{
+ -moz-border-radius: 6px 6px 0 0;
+ -webkit-border-radius: 6px 6px 0 0;
+ border-radius: 6px 6px 0 0;
+ border-left: 1px solid grey;
+ border-right: 1px solid grey;
+ border-top: 1px solid grey;
+}
+
+.bordered tr:first-child td{
+ border-top: 1px solid grey;
+}
+
+.bordered tr:last-child{
+ border-left: 1px solid grey;
+ border-right: 1px solid grey;
+}
+
+.bordered tr:last-child td:first-child {
+ -moz-border-radius: 0 0 0 6px;
+ -webkit-border-radius: 0 0 0 6px;
+ border-radius: 0 0 0 6px;
+ border-bottom: 1px solid grey;
+}
+
+.bordered tr:last-child td:last-child {
+ -moz-border-radius: 0 0 6px 0;
+ -webkit-border-radius: 0 0 6px 0;
+ border-radius: 0 0 6px 0;
+ border-bottom: 1px solid grey;
+}
+
+.bordered tr:last-child td:only-child {
+ -moz-border-radius: 0 0 6px 6px;
+ -webkit-border-radius: 0 0 6px 6px;
+ border-radius: 0 0 6px 6px;
+ border-bottom: 1px solid grey;
+}
+
+.bordered tr:last-child td {
+ border-bottom: 1px solid grey;
+}
+
+.bordered td:first-child {
+ border-left: 1px solid grey;
+}
+
+.bordered td:last-child {
+ border-right: 1px solid grey;
+}
--- /dev/null
+
+/* This controls the width of the fixed width layouts */
+
+.fixed {
+ width: 910px !important;
+}
+
+/* Basic Stuff */
+
+* {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ height: 100%;
+}
+
+body {
+ /* SVG as background image (IE9/Chrome/Safari/Opera) */
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2ODQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMTAwJSIgeTE9IjEwMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjODgwNDAwIiBvZmZzZXQ9IjU3JSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c2ODQpIiAvPgo8L3N2Zz4=);
+
+ background-image: linear-gradient(
+ bottom,
+ #000000 0%,
+ #880400 57%
+ );
+ background-image: -o-linear-gradient(
+ bottom,
+ #000000 0%,
+ #880400 57%
+ );
+ background-image: -moz-linear-gradient(
+ bottom,
+ #000000 0%,
+ #880400 57%
+ );
+ background-image: -webkit-linear-gradient(
+ bottom,
+ #000000 0%,
+ #880400 57
+ );
+ background-image: -ms-linear-gradient(
+ bottom,
+ #000000 0%,
+ #880400 57%
+ );
+ background-image: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ color-stop(0, #000000),
+ color-stop(0.57, #880400)
+ );
+ background-attachment: fixed;
+
+ font-size: 9pt;
+ font-family: "trebuchet ms", helvetica, sans-serif;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-size: 20px;
+ font-weight: normal;
+ letter-spacing: -1px;
+ text-align: left;
+}
+
+h2, h3, h4, h5, h6 {
+ color: #66000F;
+}
+
+br.clear {
+ clear: both;
+}
+
+img {
+ padding: 3px;
+}
+
+a {
+ text-decoration: underline;
+ color: #d90000;
+}
+
+a:hover {
+ text-decoration: none;
+}
+
+p {
+ line-height: 1.8em;
+}
+
+hr {
+ margin: 0.3em 0 0.3em 0;
+}
+
+iframe {
+ border: 0;
+}
+
+.pull-right {
+ float: right !important;
+}
+
+/* Header */
+
+#header {
+ height: 70px;
+ margin: 0 auto;
+}
+
+/* Logo */
+
+#logo {
+ height: 65px;
+ margin-top: 1em;
+ background: url('../../images/tux2.png') no-repeat;
+}
+
+#logo h1 {
+ color: #fff;
+ font-size: 3.6em;
+ font-weight: bold;
+ padding-left: 1.7em;
+}
+
+/* Main */
+
+.bigbox {
+ margin: 0 auto;
+ margin-top: 0.5em;
+ padding: 1.5em 2em 0 2em;
+ background: #fff url('../../images/n2.gif') 0px 0px repeat-x;
+ border: 1px solid black;
+
+ border-radius: 3px 3px 3px 3px;
+ -webkit-border-radius: 3px 3px 3px 3px;
+}
+
+#main_inner {
+ padding-bottom: 1.5em;
+}
+
+#main_inner p {
+ text-align: justify;
+ margin-bottom: 2em;
+}
+
+#main_inner ul {
+ margin-bottom: 2em;
+}
+
+#main_inner h1 {
+ font-size: 1.8em;
+ margin-bottom: 1em;
+}
+
+#main_inner .post {
+ border: 1px solid silver;
+ padding: 1em 2em 1em 2em;
+ margin-bottom: 1em;
+ clear: both;
+}
+
+#main_inner .post h2 {
+ border-bottom: dotted 1px #e1e1e1;
+ font-size: 1.7em;
+ margin-bottom: 1em;
+}
+
+#footer {
+ height: 2.5em;
+ margin-bottom: 1em;
+}
+
+#footer a {
+ color: inherit;
+ text-decoration: none;
+}
+
+#footer a:hover {
+ text-decoration: underline;
+}
+
+input {
+ margin: 0.2em;
+}
+
+input.button {
+ background: #ca2f2f url('../../images/n3.gif') repeat-x;
+ color: #fff;
+ border: solid 1px #a94b4b;
+ font-weight: bold;
+ font-size: 0.8em;
+ height: 2.0em;
+}
+
+input.text {
+ border: solid 1px #f1f1f1;
+ padding: 0.25em;
+}
+
+#traffic {
+ float: right;
+ min-width: 20em;
+ line-height: 32px;
+}
+
+/* Menu */
+#cssmenu {
+ margin: 0 auto;
+ margin-top: 0;
+ padding-top: 0;
+ font-weight: 600;
+ height: 32px;
+ border: 1px solid black;
+}
+
+#cssmenu a {
+ color: #111111;
+ display: inline-block;
+ line-height: 32px;
+ padding: 0 1em;
+ text-decoration: none;
+}
+
+#cssmenu ul {
+ list-style: none;
+}
+
+#cssmenu > ul > li {
+ display: inline-block;
+}
+
+#cssmenu > ul > li.active a, #cssmenu > ul > li:hover > a {
+ color: white;
+ background: #aaaaaa;
+}
+
+#cssmenu .has-sub:hover > ul {
+ display: block;
+}
+
+#cssmenu .has-sub ul {
+ display: none;
+ position: absolute;
+}
+
+#cssmenu .has-sub ul li a {
+ min-width: 12em;
+ background: #ffffff;
+ color: grey;
+ display: block;
+ line-height: 40%;
+ padding: 12px 5px;
+ border: 1px solid black;
+}
+
+#cssmenu .has-sub ul li:hover a {
+ background: #dddddd;
+}
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
+# #
+# Theme file for IPfire (based on ipfire theme) #
+# Author kay-michael köhler kmk <michael@koehler.tk> #
+# #
+# Version 1.0 March, 6th 2013 #
+###############################################################################
+# #
+# Modyfied theme by a.marx@ipfire.org January 2014 #
+# #
+# Cleanup code, deleted unused code and rewrote the rest to get a new working #
+# IPFire default theme. #
+###############################################################################
-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
-;
-}
+require "${General::swroot}/lang.pl";
-sub getselected($) {
- my $root = shift;
- if (!$root) {
- return 0;
- }
-
- foreach my $item (%$root) {
- if ($root->{$item}{'selected'}) {
- return $root->{$item};
- }
- }
+###############################################################################
+#
+# print menu html elements for submenu entries
+# @param submenu entries
+sub showsubmenu() {
+ my $submenus = shift;
+
+ print "<ul>";
+ foreach my $item (sort keys %$submenus) {
+ $link = getlink($submenus->{$item});
+ next if (!is_menu_visible($link) or $link eq '');
+
+ my $subsubmenus = $submenus->{$item}->{'subMenu'};
+
+ if ($subsubmenus) {
+ print '<li class="has-sub ">';
+ } else {
+ print '<li>';
+ }
+ print '<a href="'.$link.'">'.$submenus->{$item}->{'caption'}.'</a>';
+
+ &showsubmenu($subsubmenus) if ($subsubmenus);
+ print '</li>';
+ }
+ print "</ul>"
}
-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>
+###############################################################################
+#
+# print menu html elements
+sub showmenu() {
+ print '<div id="cssmenu" class="bigbox fixed">';
+
+ if ($settings{'SPEED'} ne 'off') {
+ print <<EOF;
+ <div id='traffic'>
+ <strong>Traffic:</strong>
+ In <span id='rx_kbs'>--.-- Bit/s</span>
+ Out <span id='tx_kbs'>--.-- Bit/s</span>
+ </div>
EOF
-;
-}
+ }
+ print "<ul>";
+ foreach my $k1 ( sort keys %$menu ) {
+ $link = getlink($menu->{$k1});
+ next if (!is_menu_visible($link) or $link eq '');
+ print '<li class="has-sub "><a><span>'.$menu->{$k1}->{'caption'}.'</span></a>';
+ my $submenus = $menu->{$k1}->{'subMenu'};
+ &showsubmenu($submenus) if ($submenus);
+ print "</li>";
+ }
-sub showsubsubsection($) {
- my $root = shift;
- if (!$root) {
- return;
- }
- my $selected = getselected($root);
- if (! $selected) {
- return
- }
- if (! $selected->{'subMenu'}) {
- return
- }
-
- showsubsection($selected->{'subMenu'}, 'menu-subtop');
+ print "</ul></div>";
}
+###############################################################################
+#
+# print page opening html layout
+# @param page title
+# @param boh
+# @param extra html code for html head section
+# @param suppress menu option, can be numeric 1 or nothing.
+# menu will be suppressed if param is 1
sub openpage {
- my $title = shift;
- my $boh = shift;
- my $extrahead = shift;
-
- @URI=split ('\?', $ENV{'REQUEST_URI'} );
- &General::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
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html xmlns='http://www.w3.org/1999/xhtml'>
-<head>
- <title>$title</title>
- $extrahead
-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>
+ my $title = shift;
+ my $boh = shift;
+ my $extrahead = shift;
+ my $suppressMenu = shift;
+ my @tmp = split(/\./, basename($0));
+ my $scriptName = @tmp[0];
+
+ @URI=split ('\?', $ENV{'REQUEST_URI'} );
+ &General::readhash("${swroot}/main/settings", \%settings);
+ &genmenu();
+
+ my $headline = "IPFire";
+ if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
+ $headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
+ }
+
+ my @stylesheets = ("style.css");
+ if ($THEME_NAME eq "ipfire-rounded") {
+ push(@stylesheets, "style-rounded.css");
+ }
+
+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>$headline - $title</title>
+ $extrahead
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="shortcut icon" href="/favicon.ico" />
+ <script type="text/javascript" src="/include/jquery.js"></script>
END
-;
+
+ foreach my $stylesheet (@stylesheets) {
+ print "<link href=\"/themes/ipfire/include/css/$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n";
+ }
+
if ($settings{'SPEED'} ne 'off') {
print <<END
- <script type="text/javascript" src="/include/jquery.js"></script>
- <script type="text/javascript">
- var t_current;
- var t_last;
- var rxb_current;
- var rxb_last;
- var txb_current;
- var txb_last;
- function refreshInetInfo() {
- \$.ajax({
- url: '/cgi-bin/speed.cgi',
- success: function(xml){
- t_current = new Date();
- var t_diff = t_current - t_last;
- t_last = t_current;
-
- rxb_current = \$("rxb",xml).text();
- var rxb_diff = rxb_current - rxb_last;
- rxb_last = rxb_current;
-
- var rx_kbs = rxb_diff/t_diff;
- rx_kbs = Math.round(rx_kbs*10)/10;
-
- txb_current = \$("txb",xml).text();
- var txb_diff = txb_current - txb_last;
- txb_last = txb_current;
-
- var tx_kbs = txb_diff/t_diff;
- tx_kbs = Math.round(tx_kbs*10)/10;
-
- \$("#rx_kbs").text(rx_kbs + ' kb/s');
- \$("#tx_kbs").text(tx_kbs + ' kb/s');
- }
- });
- window.setTimeout("refreshInetInfo()", 3000);
- }
- \$(document).ready(function(){
- refreshInetInfo();
- });
- </script>
- </head>
- <body>
+ <script type="text/javascript" src="/themes/ipfire/include/js/refreshInetInfo.js"></script>
END
;
}
-else {
-print "</head><body>";}
-print <<END
-<!-- IPFIRE HEADER -->
-<div id="header">
-
- <div id="header_inner" class="fixed">
-
- <div id="logo">
+print <<END
+ </head>
+ <body>
+ <div id="header" class="fixed">
+ <div id="logo">
END
;
- if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
- print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />";
- } else {
- print "<h1><span>IPFire</span></h1><br />";
- }
- print <<END
- <h2>$h2</h2>
- </div>
+ if ($settings{'WINDOWWITHHOSTNAME'} ne 'off') {
+ print "<h1>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</h1>";
+ } else {
+ print "<h1>IPFire</h1>";
+ }
+print <<END
+ </div>
+ </div>
END
;
- &showmenu();
-print <<END
- </div>
-</div>
+&showmenu() if ($suppressMenu != 1);
-<div id="main">
- <div id="main_inner" class="fixed">
- <div id="primaryContent_2columns">
- <div id="columnA_2columns">
+print <<END
+ <div class="bigbox fixed">
+ <div id="main_inner" class="fixed">
+ <h1>$title</h1>
END
;
}
+###############################################################################
+#
+# print page opening html layout without menu
+# @param page title
+# @param boh
+# @param extra html code for html head section
sub openpagewithoutmenu {
- my $title = shift;
- my $boh = shift;
- my $extrahead = shift;
-
- @URI=split ('\?', $ENV{'REQUEST_URI'} );
- &General::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
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html xmlns='http://www.w3.org/1999/xhtml'>
-<head>
- <title>$title</title>
- $extrahead
-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
-;
+ openpage(shift,shift,shift,1);
+ return;
}
-sub closepage () {
- my $status = &connectionstatus();
- my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
- $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
- $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
- $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
- $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
- $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;
-
- 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
-END
-;
-if ($settings{'SPEED'} ne 'off') {
-print <<END
- <br />
- <b>$Lang::tr{'bandwidth usage'}:</b>
- $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span>
+###############################################################################
+#
+# print page closing html layout
-END
-;
-}
-print <<END
- </div>
- </div>
-</div>
+sub closepage () {
+ open(FILE, "</etc/system-release");
+ my $system_release = <FILE>;
+ $system_release =~ s/core/Core Update/;
+ close(FILE);
+
+print <<END;
+ </div>
+ </div>
+
+ <div id="footer" class='bigbox fixed'>
+ <span class="pull-right">
+ <a href="http://www.ipfire.org/" target="_blank"><strong>IPFire.org</strong></a> •
+ <a href="http://www.ipfire.org/donate" target="_blank">$Lang::tr{'support donation'}</a>
+ </span>
+
+ <strong>$system_release</strong>
+ </div>
</body>
</html>
END
;
}
-sub openbigbox
-{
+###############################################################################
+#
+# print big box opening html layout
+sub openbigbox {
}
-sub closebigbox
-{
+###############################################################################
+#
+# print big box closing html layout
+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 " "; }
+###############################################################################
+#
+# print box opening html layout
+# @param page width
+# @param page align
+# @param page caption
+sub openbox {
+ $width = $_[0];
+ $align = $_[1];
+ $caption = $_[2];
+
+ print "<div class='post' align='$align'>\n";
+
+ if ($caption) {
+ print "<h2>$caption</h2>\n";
+ }
}
-sub closebox
-{
- print <<END
- </div>
- <br class="clear" />
- <!-- closebox -->
-END
-;
+###############################################################################
+#
+# print box closing html layout
+sub closebox {
+ print "</div>";
}
1;
--- /dev/null
+/* refreshInetInfo.js
+* functions for retrieving status information via jQuery
+* Modified: March 6th, 2013 by michael@koehler.tk
+* Authors: IPFire Team (info@ipfire.org)
+ Kay-Michael Köhler (michael@koehler.tk)
+* Visit http://www.ipfire.org/
+*/
+
+var t_current;
+var t_last = 0;
+var rxb_current;
+var rxb_last = 0;
+var txb_current;
+var txb_last = 0;
+
+$(document).ready(function(){
+ refreshInetInfo();
+});
+
+function refreshInetInfo() {
+ $.ajax({
+ url: '/cgi-bin/speed.cgi',
+ success: function(xml) {
+ t_current = new Date();
+ var t_diff = t_current - t_last;
+
+ rxb_current = $("rxb", xml).text();
+ var rxb_diff = rxb_current - rxb_last;
+ rxb_last = rxb_current;
+
+ var rx_bits = rxb_diff * 8192 / t_diff;
+ var rx_fmt = format_bytes(rx_bits);
+
+ txb_current = $("txb", xml).text();
+ var txb_diff = txb_current - txb_last;
+ txb_last = txb_current;
+
+ var tx_bits = txb_diff * 8192 / t_diff;
+ var tx_fmt = format_bytes(tx_bits);
+
+ if (t_last != 0) {
+ $("#rx_kbs").text(rx_fmt);
+ $("#tx_kbs").text(tx_fmt);
+ }
+
+ t_last = t_current;
+ }
+ });
+
+ window.setTimeout("refreshInetInfo()", 2000);
+}
+
+function format_bytes(bytes) {
+ var units = ["Bit/s", "kBit/s", "MBit/s", "GBit/s", "TBit/s"];
+
+ var unit = units[0];
+ for (var i = 1; i < units.length; i++) {
+ if (bytes < 1024)
+ break;
+
+ unit = units[i];
+ bytes /= 1024;
+ }
+
+ // Round the output.
+ bytes = bytes.toFixed(2);
+
+ return bytes + " " + unit;
+}
<head>
<title>$title</title>
$extrahead
-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/maniac/include/style.css" />
<script language="javascript" type="text/javascript">
'successfully refreshed updates list' => 'Update-Liste erfolgreich aktualisiert.',
'summaries kept' => 'Zusammenfassungen aufheben für',
'sunday' => 'Sonntag',
+'support donation' => 'Unterstützen Sie das IPFire-Projekt mit Ihrer Spende',
'swap' => 'Swap',
'swap usage per' => 'Nutzung von Auslagerungsspeicher (Swap) pro',
'system' => 'System',
'successfully refreshed updates list' => 'Successfully refreshed updates list.',
'summaries kept' => 'Keep summaries for',
'sunday' => 'Sunday',
+'support donation' => 'Support the IPFire project with your donation',
'swap' => 'Swap',
'swap usage per' => 'Swap usage per',
'system' => 'System',
chmod -R 755 /srv/web/ipfire/cgi-bin
chmod -R 644 /srv/web/ipfire/html
chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,dial.cgi,images,include,themes,themes/*,themes/*/*}
+ ln -svf ipfire /srv/web/ipfire/html/themes/ipfire-rounded
# Reset permissions of redirect templates directories
find /srv/web/ipfire/html/redirect-templates -type d | xargs chmod -v 755