#!/usr/local/bin/perl
#use CGI;
use CGI qw/:push -nph/;
# Turn off buffering of stdout to get the Content-Type header flushed
$| = 1;
my $q = new CGI;
my $root = $q->param('r');
my $module = $q->param('m');
my $file = $q->param('f');
my $mapname = "MyMapName";
my $cvsgraph = "/opt/netscape/suitespot/docs/cgi-bin/cvsgraph";
my $cvsgraphconf = "/opt/netscape/suitespot/docs/cgi-bin/cvsgraph.conf";
# Cabecera
print "Content-Type: text/html\n\n";
print "\n";
print "
\n";
print " Gráfico de revisiones de '$file'\n";
print " \n";
print " \n";
print "\n";
print "\n";
print "\n";
print "Gráfico de revisiones de '$file'
\n";
# Mapa
my $arg9 = "-9'/cgi-bin/'";
my $arg0 = "-0'Rama:'";
my $arg1 = "-1'Revisión:'";
my $argM = "-M$mapname";
#print("$cvsgraph $arg0 $arg1 $arg9 $argM -i -c $cvsgraphconf -r $root -m $module $file,v");
system("$cvsgraph $arg0 $arg1 $arg9 $argM -i -c $cvsgraphconf -r $root -m $module $file,v");
# Imagen y pie
print "
\n";
print "Seleccione las revisiones o ramas para mostrarlas\n";
print "
\n";
print "
\n";
print "\n";
print "Creado con CvsGraph versión 1.1.0\n";
print "\n";
print "\n";
print "\n";
print "\n";