-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.php
More file actions
95 lines (62 loc) · 2.03 KB
/
menu.php
File metadata and controls
95 lines (62 loc) · 2.03 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
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EatLike</title>
<?php include "packages/package_required.php" ?>
</head>
<body>
<?php include "packages/menu.php" ?>
<div class="flexbox">
<a href="add_menu.php">
<button type="button" class="custom-btn btn btn-secondary btn-lg">Ajouter dans le menu</button>
</a>
</div>
<div class="container" style="padding-top: 20px">
<h3 class="titreContainer" align="center">Menu de la semaine</h3>
<?php
include "actions/dbconnect.php";
$query = "SELECT * FROM menu";
$statement = $connect->prepare($query);
$statement->execute();
$result = $statement->fetchAll();
// print("<pre>".print_r($result,true)."</pre>");
?>
<br/>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tr>
<th>Jour</th>
<th>Moment</th>
<th>Nom de la recette</th>
<th>Description de la recette</th>
<th colspan="2"></th>
</tr>
<?php
foreach ($result as $row) {
$url = "tournament_state.php?name=" . $row["hashtournament"];
echo '
<tr>
<td>' . $row["jour"] . '</td>
<td>' . $row["moment"] . '</td>
<td>' . $row["nom_recette"] . '</td>
<td>' . $row["description_recette"] . '</td>
<td>
<form method="POST" style="margin-bottom: 10px;">
<button type="button" name="this_tournament" class="btn btn-info btn-xs email_button" value="' . $row["id"] . '">
Modifier la recette
</button>
<button type="submit" name="email_button" class="btn btn-info btn-danger btn-xs email_button" >
Supprimer
</button>
</form>
</td>
</tr>
';
}
?>
</table>
</div>
</div>
</body>
</html>