## OpenCA Command
## (c) 1998-2001 by Massimiliano Pala and OpenCA Group
##
##   File Name: serverInfo
##       Brief: Returns Used Modules Versions
## Description: Build a page returning OpenCA modules versions
##  Parameters: 

sub cmdServerInfo {

	my @cols;
	my $i, $thanks;

	my @modules = ( OpenSSL, Tools, DB, Configuration, TRIStateCGI,
			REQ, X509, CRL, PKCS7 );


	print $query->start_html(-title=>"OpenCA",-BGCOLOR=>"#FFFFFF",
							-TEXT=>"#445599");

	print "<CENTER>";
	print "<FONT SIZE=\"+3\">";
	print "<B>Open<FONT COLOR=\"#FF9900\">CA</FONT></B></FONT><BR>\n";
	print "<FONT SIZE=\"+1\">";
	print i18nGettext ("(__PROGRAM__ Version __VERSION__)",
                       "__PROGRAM__", $PRG,
                       "__VERSION__", $VER)."</FONT><BR>\n";
	print "<HR WIDTH=80%>";

	push( @cols, gettext("Module") );
	push( @cols, gettext("Version") );

	print $query->startTable( COLS=>[ @cols ],
				  WIDTH=>"90%",
				  TABLE_BGCOLOR=>"#000000",
				  TITLE_BGCOLOR=>"#DDCCFF" );

	foreach $i (@modules) {
		print $query->addTableLine( DATA=>[$i,$versions->{$i}],
							COLOR=>"#000000");
	}

	print $query->endTable();

	closePage();
}

1;

