my %color = ();
my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
'Sep', 'Oct', 'Nov', 'Dec' );
my $tdoy = $now[7];
my $year = $now[5]+1900;
-$cgiparams{'DAY'} = $now[3];
+$cgiparams{'DAY'} = $now[3];
$cgiparams{'MONTH'} = $now[4];
$cgiparams{'SOURCE_IP'} = 'ALL';
$cgiparams{'FILTER'} = "[.](gif|jpeg|jpg|png|css|js)\$";
if ($cgiparams{'ACTION'} eq $Lang::tr{'restore defaults'})
{
$cgiparams{'FILTER'} = "[.](gif|jpeg|jpg|png|css|js)\$";
- $cgiparams{'ENABLE_FILTER'} = 'off';
+ $cgiparams{'ENABLE_FILTER'} = 'off';
}
{
my @temp = split(',',$ENV{'QUERY_STRING'});
$start = $temp[0];
$cgiparams{'MONTH'} = $temp[1];
- $cgiparams{'DAY'} = $temp[2];
+ $cgiparams{'DAY'} = $temp[2];
$cgiparams{'SOURCE_IP'} = $temp[3];
$cgiparams{'USERNAME'} = &Header::escape($temp[4]);
}
# Calculate time. If future date, calculate for past year !!!
if (( $cgiparams{'MONTH'} eq $now[4]) && ($cgiparams{'DAY'} > $now[3]) ||
- ( $cgiparams{'MONTH'} > $now[4] ) ) {
+ ( $cgiparams{'MONTH'} > $now[4] ) ) {
$xday = POSIX::mktime( 0, 0, 0, $cgiparams{'DAY'}, $cgiparams{'MONTH'}, $year - 1901 );
$daystr = "$longmonths[$cgiparams{'MONTH'}] $daystr, ". int($year-1);
} else {
$temp_now[2] = $temp_now[1] = $temp_now[0] = 0; # start at 00:00:00
$temp_now[3] = 1 if ($cgiparams{'DAY'}==0); # All days selected, start at '1'
- my $mintime = POSIX::mktime(@temp_now);
+ my $mintime = POSIX::mktime(@temp_now);
my $maxtime;
if ($cgiparams{'DAY'}==0) { # full month
if ($temp_now[4]++ == 12){
$temp_now[4] = 0;
$temp_now[5]++;
};
- $maxtime = POSIX::mktime(@temp_now);
+ $maxtime = POSIX::mktime(@temp_now);
} else {
$maxtime = $mintime + 86400; # full day
}
# $datetime = $maxtime; # we have read viewsize lines, stop main loop
# last READ; # exit read file
}
- }
+ }
}
# finish loop when date of lines are past maxtime
{
print "Content-type: text/plain\n\n";
print "IPFire proxy log\r\n";
- print "$Lang::tr{'date'}: $daystr\r\n";
+ print "$Lang::tr{'date'}: $daystr\r\n";
print "Source IP: $cgiparams{'SOURCE_IP'}\r\n";
print "Username: $cgiparams{'USERNAME'}\r\n";
if ($cgiparams{'ENABLE_FILTER'} eq 'on') {
END
;
print "<option value='0'>$Lang::tr{'all'}</option>";
-for (my $day = 1; $day <= 31; $day++)
+for (my $day = 1; $day <= 31; $day++)
{
print "\t<option ";
if ($day == $cgiparams{'DAY'}) {
$url =~ /(^.{0,60})/;
my $part = $1;
- unless (length($part) < 60) { $part = "${part}..."; }
+ unless (length($part) < 60) { $part = "${part}..."; }
$url = &Header::cleanhtml($url,"y");
$part = &Header::cleanhtml($part,"y");
if ($cgiparams{'DAY'}==0) { # full month