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

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

revision 1.9 by dpavlin, Fri Jul 28 09:54:19 2000 UTC revision 1.11 by dpavlin, Fri Dec 21 10:58:19 2001 UTC
# Line 59  Line 59 
59          } elseif (isset($lookup) && isset($sifra)) {          } elseif (isset($lookup) && isset($sifra)) {
60    
61                  $warn="<i>Polja označena zvjezdicom (*) su obavezna</i>";                  $warn="<i>Polja označena zvjezdicom (*) su obavezna</i>";
62                  $conn_mreze = pg_connect("dbname=mreze user=dpavlin");                  $result=pg_Exec($conn,"select sifra,ime,prezime,sap2orgjed.pod_id,sap2orgjed.nad_id from sap,sap2orgjed where orgjed=sap2orgjed.sap and sifra='$sifra'");
                 $result=pg_Exec($conn_mreze,"select ime,prezime from iso_korisnik where sifra=$sifra");  
63                  if ($result && pg_numrows($result)>0) {                  if ($result && pg_numrows($result)>0) {
64                          $row=pg_fetch_array($result,0);                          $row=pg_fetch_array($result,0);
65                          $ime=$row[ime];                          $ime=$row[ime];
66                          $prezime=$row[prezime];                          $prezime=$row[prezime];
67                            $nad_select=$row[nad_id];
68                            $pod_select="$row[nad_id] $row[pod_id]";
69                  } else {                  } else {
70                          $warn.="<br><b>Osoba sa šifrom $sifra nije pronađena!</b>";                          $warn.="<br><b>Osoba sa šifrom $sifra nije pronađena!</b>";
71                          $sifra=""; $ime=""; $prezime="";                          $sifra=""; $ime=""; $prezime="";
# Line 72  Line 73 
73  #               $what="insert-osoba";  #               $what="insert-osoba";
74    
75          } elseif ($what == "insert-osoba" && check_required()) {          } elseif ($what == "insert-osoba" && check_required()) {
76               $result=pg_Exec($conn,"select id,ime,prezime from osobe where sifra='$sifra'");               $result=pg_Exec($conn,"select id,ime,prezime from osobe where sifra='$sifra' and aktivna=true");
77               if (pg_numrows($result) > 0 && $zap_plive=="t") {               if (pg_numrows($result) > 0 && $zap_plive=="t") {
78                          $row=pg_fetch_array($result,0);                          $row=pg_fetch_array($result,0);
79                          $warn.="<p><big>Vaš podatak nije unešen zbog duple šifre radnika!</big>                          $warn.="<p><big>Vaš podatak nije unešen zbog duple šifre radnika!</big>

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26