# $Id$ # # Perl routines to encapsulate various elements of HTML page style. # For future reference, when is now? ($se,$mn,$hr,$md,$mo,$yr,$wd,$yd,$dst) = localtime(time); $yr += 1900; $mo += 1; $timestamp = "$mo-$md-$yr"; # Colors for the body $t_body = ""; if (!defined($hsty_base)) { $hsty_base = ".."; } if (!defined($hsty_author)) { $hsty_author = "webmaster\@php.net"; } sub html_header { local ($title) = @_; return "Content-type: text/html\n\n" . "\n$title\n\n$t_body\n" . "

$title

\n"; } sub short_html_header { local ($title) = @_; return "Content-type: text/html\n\n" . "\n$title\n\n$t_body\n" . " "; } sub html_footer { return "
$hsty_author
$hsty_date
\n"; } sub get_the_source { return if $ENV{'PATH_INFO'} ne '/get_the_source'; open(R, $0) || do { print "Oops! open $0: $!\n"; # should not reached exit; }; print "Content-type: text/plain\n\n"; while() { print } close R; exit; }