]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - html/cgi-bin/hddgraph.cgi
5 # This code is distributed under the terms of the GPL
7 # (c) The SmoothWall Team
9 # $Id: graphs.cgi,v 1.9.2.6 2005/02/22 22:21:55 gespinasse Exp $
11 # 2006-02-23 modified by weizen_42 for hddgraphs
13 # 2006-02-xx weizen_42 several modifications
14 # 2006-03-31 weizen_42 link to homepage
15 # 2006-04-22 weizen_42 v0.1.1 install below proxygraphs in status menu
20 # enable only the following on debugging purpose
22 #use CGI::Carp 'fatalsToBrowser';
24 require '/var/ipfire/general-functions.pl';
25 require "${General::swroot}/lang.pl";
26 require "${General::swroot}/header.pl";
28 my $version = 'v0.1.1';
34 &Header
::showhttpheaders
();
36 my $graphdir = "/home/httpd/html/graphs";
38 $ENV{'QUERY_STRING'} =~ s/&//g;
39 @cgigraphs = split(/graph=/,$ENV{'QUERY_STRING'});
40 $cgigraphs[1] = '' unless defined $cgigraphs[1];
42 &Header
::openpage
($Lang::tr
{'harddisk temperature graphs'}, 1, '');
44 &Header
::openbigbox
('100%', 'left');
46 &Header
::openbox
('100%', 'center', $Lang::tr
{'harddisk temperature'});
48 if (-e
"$graphdir/hddtemp-day.png")
50 my $ftime = localtime((stat("$graphdir/hddtemp-day.png"))[9]);
52 print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br /><hr />\n";
53 print "<img src='/graphs/hddtemp-day.png' border='0' /><hr />";
54 print "<img src='/graphs/hddtemp-week.png' border='0' /><hr />";
55 print "<img src='/graphs/hddtemp-month.png' border='0' /><hr />";
56 print "<img src='/graphs/hddtemp-year.png' border='0' />";
60 print $Lang::tr
{'no information available'};
65 &Header
::closebigbox
();