--- print/izvjestaj.pl 2000/04/27 12:21:29 1.3 +++ print/izvjestaj.pl 2000/05/10 08:19:39 1.4 @@ -7,6 +7,8 @@ use DBI; use POSIX qw(strftime); +$debug++ if ($ARGV[0] eq "-d"); + print STDERR "Debug mod: output je u /tmp/debug*\n" if ($debug); my $currdate = strftime "%d.%m.%Y %H:%M:%S", localtime; @@ -51,7 +53,7 @@ my @osoba_id_za_print; while (my ($osoba_id,$status_tip_id) = $sth->fetchrow_array() ) { - if ($status_tip_id == 5) { # print + if ($status_tip_id == 5 || $status_tip_id == 8 ) { # print/umrežavanje push @osoba_id_za_print,$osoba_id; } } @@ -102,7 +104,13 @@ if ($arr[12] == 0) { $mreza='umreženo'; } else { - $mreza='potrebno umrežavanje'; + my $rows = $dbh->do("select max(status_tip_id) from status + where osoba_id = $arr[0] and status_tip_id=8") || die $dbh->errstr(); + if ($rows > 0) { + $mreza='umrežavanje obavljeno'; + } else { + $mreza='potrebno umrežavanje'; + } } print HTML " $arr[7] $mrezaž-$arr[11]$arr[8] / $arr[9] / $arr[10]\n"; $rbr++;