80 |
|
|
81 |
$instaliran=0; |
$instaliran=0; |
82 |
|
|
83 |
$result = pg_Exec ($conn, "select datum,opis,ime,prezime,status_tip_id as st |
$result = pg_Exec ($conn, "select status.id as status_id,datum,opis,ime,prezime,status_tip_id as st |
84 |
from status,kontakt_osobe,status_tip |
from status,kontakt_osobe,status_tip |
85 |
where kontakt_osoba_id=kontakt_osobe.id and status_tip_id=status_tip.id |
where kontakt_osoba_id=kontakt_osobe.id and status_tip_id=status_tip.id |
86 |
and osoba_id=$id order by datum"); |
and osoba_id=$id order by datum"); |
91 |
if ($nr > 0) { |
if ($nr > 0) { |
92 |
for ($i=0; $i<$nr; $i++) { |
for ($i=0; $i<$nr; $i++) { |
93 |
$row=pg_fetch_array($result,$i); |
$row=pg_fetch_array($result,$i); |
94 |
$statusi.="<tr ".bgcolor()."><td><small>$row[datum]</small></td><td>$row[opis]</td><td>$row[ime] $row[prezime]</td></tr>"; |
if ($row[st] != 2) { |
95 |
|
$statusi.="<tr ".bgcolor()."><td><small>$row[datum]</small></td><td>$row[opis]</td><td>$row[ime] $row[prezime]</td></tr>"; |
96 |
|
} else { |
97 |
|
$statusi.="<tr ".bgcolor()."><td><small>$row[datum]</small></td><td><a href=\"promjene.php?osoba_id=$id&status_id=$row[status_id]\">$row[opis]</a></td><td>$row[ime] $row[prezime]</td></tr>"; |
98 |
|
} |
99 |
if ($row[st] == 6) { $instaliran = 1; }; |
if ($row[st] == 6) { $instaliran = 1; }; |
100 |
} |
} |
101 |
} else { |
} else { |