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

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

revision 1.4 by dpavlin, Fri Apr 14 08:23:26 2000 UTC revision 1.5 by dpavlin, Tue May 9 11:10:01 2000 UTC
# Line 47  Line 47 
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                  ';                  ';
# Line 91  Line 93 
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":
# Line 121  Line 122 
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>

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.26