--- html/obavijest.php 2000/07/27 08:35:35 1.15 +++ html/obavijest.php 2000/08/02 13:10:00 1.15.2.2 @@ -6,8 +6,9 @@ include("inc/bgcolor.inc"); if (isset($kontakt_osoba_id) && $what!="relogin") { - $result = pg_Exec ($conn, "select ime,prezime,passwd,prava from kontakt_osobe where aktivna=true and id=$kontakt_osoba_id"); - $korow=pg_fetch_array($result,0); + $sth = $dbh->prepare("select ime,prezime,passwd,prava from kontakt_osobe where aktivna=true and id=$kontakt_osoba_id"); + $sth->execute(); + $korow=$sth->fetchrow_hash(); # print "--$korow[passwd] | $md5_passwd | $passwd "; $prava=$korow[prava]; print "Trenutno ste prijavljeni kao $korow[ime] $korow[prezime], ako je to krivo odaberite ovaj link."; @@ -35,21 +36,21 @@ include("inc/obavjest-forma.inc"); } elseif (isset($id) && $what!="auth") { - -$result = pg_Exec ($conn, " +$sth = $dbh->prepare(" select osobe.id as id,ime,prezime,tel,lokacije.naziv as lok,sifra, org_jed.naziv as orgjed,org_pod_jed.pod_naziv as orgpodjed, lok_racunala as lokrac,objekt,kat,soba,z_rac,podesavanje, umrezavanje,shell - from osobe + from osobe,lokacije,org_jed,org_pod_jed where osobe.id=$id and lokacija_id=lokacije.id and org_jed_id=org_jed.id and org_pod_jed_id=org_pod_jed.pod_id order by lokacije.naziv,org_jed.naziv "); -if (pg_numrows($result) > 0) { - $row=pg_fetch_array($result,0); +$sth->execute(); + +if ($row=$sth->fetchrow_hash()) { print "
Nema podataka o korisničkom računu"; } -$result = pg_Exec ($conn, "select racuni.login as login, +$sth = $dbh->prepare("select racuni.login as login, racuni.passwd as passwd,e_mail.alias as email + from racuni,e_mail where racuni.osoba_id=$id and e_mail.osoba_id=$id"); +$sth->execute(); -if (pg_numrows($result) > 0) { - $row=pg_fetch_array($result,0); +if ($row=$sth->fetchrow_hash()) { print "