Switch to using indirect font names, which are defined only in LUGO.style
[infodrom.org/oldenburg.linux.de] / src / Infos / anzahl.wml
1 #include <LUGO.style>
2 #read "anzahl.txt"
3
4 <page name="Linux-Stammtisch">
5
6 <h3>Oldenburger Linux-Stammtisch</h3>
7
8 <p>Anzahl der Teilnehmer am jeweiligen Stammtisch.
9
10 <:
11   $height = 3;
12   @monthname = ("dummy", "Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez");
13
14   if (open (IN, "anzahl.txt")) {
15     while (<IN>) {
16       next if (/^#/);
17       if (/(\d{4})-(\d{2})-(\d{2}):\s*(\d+)/) {
18         $attendees{$1}{$2}{$3} = $4;
19       }
20     }
21     close (IN);
22
23 #     Debug code
24 #     for $year (sort keys %attendees) {
25 #       for $month (sort keys %{$attendees{$year}}) {
26 #         for $day (sort keys %{$attendees{$year}{$month}}) {
27 #           printf STDERR "%d-%d-%d: %d\n", $year, $month, $day, $attendees{$year}{$month}{$day};
28 #         }
29 #       }
30 #     }
31
32     for $year (reverse sort keys %attendees) {
33       printf "<h3>In %d</h3>\n", $year;
34
35       print  "<div align=\"center\"><table cellspacing=\"2\" cellpadding=\"0\" summary=\"\">\n";
36
37       print  "<tr>\n";
38       for $month (sort keys %{$attendees{$year}}) {
39         for $day (sort keys %{$attendees{$year}{$month}}) {
40           $elems{"$year-$month"}++;
41           if ($attendees{$year}{$month}{$day}){
42             printf "<td width=\"25\" valign=\"bottom\" align=\"center\"><font face=\"<infodrom-font />\">%d</font><br> "
43               ."<img src=green-v.png alt=\"\" width=\"15\" height=\"%d\"></td>\n",
44               $attendees{$year}{$month}{$day}, $attendees{$year}{$month}{$day} * $height
45           } else {
46             print "<td width=\"25\" valign=\"bottom\">&nbsp;</td>\n";
47           }         
48         }
49       }
50       print  "</tr>\n";
51
52       print  "<tr>\n";
53       for $month (sort keys %{$attendees{$year}}) {
54         printf "<td colspan=\"%d\" align=\"center\" bgcolor=\"#AAAAAA\"><font face=\"<infodrom-font />\">%s</font></td>",
55             $elems{"$year-$month"}, $monthname[$month];
56       }
57       print  "</tr>\n";
58
59       print  "<tr>\n";
60       for $month (sort keys %{$attendees{$year}}) {
61         for $day (sort keys %{$attendees{$year}{$month}}) {
62           $elems{"$year-$month"}++;
63           printf "<td width=\"20\" align=\"center\" bgcolor=\"#CCCCCC\"><font face=\"infodrom-font />\">%d</font></td>\n",
64             $day;
65         }
66       }
67       print  "</tr>\n";
68
69       print  "</table></div>\n";
70     }
71   }
72 :>
73
74 <p><a href="history.html">Geschichte</a> der LUGO und des <a href="stammtisch.html">Linux-Stammtisches</a>.
75
76 </page>
77
78 # Local variables:
79 # mode: html
80 # mode: auto-fill
81 # mode: iso-accents
82 # end: