/[informatika.old]/html/mreze.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

Annotation of /html/mreze.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Tue Apr 24 13:57:19 2001 UTC (22 years, 11 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
promjene

1 dpavlin 1.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 dpavlin 1.4 where osobe.id=status.osoba_id and
16 dpavlin 1.1 umrezavanje and
17 dpavlin 1.2 status_tip_id <= 9 and
18 dpavlin 1.1 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    

  ViewVC Help
Powered by ViewVC 1.1.26