6 |
$from=0; |
$from=0; |
7 |
} |
} |
8 |
|
|
9 |
if (! isset($kontakt_osoba_id) || ! is_int($kontakt_osoba_id)) { |
if (! isset($kontakt_osoba_id) || ! intval($kontakt_osoba_id)!=0) { |
10 |
echo '<form method="post" action="'.$PHP_SELF.'?'.$QUERY_STRING.'" name="forma"> |
echo '<form method="post" action="'.$PHP_SELF.'?'.$QUERY_STRING.'" name="forma"> |
11 |
Odaberite Vaše ime i prezime: |
Odaberite Vaše ime i prezime: |
12 |
<select name="kontakt_osoba_id">'; |
<select name="kontakt_osoba_id">'; |
47 |
if (! isset($sql_upit)) { $sql_upit="novi_na_vrh"; } |
if (! isset($sql_upit)) { $sql_upit="novi_na_vrh"; } |
48 |
|
|
49 |
echo ' <form method="post" action="'.$PHP_SELF.'?'.$QUERY_STRING.'" name="forma2"> |
echo ' <form method="post" action="'.$PHP_SELF.'?'.$QUERY_STRING.'" name="forma2"> |
50 |
<input type=submit value="Prikaži"> |
Upišite ime ili prezime po kojem želite pretraživati: |
51 |
|
<input type=text name=imepr size=40 value="'.$imepr.'"> |
52 |
|
<br><input type=submit value="Prikaži"> |
53 |
slogove |
slogove |
54 |
<select name="sql_upit"> |
<select name="sql_upit"> |
55 |
'; |
'; |
93 |
"; |
"; |
94 |
$sql_order="order by id"; |
$sql_order="order by id"; |
95 |
|
|
|
|
|
96 |
if (isset($sql_upit)) { |
if (isset($sql_upit)) { |
97 |
switch($sql_upit) { |
switch($sql_upit) { |
98 |
case "samo_moji": |
case "samo_moji": |
122 |
$sql_polja.=",umrezavanje"; |
$sql_polja.=",umrezavanje"; |
123 |
} |
} |
124 |
|
|
125 |
|
if (isset($imepr) && $imepr != "") { |
126 |
|
$sql_where.=" and ( upper(toczs(osobe.ime)) like upper(toczs('$imepr')) or upper(toczs(osobe.prezime)) like upper(toczs('$imepr')) )"; |
127 |
|
} |
128 |
|
|
129 |
$sql="select $sql_polja from $sql_tablice where $sql_where $sql_order limit $on_page,$from"; |
$sql="select $sql_polja from $sql_tablice where $sql_where $sql_order limit $on_page,$from"; |
130 |
|
|
131 |
# echo "<pre>$sql</pre>"; |
# echo "<pre>$sql</pre>"; |
132 |
|
# echo "<pre>$sql_where</pre>"; |
133 |
$result = pg_Exec ($conn, "$sql"); |
$result = pg_Exec ($conn, "$sql"); |
134 |
|
|
135 |
echo "<table border=1> |
echo "<table border=1> |