news1.cgi
#!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Content-type: text/html\n\n"; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdist)=localtime(time); $mon = $mon + 1; $mon = sprintf("%02d", $mon) if $mon <= 9; $mday = sprintf("%02d", $mday) if $mday <= 9; $min = sprintf("%02d", $min) if $min <= 9; $date=$year . $mon . $mday . $hour . $min . $sec; print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>"; print "<TITLE>Women Who Really Cook</TITLE>"; print "<!-- The next two lines should be in every *.html file"; print " that you want to have this style -->"; print "<META content=text/css http-equiv=Content-Style-Type>"; print "<LINK href=\"http://www.setgetweb.com/wendy/women/mstyle.css\" rel=\"stylesheet\" type=\"text/css\">"; print "</HEAD>"; print "<BODY BACKGROUND=\"http://www.setgetweb.com/wendy/women/img/bg.jpg\">"; print "<TABLE BORDER=\"0\" WIDTH=\"100%\" ALIGN=\"left\">"; print "<TR><TD VALIGN=\"top\">"; print "<TABLE BORDER=\"0\" WIDTH=\"570\" CELLPADDING=\"0\" CELLSPACING=\"0\">"; print "<TR><TD>"; print "<IMG SRC=\"http://www.setgetweb.com/wendy/women/img/logo3.jpg\" BORDER=\"0\"></IMG>"; print "</TD></TR>"; print "<TR><TD>"; print "<TABLE WIDTH=570 CELPADDING=0 CELLSPACING=0 BGCOLOR=silver>"; print "<TR>"; print "<TD WIDTH=60 ALIGN=CENTER><A HREF=\"http://www.setgetweb.com/wendy/women/index.html\">Home</A></TD>"; print "<TD WIDTH=100 ALIGN=CENTER><A HREF=\"http://www.setgetweb.com/wendy/women/membersonly.html\">Members Only</A></TD>"; print "<TD WIDTH=135 ALIGN=CENTER><A HREF=\"http://www.setgetweb.com/wendy/women/becomemember.html\">Become a Member</A></TD>"; print "<TD WIDTH=65 ALIGN=CENTER><A HREF=\"http://www.setgetweb.com/wendy/women/recipes.html\">Recipes</A></TD>"; print "<TD WIDTH=60 ALIGN=CENTER><A HREF=\"http://www.setgetweb.com/wendy/women/photos.html\">Photos</A></TD>"; print "<TD WIDTH=81 ALIGN=CENTER><A HREF=\"http://www.setgetweb.com/wendy/women/contact.html\">Contact Us</A></TD>"; print "<TD WIDTH=69 ALIGN=CENTER><A HREF=\"mailto:qp\@visi.com\">Webmaster</A></tD>"; print "</TR>"; print "</TABLE>"; print "</TD></TR>"; print "</TABLE>"; print "<BR CLEAR=\"all\">"; print "</TD></TR>"; print "<TR><TD>"; print "<TABLE BORDER=\"0\" WIDTH=\"570\" VALIGN=top>"; print "<TR><TD WIDTH=\"150\" VALIGN=top>"; print "<TABLE WIDTH=140 CELPADDING=0 CELLSPACING=2>"; print "<TR HEIGHT=20><TD WIDTH=130 BGCOLOR=#FFCCCC ALIGN=LEFT><A HREF=\"http://www.setgetweb.com/cgi-bin/news1.cgi\">Bulletin Board</A></TD></TR>"; print "<TR HEIGHT=20><TD WIDTH=130 BGCOLOR=#FFCCCC ALIGN=LEFT><A HREF=\"http://www.setgetweb.com/wendy/women/members/bulletin.html\">Post New Message</A></TD></TR>"; print "<TR HEIGHT=20><TD WIDTH=130 BGCOLOR=#FFCCCC ALIGN=LEFT><A HREF=\"http://www.setgetweb.com/wendy/women/members/removemessage.html\">Remove a Message</A></TD></TR>"; print "<TR HEIGHT=20><TD WIDTH=130 BGCOLOR=#FFCCCC ALIGN=LEFT><A HREF=\"http://www.setgetweb.com/wendy/women/members/2003/enews.html\" TARGET=_blank>e-Newsletter</A></TD></TR>"; print "<TR HEIGHT=20><TD WIDTH=130 BGCOLOR=#FFCCCC ALIGN=LEFT><A HREF=\"http://www.setgetweb.com/wendy/women/members/dir/372845directory.html\">Member Directory</A></TD></TR>"; print "</TABLE>"; print "</TD>"; print "<TD WIDTH=\"420\">"; open (FILENAME, "</news/newscapture.txt") || &ErrorMessage; @stories = <FILENAME>; close (FILENAME); $total=$#stories; for ($i = $total; $i > 0; --$i) { print "$stories[$i]"; } print "</TD></TR>"; print "</TABLE>"; print " </TD></TR>"; print " </TABLE>"; print " </CENTER>"; print "</BODY>"; print "</HTML>"; sub ErrorMessage { print "Content-type: text/html\n\n"; print "The server can't process file. It either doesn't exist or the permissions are wrong. \n"; exit; }