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; |
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 |
} |
} |
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> </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> </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++; |