#!/usr/bin/perl
# 
#  Footer.pm - Compute the footer for the Oroborus.org website.
# 
#  Copyright (C) 2002 Stefan Pfetzing
# 
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
# 
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
# 

# define the Package name
package Oroborus::Footer;

#use Apache::Reload;
use strict;
use Oroborus::ImageFooter;
our ($q);

# constructor needs one argument, a filename of an image.
sub new($) {
	my $proto = shift();
	$q = shift();
	my $class = ref($proto) || $proto;
	my $self  = {};
	bless ($self, $class);
	# compute the inner part with the images themself.
	my @images = ( [ "images/valid-xhtml10.png", "http://validator.w3.org/check/referer", "Valid XHTML 1.0!" ],
			[ "images/vcss.png", "http://jigsaw.w3.org/css-validator/validator?uri=http://www.oroborus.org/styles.css", "Valid CSS!" ],
			[ "images/apache-mod_perl.png", "http://perl.apache.org/", "mod_perl -- Speed, Power, Scalability" ],
			[ "images/gfx_by_gimp.png", "http://www.gimp.org", "Gimp Powered" ],
			[ "images/savannah_logo_small.png", "http://savannah.gnu.org", "Savannah GNU Powered" ],
			[ "images/XFSpowered_small.png", "http://oss.sgi.com/projects/xfs", "XFS Powered"],
			[ "images/debian.png", "http://www.debian.org/", "Debian GNU/Linux" ],
			[ "images/vim.png", "http://www.vim.org/", "vim - the editor" ]);
			
	my $context;
	foreach my $ref (@images) {
		$context .= (new Oroborus::ImageFooter($q, $ref))->toString() . "&nbsp;";
	}
	$self->{_STRING} = $q->Tr(
		$q->td({-class=>"SubTitle",
			-colspan=>"3"},
			$q->hr({-noshade=>"noshade"}),
			$q->br(),
			$context,
			$q->br(), "&nbsp;"
			)
		);
	return $self;
}

# destructor
sub DESTROY() {
};

sub toString() {
	my $self = shift();
	return $self->{_STRING};
}

# return a true value
1;
__END__


