/[informatika.old]/html/ic.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /html/ic.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Tue Jul 11 13:45:29 2000 UTC revision 1.3 by dpavlin, Tue Jul 11 13:49:15 2000 UTC
# Line 6  include("inc/show_bool.inc"); Line 6  include("inc/show_bool.inc");
6  include("inc/bgcolor.inc");  include("inc/bgcolor.inc");
7  include("inc/radio.inc");  include("inc/radio.inc");
8    
9    if (! isset($datum)) {
10    
11    $result = pg_Exec ($conn, "
12            select datum,count(*) as nr from izvjestaji group by datum
13            order by datum
14            ");
15    
16    print '
17    <h1>Izvještaji o otvaranju računa</h1>
18    <table>
19    <table border=1>
20    <tr bgcolor="#e0e0f0"><th>datum izvještaja</th><th>broj otvorenih računa</th></tr>
21    ';
22    
23    for ($k=0; $k < pg_numrows($result); $k++) {
24            $arr=pg_fetch_row($result,$k);
25            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";
27    }
28    
29    print '</table>';
30    
31    
32    } else {        // isset(datum)
33    
34    
35  $result = pg_Exec ($conn, "  $result = pg_Exec ($conn, "
36          select osobe.id as id,osobe.ime as ime,osobe.prezime as prezime,          select osobe.id,ime,prezime,tel,lokacije.naziv,
37                  max(status_tip_id) as mxstat,                  org_jed.naziv,org_pod_jed.pod_naziv,
38                  (max(status_tip_id) = 6) as podesen,                  lok_racunala,objekt,kat,soba,z_rac,umrezavanje,
39                  max(kontakt_osobe.ime||' '||kontakt_osobe.prezime) as stwho                  kontakt_osobe.e_mail,podesavanje
40          from osobe,status,kontakt_osobe,status_tip          from osobe
41          where osobe.id=osoba_id and          where osobe.id in ( select osoba_id from izvjestaji where datum='$datum' )
42                  umrezavanje and                  and lokacija_id=lokacije.id and org_jed_id=org_jed.id
43                  status_tip_id > 3 and status_tip_id <= 6 and                  and org_pod_jed_id=org_pod_jed.pod_id
44                  status_tip_id = status_tip.id and                  and podesavanje=true
45                  status.kontakt_osoba_id=kontakt_osobe.id                  and kontakt_osobe.id=kontakt_osoba_id
46          group by          order by lokacije.naziv,org_jed.naziv,osobe.id
47                  osobe.ime,osobe.prezime,osobe.id,  
                 umrezavanje  
         order by osobe.id  
48          ");          ");
49    
50  print "  print '
51          <h1>Prikaz zahtjeva koji traže podešavanje</h1>  <h1>Izvještaj o otvaranju računa</h1>
52          <form action=$PHP_SELF>  
53          <table border=0>  <p>Izvještaj za: '.$datum.'<p>
54          <tr><td>  
55          <small>  <table border=1>
56          ".radio("samo_nepodesene",1,$samo_nepodesene,0)." prikaži sve zahtjeve  <tr bgcolor="#e0e0f0"><th>rbr</th><th>id</th><th>ime i prezime</th><th>tel</th><th>lokacija</th><th>org.jed</th></tr>
57          <br>".radio("samo_nepodesene",0,$samo_nepodesene,1)." prikaži samo nepodešene  <tr bgcolor="#e0e0f0"><th></th><th></th><th>lokacija računala, mreža</th><th>ž</th><th colspan=2>objekat / kat / soba</th></tr>
58          </small>  ';
59          </td><td>  
60          <input type=submit value=\"Odaberi\">  $lokacija="";
61          </td><tr>  $mreza="";
62          </table>  $rbr=1;
         </form>  
   
         <table border=0>  
         <tr><th>zah.</th><th>ime i prezime</th><th>podešen</th>  
         </tr>  
63    
         ";  
64  for ($k=0; $k < pg_numrows($result); $k++) {  for ($k=0; $k < pg_numrows($result); $k++) {
65          $row=pg_fetch_array($result,$k);          $arr=pg_fetch_row($result,$k);
66          if (!$samo_nepodesene && $row[mxstat] == 8) {  
67                  // null == skip this one!          if ($lokacija != $arr[4]) {
68                    $lokacija=$arr[4];
69                    print "<tr bgcolor=#000000><td colspan=6><font size=+1 color=#ffffff>$lokacija</font></td></tr>";
70            }
71            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";
72            if ($arr[12] == 0) {
73                    $mreza='umreženo';
74          } else {          } else {
75          print "<tr".bgcolor().">                  $result2 = pg_Exec ($conn, "
76                  <!-- $row[mxstat] -->                          select count(status_tip_id) as nr_of_status8 from status
77                  <td>$row[id]</td>                          where osoba_id = $arr[0] and status_tip_id=8");
78                  <td>$row[ime] $row[prezime]</td>                  $row2=pg_fetch_row($result2,0);
79                  <td>".show_bool($row[podesen])."</td>                  if ($row2["nr_of_status8"] > 0) {
80                  <td><a href=\"obavijest.php?id=$row[id]\">                          $mreza='<i>umrežavanje obavljeno</i>';
81                          <img src=pix/text.gif border=0                  } else {
82                          alt=\"Prikaži sve podatke o ovom zahtjevu\"></a>                          $mreza='<b>potrebno umrežavanje</b>';
83                  </td>                  }
                 </tr>";  
84          }          }
85            print "<tr".bgcolor()."><td colspan=2>&nbsp;</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";
86            $rbr++;
87    
88  }  }
89    print "</table>";
90    
91    }               // isset(datum)
92    
93    
94  print "</table>  print "<p>Povratak na <a href=\"index.php\">početnu stranicu</a>.";
         <p>Povratak na <a href=\"index.php\">početnu stranicu</a>.  
         ";  
95    
96  include("inc/footer.inc");  include("inc/footer.inc");
97    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26