bagder: curl-www/dl stuff.pm,1.5,1.6

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

Modified Files:
	stuff.pm 
Log Message:
add getheader(), fixed bad HTML


Index: stuff.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/stuff.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- stuff.pm	11 May 2005 22:02:46 -0000	1.5
+++ stuff.pm	18 May 2005 08:32:02 -0000	1.6
@@ -6,8 +6,9 @@
 
 $databasefilename = "data/databas.db";
 
-sub lheader {
+sub getheader {
     my ($title)=@_;
+    my @head;
 
     if ($title eq "") {
         $title="curl packages";
@@ -22,28 +23,30 @@
     close(FILE);
 
     # valid login-user, continue
-    print <<MOO
-Content-Type: text/html
-
+    push @head, <<MOO
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html><head><title>$title</title>
 <link rel="stylesheet" type="text/css" href="/curl.css">
 </head>
-<body><table><tr valign="top">
-<td class="menu">$menu</td>
-<td>
+<body>
+<a href="/dl/list_entry.cgi">[List Entries]</a>
+<a href="/dl/mod_entry.cgi">[New Entry]</a>
+<a href="/download.html">[Download Page]</a>
+<a href="/dl/log/">[Remcheck Logs]</a>
+<div class="pagetitle">$title</div>
 MOO
 ;
-    print "<a href=\"list_entry.cgi\">[List Entries]</a>\n",
-    "<a href=\"mod_entry.cgi\">[New Entry]</a>\n",
-    "<a href=\"/download.html\">[Download Page]</a>\n",
-    "<a href=\"log/\">[Remcheck Logs]</a>",
-    "<div class=\"pagetitle\">$title</div>";
+    return @head;
 }
 
+sub lheader {
+    print "Content-Type: text/html\n\n";
+    print getheader(@_);
+}
+
+
 sub lfooter {
     print <<FOOT
-</td></tr></table>
 </body></html>
 FOOT
 ;

_______________________________________________
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.