]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix tooltip on hour icon.
authoreldy <>
Thu, 28 Aug 2003 14:38:13 +0000 (14:38 +0000)
committereldy <>
Thu, 28 Aug 2003 14:38:13 +0000 (14:38 +0000)
wwwroot/cgi-bin/awstats.pl

index 847e797fa45505dcba9a0bccda291ec92dab78be..98cd393176749936ecfc3d9798d28340b6a0b8fc 100644 (file)
@@ -8199,8 +8199,10 @@ if (scalar keys %HTMLOutput) {
                        # Show clock icon
                        print "<TR".($TOOLTIPON?" onmouseover=\"ShowTip(17);\" onmouseout=\"HideTip(17);\"":"").">\n";
                        for (my $ix=0; $ix<=23; $ix++) {
-                               my $hr=($ix+1); if ($hr>12) { $hr=$hr-12; }
-                               print "<TD><IMG SRC=\"$DirIcons\/clock\/hr$hr.png\" width=10 alt=\"$hr:00\"></TD>\n";
+                               my $hrs=($ix>=12?$ix-12:$ix);
+                               my $hre=($ix>=12?$ix-11:$ix+1);
+                               my $apm=($ix>=12?"pm":"am");
+                               print "<TD><IMG SRC=\"$DirIcons\/clock\/hr$hre.png\" width=10 alt=\"$hrs:00 - $hre:00 $apm\"></TD>\n";
                        }
                        print "</TR>\n";