X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fmedia.cgi;h=6a89ca86774710c29dc19f3398aa800f4b344568;hp=00701518163fc3519c3a6d2589e6bcd72b219629;hb=fac92c6d25038f61430a4e872e720ba00b539385;hpb=72fe12a934084f7127b252bdfa3ab6d24e0bf5cb
diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi
index 0070151816..6a89ca8677 100644
--- a/html/cgi-bin/media.cgi
+++ b/html/cgi-bin/media.cgi
@@ -1,22 +1,39 @@
#!/usr/bin/perl
-#
-# SmoothWall CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) The SmoothWall Team
-#
-#
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2008 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 . #
+# #
+###############################################################################
use strict;
# enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+require "${General::swroot}/graphs.pl";
+
+my %color = ();
+my %mainsettings = ();
+&General::readhash("${General::swroot}/main/settings", \%mainsettings);
+&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
#workaround to suppress a warning when a variable is used only once
my @dummy = ( ${Header::colourred} );
@@ -24,43 +41,39 @@ undef (@dummy);
my %cgiparams=();
-&Header::showhttpheaders();
-
-&Header::getcgihash(\%cgiparams);
-
-&Header::openpage($Lang::tr{'media information'}, 1, '');
-
-&Header::openbigbox('100%', 'left');
-
-&Header::openbox('100%', 'center', "Disk $Lang::tr{'graph'}");
-if (-e "$Header::graphdir/disk-day.png") {
- my $ftime = localtime((stat("$Header::graphdir/disk-day.png"))[9]);
- print "
$Lang::tr{'the statistics were last updated at'}: $ftime