1 |
<? |
2 |
|
3 |
include("inc/head.inc"); |
4 |
include("inc/prava.inc"); |
5 |
include("inc/show_bool.inc"); |
6 |
include("inc/bgcolor.inc"); |
7 |
include("inc/radio.inc"); |
8 |
|
9 |
$result = pg_Exec ($conn, " |
10 |
select osobe.id as id,osobe.ime as ime,osobe.prezime as prezime, |
11 |
max(status_tip_id) as mxstat, |
12 |
(max(status_tip_id) = 8) as umrezen, |
13 |
max(kontakt_osobe.ime||' '||kontakt_osobe.prezime) as stwho |
14 |
from osobe,status,kontakt_osobe,status_tip |
15 |
where osobe.id=osoba_id and |
16 |
umrezavanje and |
17 |
status_tip_id > 3 and status_tip_id <= 9 and |
18 |
status_tip_id = status_tip.id and |
19 |
status.kontakt_osoba_id=kontakt_osobe.id |
20 |
group by |
21 |
osobe.ime,osobe.prezime,osobe.id, |
22 |
umrezavanje |
23 |
order by osobe.id |
24 |
"); |
25 |
|
26 |
print " |
27 |
<h1>Prikaz zahtjeva koji tra¾e umre¾avanje</h1> |
28 |
<form action=$PHP_SELF> |
29 |
<table border=0> |
30 |
<tr><td> |
31 |
<small> |
32 |
".radio("samo_neumrezene",1,$samo_neumrezene,0)." prika¾i sve zahtjeve |
33 |
<br>".radio("samo_neumrezene",0,$samo_neumrezene,1)." prika¾i samo neumre¾ene |
34 |
</small> |
35 |
</td><td> |
36 |
<input type=submit value=\"Odaberi\"> |
37 |
</td><tr> |
38 |
</table> |
39 |
</form> |
40 |
|
41 |
<table border=0> |
42 |
<tr><th>zah.</th><th>ime i prezime</th><th>umre¾en</th> |
43 |
</tr> |
44 |
|
45 |
"; |
46 |
for ($k=0; $k < pg_numrows($result); $k++) { |
47 |
$row=pg_fetch_array($result,$k); |
48 |
if (!$samo_neumrezene && $row[mxstat] == 8) { |
49 |
// null == skip this one! |
50 |
} else { |
51 |
print "<tr".bgcolor()."> |
52 |
<!-- $row[mxstat] --> |
53 |
<td>$row[id]</td> |
54 |
<td>$row[ime] $row[prezime]</td> |
55 |
<td>".show_bool($row[umrezen])."</td> |
56 |
<td><a href=\"obavijest.php?id=$row[id]\"> |
57 |
<img src=pix/text.gif border=0 |
58 |
alt=\"Prika¾i sve podatke o ovom zahtjevu\"></a> |
59 |
</td> |
60 |
</tr>"; |
61 |
} |
62 |
} |
63 |
|
64 |
print "</table> |
65 |
<p>Povratak na <a href=\"index.php\">poèetnu stranicu</a>. |
66 |
"; |
67 |
|
68 |
include("inc/footer.inc"); |
69 |
|
70 |
?> |
71 |
|