/[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.5 by dpavlin, Tue May 9 11:10:01 2000 UTC revision 1.11 by dpavlin, Thu Jun 29 09:26:56 2000 UTC
# Line 1  Line 1 
1  <?  <?
2    
3          include("inc/head.inc");          include("inc/head.inc");
4            include("inc/prava.inc");
5            include("inc/checkbox.inc");
6    
7          if (! isset($from)) {          if (! isset($from)) {
8                  $from=0;                  $from=0;
# Line 23  Line 25 
25                          <input type=submit value="Posebno označi moje zahtjeve">                          <input type=submit value="Posebno označi moje zahtjeve">
26                          </form>';                          </form>';
27          } else {          } else {
28                  $result = pg_Exec ($conn, "select ime,prezime,passwd from kontakt_osobe where aktivna=true and id=$kontakt_osoba_id");                  $result = pg_Exec ($conn, "select ime,prezime,passwd,prava from kontakt_osobe where aktivna=true and id=$kontakt_osoba_id");
29                  $row=pg_fetch_array($result,0);                  $row=pg_fetch_array($result,0);
30                  print "<small>Trenutno ste prijavljeni kao $row[ime] $row[prezime], ako je to krivo odaberite <a href=\"$PHP_SELF?what=relogin\">ovaj link</a>.</small>";                  print "<small>Trenutno ste prijavljeni kao $row[ime] $row[prezime], ako je to krivo odaberite <a href=\"$PHP_SELF?what=relogin\">ovaj link</a>.</small>";
31                    $prava=$row[prava];
32          }          }
33    
34          function option($value,$text,$current) {          function option($value,$text,$current) {
# Line 36  Line 39 
39                  echo ">$text</option>";                  echo ">$text</option>";
40          }          }
41    
         function checkbox($name,$current) {  
                 echo "<input type=\"checkbox\" name=\"$name\"";  
                 if (isset($current)) {  
                         echo " checked";  
                 }  
                 echo ">";  
         }  
42    
43          if (! isset($sql_upit)) { $sql_upit="novi_na_vrh"; }          if (! isset($sql_upit)) { $sql_upit="novi_na_vrh"; }
44    
# Line 59  Line 55 
55                  option("novi_na_vrh","noviji na početak popisa",$sql_upit);                  option("novi_na_vrh","noviji na početak popisa",$sql_upit);
56                  option("order_ime","sortirano po imenu",$sql_upit);                  option("order_ime","sortirano po imenu",$sql_upit);
57                  option("order_prezime","sortirano po prezimenu",$sql_upit);                  option("order_prezime","sortirano po prezimenu",$sql_upit);
58                    option("umrezavanje","potrebno umrežavanje",$sql_upit);
59    
60          echo '  </select>          echo '  </select>
61                  <small><i>za opcije označenje zvjezdicom (*) prvo morate                  <small><i>za opcije označenje zvjezdicom (*) prvo morate
# Line 109  Line 106 
106                          case "novi_na_vrh":                          case "novi_na_vrh":
107                                  $sql_order="order by id desc";                                  $sql_order="order by id desc";
108                                  break;                                  break;
109                            case "umrezavanje":
110                                    $sql_where.=" and umrezavanje is true";
111                                    break;
112                  }                  }
113          }          }
114    
# Line 139  Line 139 
139                  <th>organizacijska jedinica</th>                  <th>organizacijska jedinica</th>
140                  <th>status zahtjeva</th>                  <th>status zahtjeva</th>
141                  <th>kontakt osoba</th>                  <th>kontakt osoba</th>
142                    <td><small>",pg_numrows($result),"</small></td>
143                  </tr>                  </tr>
144                  ";                  ";
145    
146          function print_bool($val) {          include("inc/print_bool2.inc");
147                  if ($val == 't') {  
                         print "da";  
                 } elseif ($val == 'f') {  
                         print "ne";  
                 } else {  
                         print "nepoznato";  
                 }  
         }  
148    
149          for ($k = 0; $k < pg_numrows($result); $k++) {          for ($k = 0; $k < pg_numrows($result); $k++) {
150                  $row=pg_fetch_array($result,$k);                  $row=pg_fetch_array($result,$k);
# Line 160  Line 154 
154                          print '<tr bgcolor="#f0f0f0">';                          print '<tr bgcolor="#f0f0f0">';
155                  }                  }
156                  print "<td>";                  print "<td>";
157                  if ($row[kontakt_osoba_id]==$kontakt_osoba_id) {                  if ($row[kontakt_osoba_id]==$kontakt_osoba_id || isset($prava) && $prava==$pr_admin) {
158                          print "<a href=\"osoba.php?what=select-osoba&id=$row[id]\">$row[id]</a>";                          print "<a href=\"osoba.php?what=select-osoba&id=$row[id]\">$row[id]</a>";
159                  } else {                  } else {
160                          print "$row[id]";                          print "$row[id]";
# Line 168  Line 162 
162                  print "</td><td>$row[ime] $row[prezime]</td>                  print "</td><td>$row[ime] $row[prezime]</td>
163                          <td>$row[orgjed]</td><td>";                          <td>$row[orgjed]</td><td>";
164                                                    
165                  $result1 = pg_Exec ($conn, "select datum,opis from status,status_tip where status.status_tip_id=status_tip.id and osoba_id=$row[id]");                  $result1 = pg_Exec ($conn, "select datum,opis from status,status_tip where status.status_tip_id=status_tip.id and osoba_id=$row[id] order by datum");
166                  for ($l = 0; $l < pg_numrows($result1); $l++) {                  for ($l = 0; $l < pg_numrows($result1); $l++) {
167                          $row1=pg_fetch_array($result1,$l);                          $row1=pg_fetch_array($result1,$l);
168                          print "<small>$row1[datum]</small> $row1[opis]<br>";                          print "<small>$row1[datum]</small> $row1[opis]<br>";
# Line 177  Line 171 
171    
172    
173                  if (isset($shell)) {                  if (isset($shell)) {
174                          print "<br>shell: ";                          print "<br>shell: ".print_bool($row[shell]);
                         print_bool($row[shell]);  
175                  }                  }
176                  if (isset($podesavanje)) {                  if (isset($podesavanje)) {
177                          print "<br>podešavanje: ";                          print "<br>podešavanje: ".print_bool($row[podesavanje]);
                         print_bool($row[podesavanje]);  
178                  }                  }
179                  if (isset($umrezavanje)) {                  if (isset($umrezavanje)) {
180                          print "<br>umrežavanje: ";                          print "<br>umrežavanje: ".print_bool($row[umrezavanje]);
                         print_bool($row[umrezavanje]);  
181                  }                  }
182                  print "</small></td></tr>";                  print "</small>";
183                    print "</td><td>
184                            <a href=\"obavijest.php?id=$row[id]\">
185                            <img src=pix/text.gif border=0
186                            alt=\"Prikaži sve podatke o ovom zahtjevu\"></a>
187                            ";
188                    print "</td></tr>";
189          }          }
190    
191    

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

  ViewVC Help
Powered by ViewVC 1.1.26