170 |
|
|
171 |
|
|
172 |
} |
} |
173 |
|
$result=pg_Exec($conn,"insert into promjene_osobe |
174 |
|
select * from osobe where id=$id"); |
175 |
|
$promjene_osobe_oid=pg_getlastoid($result); |
176 |
$sql="update osobe set |
$sql="update osobe set |
177 |
ime='$ime',prezime='$prezime',zap_plive='$zap_plive', |
ime='$ime',prezime='$prezime',zap_plive='$zap_plive', |
178 |
sifra='$sifra', org_jed_id=$org_jed_id, |
sifra='$sifra', org_jed_id=$org_jed_id, |
190 |
if ($result) { |
if ($result) { |
191 |
$warn.="<p>Podaci su promjenjeni..."; |
$warn.="<p>Podaci su promjenjeni..."; |
192 |
$result=pg_Exec($conn,"insert into status (osoba_id,kontakt_osoba_id,datum,status_tip_id) values ($id,$kontakt_osoba_id,'now'::datetime,2)"); |
$result=pg_Exec($conn,"insert into status (osoba_id,kontakt_osoba_id,datum,status_tip_id) values ($id,$kontakt_osoba_id,'now'::datetime,2)"); |
193 |
|
$status_oid=pg_getlastoid($result); |
194 |
|
$result=pg_Exec($conn,"select id from status where oid=$status_oid"); |
195 |
|
$row=pg_fetch_array($result,0); |
196 |
|
$result=pg_Exec($conn,"update promjene_osobe set status_id=$row[id] where oid=$promjene_osobe_oid"); |
197 |
|
|
198 |
} else { |
} else { |
199 |
$warn.="<p>Greška kod mijenjanja podataka"; |
$warn.="<p>Greška kod mijenjanja podataka"; |