--- db2gantt.cgi 2002/12/02 14:35:17 1.25 +++ db2gantt.cgi 2002/12/02 17:14:48 1.26 @@ -36,7 +36,6 @@ #--- no user servicable parts below this line -my $dbh = DBI->connect("DBI:Pg:dbname=gantt","","") || die $DBI::errstr; my $q=new CGI; my ($from_t,$to_t) = (time()-$int_t,time()); @@ -90,6 +89,9 @@ exit; } +# open DBI connection +my $dbh = DBI->connect("DBI:Pg:dbname=gantt","","") || die $DBI::errstr; + print "Content-type: text/html Cache-Control: max-age=60, must-revalidate @@ -251,6 +253,7 @@ "; my $sth = $dbh->prepare($sql) || die "sql: $sql ".$dbh->errstr; +print STDERR "sql: $sql\n" if ($debug); my %spec; # specification hash @@ -335,7 +338,10 @@ # init vars for next line ($fix_s,$fix_d) = (0,0); # init fix vars for bar - html_spec if ($curr_spec ne ""); + if ($curr_spec ne "") { + $curr_spec =~ s/ +/ /g; + html_spec; + } $curr_t = $from_t; # init timeline $curr_spec = $row->{specification}; @@ -428,10 +434,15 @@ # label and usage -$len_t = 50; # disable bar scaling print "
status | # | color |
---|---|---|
$status | ",$count{$status}*1," | ",bar($count{$status},$status)," |
Reload url(-relative=>1),"\">current or see help.