#!/usr/bin/perl

$msgfile = "/etc/webmsg";
$uptime = `uptime`;

print "content-type: text/html\n\n";
print "<HTML><TITLE>Ying!</TITLE>
<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#000000 VLINK=#000000>
<IMG SRC=\"../headers/yd.jpg\" BORDER=0>

<BR><B>Ying's Personal Diary.... Check It Out!<BR><BR></B>

<A HREF=\"status.cgi\">Be sure to check out the server status!</A><BR><BR>

<BLOCKQUOTE>\n";

if(-f "$msgfile") {

	open (MSG, "$msgfile");
	while ($msg = <MSG>) {
	        chomp($msg);
	        $msgout = "$msg<BR>\n";
	        push(@prtmsg, $msgout);
	}
	close(MSG);
	&printmsg(@prtmsg);
} else {
	print "None.\n";
}

sub printmsg {
        my(@prtmsg) = @_;
        foreach $lines (@prtmsg) {
                print $lines;
        }
}               


print "</BLOCKQUOTE><BR><BR>

<P>You are <B><font Color=#FF0000 SIZE=4><EM>Visitor</EM></font></B> <img src=\"http://www-acs.ucsd.edu/cgi-bin/counter?Chen-yd&width=4\" border=0>


</BODY></HTML>\n";
exit;
