bagder: curl-www/mail list.cgi,1.5,1.6

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/mail
In directory labb:/tmp/cvs-serv15650

Modified Files:
	list.cgi 
Log Message:
more compact overview of the years and months


Index: list.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/mail/list.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- list.cgi	16 Oct 2004 19:19:47 -0000	1.5
+++ list.cgi	12 Jan 2005 14:18:07 -0000	1.6
@@ -29,24 +29,44 @@
 
     @syears = sort { $b <=> $a } keys %years;
     
+    print "<table cellspacing=\"3\">\n";
+    if(0) {
+        my @he =('Year', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
+                 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+    
+        print "<tr> ";
+        for(@he) {
+            print "<th>$_</th> ";
+        }
+        print "</tr>\n";
+    }
+
     for(@syears) {
-        $thisyear=$_;
+        my $year=$_;
         my $pr=0;
+        my $mon;
 
-        for(@dirs) {
-            if($_ =~ /(\d\d\d\d)-(\d\d)/) {
-                $year=$1;
-                $mon=$2;
-                
-                if($thisyear == $year) {
-                    if(!$pr++) {
-                        print "<p><b>Year $thisyear</b><br>\n";
-                    }
-                    print "<a href=\"$_/\">".&MonthNameEng($2)."</a> \n";
+        print "<tr><td><b>$year</b></td>\n";
+
+        foreach $m (01 .. 12) {
+            my $mon = sprintf("%02d", $m);
+            my $f;
+            foreach $d (@dirs) {
+                if($d =~ /$year-$mon$/) {
+                    $f=$d;
+                    last;
                 }
             }
+            if($f) {
+                print "<td><a href=\"$f/\">".substr(&MonthNameEng($mon), 0, 3)."</a></td>\n";
+            }
+            else {
+                print "<td>&nbsp;</td>";
+            }
         }
+        print "</tr>\n";
     }
+    print "</table>\n";
 
 }
 

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.