/[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.2 - (hide annotations)
Tue Jul 11 13:45:06 2000 UTC (23 years, 9 months ago) by dpavlin
Branch: MAIN
Changes since 1.1: +2 -1 lines
otvoreni i ne-otvoreni

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

  ViewVC Help
Powered by ViewVC 1.1.26