#!/usr/bin/perl # # $Id$ # Copyright 2004-2006 - Michael Sinz # # A simple display of the invocation of this CGI # use CGI; $cgi = new CGI; my $path = $cgi->path_info(); my $p2 = $cgi->param('param2'); my $p3 = $cgi->param('param3'); my @params = $cgi->param; ## Assume things are not good... my $color = '#FF0000'; my $status = 'Failed!'; if ((defined $p2) && (defined $p3) && (@params == 3) && ($path =~ m:^/(.*)/test\.html$:)) { ## Looking better, we have some form of complete path_info() ## And we have parameter #2 and there are exactly 3 parameters. $color = '#FFFF00'; $status = 'Warning!'; my $part = $1; if (($part eq $p2) && ($path eq $p3)) { $color = '#00DD00'; $status = 'Working'; } } print $cgi->header('-Cache-Control' => 'no-cache' , '-type' => 'text/html'); print '' , '' , '
' , ''
, '
| '
, ' |