--- html/ic.php 2000/06/28 12:39:01 1.1
+++ html/ic.php 2000/10/05 11:48:55 1.6
@@ -6,64 +6,158 @@
include("inc/bgcolor.inc");
include("inc/radio.inc");
+if (!isset($datum) and !isset($lokacija)) {
+
$result = pg_Exec ($conn, "
- select osobe.id as id,osobe.ime as ime,osobe.prezime as prezime,
- max(status_tip_id) as mxstat,
- (max(status_tip_id) = 6) as podesen,
- max(kontakt_osobe.ime||' '||kontakt_osobe.prezime) as stwho
- from osobe,status,kontakt_osobe,status_tip
- where osobe.id=osoba_id and
- umrezavanje and
- status_tip_id > 3 and status_tip_id <= 6 and
- status_tip_id = status_tip.id and
- status.kontakt_osoba_id=kontakt_osobe.id
- group by
- osobe.ime,osobe.prezime,osobe.id,
- umrezavanje
- order by osobe.id
+ select datum,count(*) as nr from izvjestaji group by datum
+ order by datum desc
");
+print '
+
Izvještaji o otvaranju računa
+
+datum izvještaja | broj otvorenih računa |
+';
+
+for ($k=0; $k < pg_numrows($result); $k++) {
+ $arr=pg_fetch_row($result,$k);
+ print "$arr[0] |
+ $arr[1] |
\n";
+}
+
+print '
';
+
print "
- Prikaz zahtjeva koji traže podešavanje
-
-
-
- zah. | ime i prezime | podešen |
-
+
+";
+
+} else { // isset(datum)
+ print "Izvještaj o otvaranju računa
";
+
+ if (isset($datum)) {
+ $result = pg_Exec ($conn, "
+ select osobe.id,ime,prezime,tel,lokacije.naziv,
+ org_jed.naziv,org_pod_jed.pod_naziv,
+ lok_racunala,objekt,kat,soba,z_rac,umrezavanje,
+ kontakt_osobe.e_mail,podesavanje
+ from osobe
+ where osobe.id in ( select osoba_id from izvjestaji where datum='$datum' )
+ and lokacija_id=lokacije.id
+ and org_jed_id=org_jed.id
+ and org_pod_jed_id=org_pod_jed.pod_id
+ and podesavanje=true
+ and kontakt_osobe.id=kontakt_osoba_id
+ order by lokacije.naziv,org_jed.naziv,osobe.id
+ ");
+ print "Izvještaj za: $datum
";
} else {
- print "
-
- $row[id] |
- $row[ime] $row[prezime] |
- ".show_bool($row[podesen])." |
-
-
- |
-
";
+ $sql="select osobe.id,ime,prezime,tel,lokacije.naziv,
+ org_jed.naziv,org_pod_jed.pod_naziv,
+ lok_racunala,objekt,kat,soba,z_rac,umrezavanje,
+ kontakt_osobe.e_mail,podesavanje
+ from osobe
+ where lokacija_id = $lokacija
+ and lokacija_id=lokacije.id
+ and org_jed_id=org_jed.id
+ and org_pod_jed_id=org_pod_jed.pod_id
+ and podesavanje=true
+ and kontakt_osobe.id=kontakt_osoba_id
+ order by lokacije.naziv,org_jed.naziv,osobe.id
+ ";
+# print "$sql
";
+ $result = pg_Exec ($conn, "$sql");
}
+
+
+print '
+
+rbr | id | ime i prezime | tel | lokacija | org.jed |
+podešeno | lokacija računala, mreža | ž | objekat / kat / soba |
+';
+
+$lokacija="";
+$mreza="";
+$rbr=1;
+$podeseno=" ";
+
+for ($k=0; $k < pg_numrows($result); $k++) {
+ $arr=pg_fetch_row($result,$k);
+
+ if ($lokacija != $arr[4]) {
+ $lokacija=$arr[4];
+ print "$lokacija |
";
+ }
+
+ $out="$rbr | $arr[0] | $arr[1] $arr[2] | tel: $arr[3] | $arr[4] | $arr[5] $arr[6] |
\n";
+
+
+ if ($arr[12] == "f") {
+ $mreza='umreženo';
+ } else {
+ $result2 = pg_Exec ($conn, "
+ select count(status_tip_id) as nr_of_status8 from status
+ where osoba_id = $arr[0] and status_tip_id=8");
+ $row2=pg_fetch_array($result2,0);
+ if ($row2["nr_of_status8"] > 0) {
+ $mreza='umrežavanje obavljeno';
+ } else {
+ $mreza='potrebno umrežavanje';
+ }
+ }
+
+ $result3 = pg_Exec ($conn, "
+ select count(status_tip_id) as nr_of_status6 from status
+ where osoba_id = $arr[0] and status_tip_id=6");
+ $row3=pg_fetch_array($result3,0);
+ if ($row3["nr_of_status6"] > 0) {
+ $podeseno_html=show_bool("t");
+ $podeseno=1;
+ } else {
+ $podeseno_html="".show_bool("f")."";
+ $podeseno=0;
+ }
+
+# print "$arr[12] | ".$row2["nr_of_status8"]." | ".$row3["nr_of_status6"]." |
\n";
+
+ $out.="$podeseno_html | $arr[7] $mreza | ž-$arr[11] | $arr[8] / $arr[9] / $arr[10] |
\n";
+
+ if ($preskoci_podesene & ! $podeseno || ! $preskoci_podesene) {
+ print "$out";
+ }
+ $rbr++;
+
}
+print "
";
-print "
- Povratak na početnu stranicu.
- ";
+} // isset(datum)
+
+
+print "
Povratak na ";
+if (isset($HTTP_REFERER)) {
+ print "stranicu sa koje ste došli ili ";
+}
+print "početnu stranicu.";
include("inc/footer.inc");