/[informatika.old]/print/izvjestaj.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /print/izvjestaj.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dpavlin, Thu Apr 27 12:21:29 2000 UTC revision 1.4 by dpavlin, Wed May 10 08:19:39 2000 UTC
# Line 7  my $debug=0; Line 7  my $debug=0;
7  use DBI;  use DBI;
8  use POSIX qw(strftime);  use POSIX qw(strftime);
9    
10    $debug++ if ($ARGV[0] eq "-d");
11    
12  print STDERR "Debug mod: output je u /tmp/debug*\n" if ($debug);  print STDERR "Debug mod: output je u /tmp/debug*\n" if ($debug);
13    
14  my $currdate = strftime "%d.%m.%Y %H:%M:%S", localtime;  my $currdate = strftime "%d.%m.%Y %H:%M:%S", localtime;
# Line 51  $sth->execute() || die $sth->errstr(); Line 53  $sth->execute() || die $sth->errstr();
53  my @osoba_id_za_print;  my @osoba_id_za_print;
54    
55  while (my ($osoba_id,$status_tip_id) = $sth->fetchrow_array() ) {  while (my ($osoba_id,$status_tip_id) = $sth->fetchrow_array() ) {
56          if ($status_tip_id == 5) {      # print          if ($status_tip_id == 5 || $status_tip_id == 8 ) { # print/umrežavanje
57                  push @osoba_id_za_print,$osoba_id;                  push @osoba_id_za_print,$osoba_id;
58          }          }
59  }  }
# Line 102  while (my @arr = $sth->fetchrow_array() Line 104  while (my @arr = $sth->fetchrow_array()
104          if ($arr[12] == 0) {          if ($arr[12] == 0) {
105                  $mreza='umreženo';                  $mreza='umreženo';
106          } else {          } else {
107                  $mreza='<b>potrebno umrežavanje</b>';                  my $rows = $dbh->do("select max(status_tip_id) from status
108                            where osoba_id = $arr[0] and status_tip_id=8") || die $dbh->errstr();
109                    if ($rows > 0) {
110                            $mreza='<i>umrežavanje obavljeno</i>';
111                    } else {
112                            $mreza='<b>potrebno umrežavanje</b>';
113                    }
114          }          }
115          print HTML "<tr$bgcol><td colspan=2>&nbsp;</td><td><small>$arr[7] $mreza</small></a><td><small>ž-$arr[11]</small></td><td colspan=2><small>$arr[8] / $arr[9] / $arr[10]</small></td></tr>\n";          print HTML "<tr$bgcol><td colspan=2>&nbsp;</td><td><small>$arr[7] $mreza</small></a><td><small>ž-$arr[11]</small></td><td colspan=2><small>$arr[8] / $arr[9] / $arr[10]</small></td></tr>\n";
116          $rbr++;          $rbr++;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26