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

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

revision 1.9 by dpavlin, Tue Jun 27 11:43:01 2000 UTC revision 1.10 by dpavlin, Tue Jun 27 13:51:27 2000 UTC
# Line 89  $statusi=""; Line 89  $statusi="";
89    
90  $nr = pg_numrows($result);  $nr = pg_numrows($result);
91  if ($nr > 0) {  if ($nr > 0) {
92          for ($i=0;$i<$nr; $i++) {          for ($i=0; $i<$nr; $i++) {
93                  $row=pg_fetch_array($result,$i);                  $row=pg_fetch_array($result,$i);
94                  $statusi.="<tr ".bgcolor()."><td><small>$row[datum]</small></td><td>$row[opis]</td><td>$row[ime] $row[prezime]</td></tr>";                  $statusi.="<tr ".bgcolor()."><td><small>$row[datum]</small></td><td>$row[opis]</td><td>$row[ime] $row[prezime]</td></tr>";
95                  if ($row[st] == 6) { $instaliran = 1; };                  if ($row[st] == 6) { $instaliran = 1; };
# Line 136  if ($prava & $pr_instalacija) { Line 136  if ($prava & $pr_instalacija) {
136    
137  <table border=0>  <table border=0>
138  <tr><th>datum</th><th>status</th><th>status postavio/la</th></tr>  <tr><th>datum</th><th>status</th><th>status postavio/la</th></tr>
139  $statusi  $statusi";
 <tr><td align=right><b>Dodati status:</b></td>  
140    
141  <td><select name=status_tip_id>";  $statusi="<tr>";
142    
143    if ($prava == $pr_admin) {
144            $statusi.="<td><select name=date_offset>
145                    <option value=>danas</option>
146                    <option value=1>sutra</option>";
147            $dani=array("nedjelju","ponedjeljak","utorak","srijedu",
148                    "četvrtak","petak","subotu");
149            for ($d=2; $d<10; $d++) {
150                    $statusi.="<option value=$d>u ".$dani[(date("w")+$d) % 7].", ". date("d.m.Y",time()+$d*24*60*60)."</option>";
151            }
152            $statusi.="</select></td>";
153    } else {
154            $statusi.="<td align=right><b>Dodati status:</b></td>";
155    }
156    
157    $statusi.="<td><select name=status_tip_id>";
158    
159          $result = pg_Exec ($conn, "select id,opis          $result = pg_Exec ($conn, "select id,opis
160                  from status_tip                  from status_tip
161                  where id >= 5                  where id >= 5
162                  ");                  ");
163    
164  //              where id >= 5 and (2^id && $prava)          $num_prava=0;
165    
166          for ($i=0; $i<pg_numrows($result); $i++) {          for ($i=0; $i<pg_numrows($result); $i++) {
167                  $row=pg_fetch_array($result,$i);                  $row=pg_fetch_array($result,$i);
168                  if ($prava & pow(2,$row[id])) {                  if ($prava & pow(2,$row[id])) {
169                          print "<option value=$row[id]>$row[opis]</option>\n";                          $statusi.="<option value=$row[id]>$row[opis]</option>\n";
170                            $num_prava++;
171                  }                  }
172          }          }
173    
174  print "</select></td>  $statusi.="</select></td>
   
175  <td>$korow[ime] $korow[prezime]</td>  <td>$korow[ime] $korow[prezime]</td>
176  <td><input type=submit value=\"Dodaj\"></td></tr>  <td><input type=submit value=\"Dodaj\"></td></tr>";
177    
178    if ($num_prava>0) {
179            print "$statusi";
180    }
181    
182    print "
183  </table>  </table>
184  </form>  </form>
185    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26