8 |
|
|
9 |
if (! isset($datum)) { |
if (! isset($datum)) { |
10 |
|
|
11 |
$result = pg_Exec ($conn, " |
$sth = $dbh->prepare(" |
12 |
select datum,count(*) as nr from izvjestaji group by datum |
select datum,count(*) as nr from izvjestaji group by datum |
13 |
order by datum desc |
order by datum desc |
14 |
"); |
"); |
15 |
|
$sth->execute(); |
16 |
|
|
17 |
print ' |
print ' |
18 |
<h1>Izvještaji o otvaranju računa</h1> |
<h1>Izvještaji o otvaranju računa</h1> |
21 |
<tr bgcolor="#e0e0f0"><th>datum izvještaja</th><th>broj otvorenih računa</th></tr> |
<tr bgcolor="#e0e0f0"><th>datum izvještaja</th><th>broj otvorenih računa</th></tr> |
22 |
'; |
'; |
23 |
|
|
24 |
for ($k=0; $k < pg_numrows($result); $k++) { |
while ($arr=$sth->fetchrow_array()) { |
|
$arr=pg_fetch_row($result,$k); |
|
25 |
print "<tr".bgcolor()."><td><a href=\"$PHP_SELF?datum=".rawurlencode($arr[0])."\">$arr[0]</a></td> |
print "<tr".bgcolor()."><td><a href=\"$PHP_SELF?datum=".rawurlencode($arr[0])."\">$arr[0]</a></td> |
26 |
<td align=center>$arr[1]</td></tr>\n"; |
<td align=center>$arr[1]</td></tr>\n"; |
27 |
} |
} |
32 |
} else { // isset(datum) |
} else { // isset(datum) |
33 |
|
|
34 |
|
|
35 |
$result = pg_Exec ($conn, " |
$sth = $dbh->prepare(" |
36 |
select osobe.id,ime,prezime,tel,lokacije.naziv, |
select osobe.id,ime,prezime,tel,lokacije.naziv, |
37 |
org_jed.naziv,org_pod_jed.pod_naziv, |
org_jed.naziv,org_pod_jed.pod_naziv, |
38 |
lok_racunala,objekt,kat,soba,z_rac,umrezavanje, |
lok_racunala,objekt,kat,soba,z_rac,umrezavanje, |
46 |
order by lokacije.naziv,org_jed.naziv,osobe.id |
order by lokacije.naziv,org_jed.naziv,osobe.id |
47 |
|
|
48 |
"); |
"); |
49 |
|
$sth->execute(); |
50 |
|
|
51 |
print ' |
print ' |
52 |
<h1>Izvještaj o otvaranju računa</h1> |
<h1>Izvještaj o otvaranju računa</h1> |
63 |
$rbr=1; |
$rbr=1; |
64 |
$podeseno=" "; |
$podeseno=" "; |
65 |
|
|
66 |
for ($k=0; $k < pg_numrows($result); $k++) { |
while ($arr=$sth->fetchrow_array()) { |
|
$arr=pg_fetch_row($result,$k); |
|
67 |
|
|
68 |
if ($lokacija != $arr[4]) { |
if ($lokacija != $arr[4]) { |
69 |
$lokacija=$arr[4]; |
$lokacija=$arr[4]; |
70 |
print "<tr bgcolor=#000000><td colspan=6><font size=+1 color=#ffffff>$lokacija</font></td></tr>"; |
print "<tr bgcolor=#000000><td colspan=6><font size=+1 color=#ffffff>$lokacija</font></td></tr>"; |
71 |
} |
} |
72 |
|
|
73 |
print "<tr".bgcolor()."><td>$rbr</td><td><a href=\"http://support.pliva.hr/obavijest.php?id=$arr[0]\">$arr[0]</a></td><td>$arr[1] $arr[2]</td><td>tel: $arr[3]</td><td><small>$arr[4]</small></td><td>$arr[5]<br>$arr[6]</td></tr>\n"; |
print "<tr".bgcolor()."><td>$rbr</td><td><a href=\"obavijest.php?id=$arr[0]\">$arr[0]</a></td><td>$arr[1] $arr[2]</td><td>tel: $arr[3]</td><td><small>$arr[4]</small></td><td>$arr[5]<br>$arr[6]</td></tr>\n"; |
74 |
|
|
75 |
|
|
76 |
if ($arr[12] == "f") { |
if ($arr[12] == "f") { |
77 |
$mreza='umreženo'; |
$mreza='umreženo'; |
78 |
} else { |
} else { |
79 |
$result2 = pg_Exec ($conn, " |
$sth2 = $dbh->prepare(" |
80 |
select count(status_tip_id) as nr_of_status8 from status |
select count(status_tip_id) as nr_of_status8 from status |
81 |
where osoba_id = $arr[0] and status_tip_id=8"); |
where osoba_id = $arr[0] and status_tip_id=8"); |
82 |
$row2=pg_fetch_array($result2,0); |
$sth2->execute(); |
83 |
|
$row2=$sth2->fetchrow_hash(); |
84 |
if ($row2["nr_of_status8"] > 0) { |
if ($row2["nr_of_status8"] > 0) { |
85 |
$mreza='<i>umrežavanje obavljeno</i>'; |
$mreza='<i>umrežavanje obavljeno</i>'; |
86 |
} else { |
} else { |
88 |
} |
} |
89 |
} |
} |
90 |
|
|
91 |
$result3 = pg_Exec ($conn, " |
$sth3 = $dbh->prepare(" |
92 |
select count(status_tip_id) as nr_of_status6 from status |
select count(status_tip_id) as nr_of_status6 from status |
93 |
where osoba_id = $arr[0] and status_tip_id=6"); |
where osoba_id = $arr[0] and status_tip_id=6"); |
94 |
$row3=pg_fetch_array($result3,0); |
$sth3->execute(); |
95 |
|
$row3=$sth3->fetchrow_hash(); |
96 |
if ($row3["nr_of_status6"] > 0) { |
if ($row3["nr_of_status6"] > 0) { |
97 |
$podeseno=show_bool("t"); |
$podeseno=show_bool("t"); |
98 |
} else { |
} else { |
99 |
$podeseno="<a href=\"http://support.pliva.hr/obavijest.php?id=$arr[0]\">".show_bool("f")."</a>"; |
$podeseno="<a href=\"obavijest.php?id=$arr[0]\">".show_bool("f")."</a>"; |
100 |
} |
} |
101 |
|
|
102 |
# print "<tr><td colspan=6>$arr[12] | ".$row2["nr_of_status8"]." | ".$row3["nr_of_status6"]."</td></tr>\n"; |
# print "<tr><td colspan=6>$arr[12] | ".$row2["nr_of_status8"]." | ".$row3["nr_of_status6"]."</td></tr>\n"; |