# Correct the needed linklibs in curl-config also.
[AROS-Contrib.git] / bgui / website / cgi-style.pl
blob5cd57d9c2d7a332003e49b0bd0b6c332acc0d1aa
1 # $Id$
3 # Perl routines to encapsulate various elements of HTML page style.
5 # For future reference, when is now?
6 ($se,$mn,$hr,$md,$mo,$yr,$wd,$yd,$dst) = localtime(time);
7 $yr += 1900;
8 $mo += 1;
9 $timestamp = "$mo-$md-$yr";
11 # Colors for the body
12 $t_body = "<body>";
14 if (!defined($hsty_base)) {
15 $hsty_base = "..";
17 if (!defined($hsty_email)) {
18 $hsty_email = "webmaster\@$ENV{SERVER_NAME}";
20 if (!defined($hsty_author)) {
21 $hsty_author = "<a href=\"$hsty_base/mailto.html\">$hsty_email</a>";
24 $i_topbar = "<P><CENTER><A HREF=\"/\">BGUI Developers Site</A> | <A HREF=\"/bugs.html\">BGUI Bug Database</A></CENTER></A>";
26 if ($hsty_home eq "") {
27 $hsty_home = "<a href=\"$hsty_base/\"><img src=\"$hsty_base/gifs/home.gif\"
28 alt=\"FreeBSD Home Page\" border=\"0\" align=\"right\"></a>";
31 sub html_header {
32 local ($title) = @_;
34 return "Content-type: text/html\n\n" .
35 "<html>\n<title>$title</title>\n</head>\n$t_body\n" .
36 "$i_topbar <h1>$title</h1>\n";
39 sub short_html_header {
40 local ($title) = @_;
42 return "Content-type: text/html\n\n" .
43 "<html>\n<title>$title</title>\n</head>\n$t_body\n" .
44 "$i_topbar";
47 sub html_footer {
48 return "<hr><address>$hsty_author<br>$hsty_date</address>\n";
51 sub get_the_source {
52 return if $ENV{'PATH_INFO'} ne '/get_the_source';
54 open(R, $0) || do {
55 print "Oops! open $0: $!\n"; # should not reached
56 exit;
59 print "Content-type: text/plain\n\n";
60 while(<R>) { print }
61 close R;
62 exit;