-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofilNarudzbe.php
More file actions
82 lines (62 loc) · 2.53 KB
/
profilNarudzbe.php
File metadata and controls
82 lines (62 loc) · 2.53 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
session_start();
include_once 'db_connection.php';
$conn = OpenConn();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="stil.css">
</head>
<body>
<div id="menu">
<?php include 'templates/menu.php';?>
</div>
<div class="row">
<div id="placanje2">
<form>
<h3>Moj profil:</h3>
<input type="button" class="Button2" value="Narudžbe" onclick="window.open('http://localhost/dashboard/RWA/profilNarudzbe.php', '_self');">
<br> <br><input type="button" class="Button2" value="Podaci" onclick="window.open('http://localhost/dashboard/RWA/profilPodaci.php', '_self');">
<br><br>
</form>
</div>
<div id="preglednar">
<h3>Pregled dosadašnjih narudžbi:</h3>
<table id="preglednarudzbatabela" border= 1>
<tr>
<th>Datum:</th>
<th>Broj narudžbe:</th>
<th>Status:</th>
<th>Vrijednost:</th>
<th>Opcije:</th>
</tr>
<?php
$id = $_SESSION["korisnikId"];
$sql = "SELECT * FROM `narudzba`
WHERE `kupac_id` = $id";
$result = $conn->query($sql);
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
?>
<tr>
<td><?php echo $row["datum"]; ?></td>
<td><?php echo $row["narudzba_id"]; ?></td>
<td><?php echo $row["status"]; ?></td>
<td><?php echo $row["ukupno"]; ?></td>
<form action="profilNarudzbeArtikli.php" method="GET">
<input type="text" name ="id" value="<?php echo $row["narudzba_id"]; ?>" hidden>
<td><input class="myButton" type="submit" value="Pogledaj narudžbu"></td>
</form>
</tr>
<?php
}
}
?>
</table>
</div>
<div id="trazilica" >
<?php include 'templates/trazilicaIPoruka.php';?>
</div>
</div>
</body>
</html>