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; }; |
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 |
|
|
195 |
|
|
196 |
} // isset($id) |
} // isset($id) |
197 |
|
|
198 |
print '<p>Povratak na <a href="lista.php">listu zahtjeva</a> ili |
print "<p>Povratak na "; |
199 |
<a href="/">početnu stranicu</a>.'; |
if (isset($HTTP_REFERER)) { |
200 |
|
print "<a href=\"$HTTP_REFERER\">stranicu sa koje ste došli</a> ili "; |
201 |
|
} |
202 |
|
print "<a href=\"/\">početnu stranicu</a>."; |
203 |
|
|
204 |
|
|
205 |
include("inc/footer.inc"); |
include("inc/footer.inc"); |
206 |
|
|