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

Contents of /html/promjene.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Fri Jan 25 14:47:46 2002 UTC (21 years ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +6 -10 lines
sap organizacijske jedinice

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/sap_org_jed.inc");
8
9 $nresult = pg_Exec ($conn, "
10 select osobe.id as id,ime,prezime,tel,lokacije.naziv as lok,sifra,
11 lok_racunala as lokrac,objekt,kat,soba,z_rac,podesavanje,
12 umrezavanje,shell
13 from osobe
14 where osobe.id=$osoba_id
15 and lokacija_id=lokacije.id
16 ");
17
18 $oresult = pg_Exec ($conn, "
19 select osobe.id as id,ime,prezime,tel,lokacije.naziv as lok,sifra,
20 lok_racunala as lokrac,objekt,kat,soba,z_rac,podesavanje,
21 umrezavanje,shell
22 from promjene_osobe
23 where promjene_osobe.status_id=$status_id
24 and lokacija_id=lokacije.id
25 ");
26
27 if (pg_numrows($nresult) > 0 && pg_numrows($oresult) > 0) {
28 $nrow=pg_fetch_array($nresult,0);
29 $orow=pg_fetch_array($oresult,0);
30
31 function cmptd($old,$new) {
32 if ($old == $new) {
33 return "<td>$new</td>";
34 } else {
35 return "<td bgcolor=#eeeeee>$old<br>$new</td>";
36 }
37 }
38
39 print "
40 <h1>Podaci o promjenama podataka o osobi</h1>
41
42 <table>
43
44 <tr><td><small>Ime i prezime:</small></td>
45 ".cmptd("$orow[ime] $orow[prezime]","$nrow[ime] $nrow[prezime]")."
46 ".cmptd("<small>Tel:</small> $orow[tel]","<small>Tel:</small> $nrow[tel]")."
47 </tr>
48 <tr><td rowspan=2><small>Org. jedinica:</small></td>
49 ".cmptd(sap_org_jed($orow[sifra]),sap_org_jed($nrow[sifra]))."
50 ".cmptd("<small>©ifra radnika:</small> $orow[sifra]","<small>©ifra radnika:</small> $nrow[sifra]")."</tr>
51 <tr><td></td>
52 <td><small>Lokacija raèunala:</small></td></tr>
53 <tr><td><small>Lokacija:</small></td>
54 ".cmptd("$orow[lok]","$nrow[lok]")."
55 ".cmptd("$orow[lokrac]","$nrow[lokrac]")."</tr>
56 <tr><td><small>Objekt/soba/kat:</small></td>
57 ".cmptd("$orow[objekt] / $orow[soba] / $orow[kat]","$nrow[objekt] / $nrow[soba] / $nrow[kat]")."
58 ".cmptd("<small>® raèunala:</small> $orow[z_rac]","<small>® raèunala:</small> $nrow[z_rac]")."</tr>
59 <tr>".cmptd("Shell: ".show_bool($orow[shell]),"Shell: ".show_bool($nrow[shell]))."
60 ".cmptd("Umre¾avanje: ".show_bool($orow[umrezavanje]),"Umre¾avanje: ".show_bool($nrow[umrezavanje]))."
61 ".cmptd("Pode¹avanje: ".show_bool($orow[podesavanje]),"Pode¹avanje: ".show_bool($nrow[podesavanje]))."
62
63 </table>
64
65 <p>
66 <small>Broj trenutnog zahtjeva: $osoba_id</small>
67 ";
68
69 } else { // pg_numrows($result) > 0
70 print "<p><big>Nema podataka o promjeni ovog zapisa!</big>
71 <p><small>Ovo <b>nije</b> poruka o gre¹ci, veæ samo
72 obavijest.
73 <br>Voðenje promjena
74 zahtjeva ne postoji jednako dugo koliko i podno¹enje zahtjevi,
75 tako da za zahtjeve starije od kraja lipnja nemamo podatke
76 o promjenama</small>
77 ";
78 } // pg_numrows($result) > 0
79
80 print "<p>Povratak na ";
81 if (isset($HTTP_REFERER)) {
82 print "<a href=\"$HTTP_REFERER\">stranicu sa koje ste do¹li</a> ili ";
83 }
84 print "<a href=\"/\">poèetnu stranicu</a>.";
85
86
87 include("inc/footer.inc");
88
89 ?>
90

  ViewVC Help
Powered by ViewVC 1.1.26