-
Notifications
You must be signed in to change notification settings - Fork 0
/
requests.php
84 lines (72 loc) · 1.91 KB
/
requests.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
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
83
84
<?php
require_once('header.php');
$request = new Request($db_host, $db_name, $db_user, $db_pass);
$all_requests = $request->getAll();
?>
<main role="main" class="container">
<div class="row">
<div class="col-12 col-md-12 request-col">
<h1>Alle Nachfragen</h1>
</div>
</div>
<div class="row">
<div class="col-12 request-search">
<div class="form-group">
<form name="search" method="POST" action="">
<input type="text" id="search" name="search" class="form-control" placeholder="Suche" />
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-12" id="request_list">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Titel</th>
<th scope="col">Beschreibung</th>
<th scope="col">Menge</th>
<th scope="col">Qualität</th>
<th scope="col">Lieferdatum</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<?php
if($all_requests) {
foreach($all_requests as $req) {
?>
<tr>
<td><?= $req['request_id'] ?></td>
<td><?= htmlentities($req['title']) ?></td>
<td><?= htmlentities($req['description']) ?></td>
<td><?= htmlentities($req['amount']) ?></td>
<td><?= htmlentities($req['quality']) ?></td>
<td><?= htmlentities($req['delivery_date']) ?></td>
<td>
<a class="default-link" href="create_offer.php?request_id=<?= $req['request_id'] ?>">
<i class="fa fa-plus" aria-hidden="true" title="Angebot erstellen"></i>
</a>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="6"><p class="notfound">Keine Nachfragen gefunden</p></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</main>
<?php
require_once('footer.php');
?>