-
Notifications
You must be signed in to change notification settings - Fork 0
/
kazna-dop.php
49 lines (49 loc) · 2.3 KB
/
kazna-dop.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
$idk=$_REQUEST["idk"];
require("veza.php");
$pojm="SELECT * FROM kazpre WHERE IDKP=".$idk;
$ishod=mysqli_query($con,$pojm);
$brrd=mysqli_num_rows($ishod);
if ($brrd>0) {
while($row= mysqli_fetch_array($ishod)){
echo "<tr><td id=fop>DATUM NESREÉE</td><td id=ftx><input id=fdtx name=ftxt onfocus='oboji(this)' onfocusout='oboju(this)' type='text' value='".$row["DATKP"]."' readonly><input id='dgmd' type='button' value='+' onclick=kald(0)></td></tr>";
echo "<tr><td id=fop>RELACIJA</td><td id=ftx><input id=ftxt name=ftxt onfocus='oboji(this)' onfocusout='oboju(this)' type='text' value='".$row["RELKP"]."'></td></tr>";
echo "<tr><td id=fop>IME I PREZIME VOZACA</td><td id=ftx><select id=ftxt name=ftxt onfocus='oboji(this)' onfocusout='oboju(this)' type='text'>";
$pojm1="SELECT * FROM vozaci";
$ishod1=mysqli_query($con,$pojm1);
$brrd1=mysqli_num_rows($ishod1);
if ($brrd1>0) {
while($row1= mysqli_fetch_array($ishod1)){
if ($row1["IDVO"]==$row["IDVC"]){
echo "<option selected value='".$row1["IDVO"]."'>".$row1["IMPR"]."</option>";
}
else {
echo "<option value='".$row1["IDVO"]."'>".$row1["IMPR"]."</option>";
}
}
}
echo "</select></td></tr>";
echo "<tr><td id=fop>VOZILO</td><td id=ftx><select id=ftxt name=ftxt onfocus='oboji(this)' onfocusout='oboju(this)' type='text'>";
$pojm2="SELECT * FROM vozila";
$ishod2=mysqli_query($con,$pojm2);
$brrd2=mysqli_num_rows($ishod2);
if ($brrd2>0) {
while($row2= mysqli_fetch_array($ishod2)){
if ($row2["IDVO"]==$row["IDVZ"]){
echo "<option selected value='".$row2["IDVO"]."'>".$row2["REGBR"]." - ".$row2["MAVO"]."</option>";
}
else {
echo "<option value='".$row2["IDVO"]."'>".$row2["REGBR"]." - ".$row2["MAVO"]."</option>";
}
}
}
echo "</select></td></tr>";
echo "<tr><td id=fop>OPIS</td><td id=ftx><input id=ftxt name=ftxt onfocus='oboji(this)' onfocusout='oboju(this)' type='text' value='".$row["OPKP"]."'></td></tr>";
echo "<tr><td colspan=2><center><input type='button' id='dgm' value='UNOS' onclick='kazna_izmunos()'><input id='dgm' type='button' value='IZLAZ' onclick='diaout()'></center></td></tr>";
}
}
else {
echo "<tr><td colspan=3>CORAK</td></tr>";
}
mysqli_close($con);
?>