users can now see their cupboards
This commit is contained in:
parent
346f9c6743
commit
8d6fcfd4ec
28
list-cupboard.php
Normal file
28
list-cupboard.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once("./assets/php/utils.php");
|
||||||
|
|
||||||
|
if (!is_connected()) {
|
||||||
|
header("location: login.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
$cupboard_list = "";
|
||||||
|
foreach (get_users_cupboards_array() as $row) {
|
||||||
|
$cupboard_list = $cupboard_list . "<p>"
|
||||||
|
. htmlspecialchars($row["name"]) . "</p>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>List cupboard</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php echo $cupboard_list; ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user