]>
git.ipfire.org Git - people/ummeegge/ipfire-2.x.git/blob - html/cgi-bin/qosgraph.cgi
8b0983288c822b72c3e6a965a2b15851e35693ef
5 # This code is distributed under the terms of the GPL
7 # (c) The SmoothWall Team
13 # enable only the following on debugging purpose
15 #use CGI::Carp 'fatalsToBrowser';
17 require '/var/ipfire/general-functions.pl';
18 require "${General::swroot}/lang.pl";
19 require "${General::swroot}/header.pl";
20 require "${General::swroot}/graphs.pl";
23 my $errormessage = "";
25 &Header
::showhttpheaders
();
27 $ENV{'QUERY_STRING'} =~ s/&//g;
28 @cgigraph = split(/graph=/,$ENV{'QUERY_STRING'});
29 $cgigraph[1] = '' unless defined $cgigraph[1];
31 &Graphs
::overviewgraph
("day",$cgigraph[1]);
32 &Graphs
::overviewgraph
("week",$cgigraph[1]);
33 &Graphs
::overviewgraph
("month",$cgigraph[1]);
34 &Graphs
::overviewgraph
("year",$cgigraph[1]);
36 &Header
::openpage
('QoS', 1, '');
37 &Header
::openbigbox
('100%', 'left', '', $errormessage);
38 &Header
::openbox
('100%', 'left', $cgigraph[1]);
40 if (-e
"/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-day.png") {
41 my $ftime = localtime((stat("/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-day.png"))[9]);
43 print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
44 print "<img alt='' src='/graphs/qos-graph-$cgigraph[1]-day.png' border='0' /><hr />";
46 print $Lang::tr
{'no information available'};
49 if (-e
"/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-week.png") {
50 my $ftime = localtime((stat("/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-week.png"))[9]);
52 print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
53 print "<img alt='' src='/graphs/qos-graph-$cgigraph[1]-week.png' border='0' /><hr />";
55 print $Lang::tr
{'no information available'};
58 if (-e
"/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-month.png") {
59 my $ftime = localtime((stat("/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-month.png.png"))[9]);
61 print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
62 print "<img alt='' src='/graphs/qos-graph-$cgigraph[1]-month.png' border='0' /><hr />";
64 print $Lang::tr
{'no information available'};
67 if (-e
"/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-year.png") {
68 my $ftime = localtime((stat("/srv/web/ipfire/html/graphs/qos-graph-$cgigraph[1]-year.png"))[9]);
70 print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
71 print "<img alt='' src='/graphs/qos-graph-$cgigraph[1]-year.png' border='0' /><hr />";
73 print $Lang::tr
{'no information available'};
76 print"<div align='center'><br/><a href='/cgi-bin/qos.cgi'>$Lang::tr{'back'}</a></div>";
79 &Header
::closebigbox
();