]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - html/cgi-bin/proxygraphs.cgi
Source-Links gefixt.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / proxygraphs.cgi
CommitLineData
ac1cfefa
MT
1#!/usr/bin/perl
2#
3# (c) 2002 Robert Wood <rob@empathymp3.co.uk>
4#
5# $Id: proxygraphs.cgi,v 1.2.2.5 2005/02/22 22:21:56 gespinasse Exp $
6#
7
8use strict;
9
10# enable only the following on debugging purpose
11#use warnings;
12#use CGI::Carp 'fatalsToBrowser';
13
986e08d9 14require '/var/ipfire/general-functions.pl';
ac1cfefa
MT
15require "${General::swroot}/lang.pl";
16require "${General::swroot}/header.pl";
17
18my %cgiparams=();
19my %pppsettings=();
20my %netsettings=();
21my @graphs=();
22
23&Header::showhttpheaders();
24
fd0763dc 25my $dir = "/srv/web/ipfire/html/sgraph";
ac1cfefa
MT
26$cgiparams{'ACTION'} = '';
27&Header::getcgihash(\%cgiparams);
fd0763dc 28my $sgraphdir = "/srv/web/ipfire/html/sgraph";
ac1cfefa
MT
29
30&Header::openpage($Lang::tr{'proxy access graphs'}, 1, '');
31
32&Header::openbigbox('100%', 'left');
33
34&Header::openbox('100%', 'left', $Lang::tr{'proxy access graphs'} . ":" );
35
36if (open(IPACHTML, "$sgraphdir/index.html"))
37{
38 my $skip = 1;
39 while (<IPACHTML>)
40 {
41 $skip = 1 if /^<HR>$/;
42 if ($skip)
43 {
44 $skip = 0 if /<H1>/;
45 next;
46 }
47 s/<IMG SRC=([^"'>]+)>/<img src='\/sgraph\/$1' alt='Graph' \/>/;
48 s/<HR>/<hr \/>/g;
49 s/<BR>/<br \/>/g;
50 s/<([^>]*)>/\L<$1>\E/g;
51 s/(size|align|border|color)=([^'"> ]+)/$1='$2'/g;
52 print;
53 }
54 close(IPACHTML);
55}
56else {
57 print $Lang::tr{'no information available'}; }
58
59&Header::closebox();
60
61&Header::closebigbox();
62
63&Header::closepage();