--- html/lista.php 2000/06/28 07:27:16 1.10
+++ html/lista.php 2001/10/03 15:00:37 1.15
@@ -2,9 +2,11 @@
include("inc/head.inc");
include("inc/prava.inc");
+ include("inc/checkbox.inc");
if (! isset($from)) {
$from=0;
+ $podesavanje="on"; $umrezavanje="on";
}
if (! isset($kontakt_osoba_id) || ! intval($kontakt_osoba_id)!=0) {
@@ -38,13 +40,6 @@
echo ">$text";
}
- function checkbox($name,$current) {
- echo "";
- }
if (! isset($sql_upit)) { $sql_upit="novi_na_vrh"; }
@@ -81,8 +76,6 @@
$on_page=50;
- $conn = pg_connect("dbname=informatika user=dpavlin");
-
$sql_polja="osobe.id as id,osobe.ime as ime,
osobe.prezime as prezime,
org_jed.naziv||'
'||org_pod_jed.pod_naziv||'' as orgjed,
@@ -90,9 +83,10 @@
e_mail,kontakt_osoba_id
";
$sql_tablice="osobe,org_jed,kontakt_osobe";
- $sql_where="org_jed.id=org_jed_id
- and org_pod_jed.pod_id=org_pod_jed_id
+ $sql_where="org_jed.id=osobe.org_jed_id
+ and org_pod_jed.pod_id=osobe.org_pod_jed_id
and kontakt_osoba_id=kontakt_osobe.id
+ and osobe.aktivna=true
";
$sql_order="order by id";
@@ -129,7 +123,7 @@
}
if (isset($imepr) && $imepr != "") {
- $sql_where.=" and ( upper(toczs(osobe.ime)) like upper(toczs('$imepr')) or upper(toczs(osobe.prezime)) like upper(toczs('$imepr')) )";
+ $sql_where.=" and osobe.aktivna=true and ( upper(toczs(osobe.ime)) like upper(toczs('$imepr')) or upper(toczs(osobe.prezime)) like upper(toczs('$imepr')) )";
}
$sql="select $sql_polja from $sql_tablice where $sql_where $sql_order limit $on_page,$from";