users can now see their cupboards

This commit is contained in:
Louis Vallat 2019-11-10 15:55:06 +01:00
parent 346f9c6743
commit 8d6fcfd4ec

28
list-cupboard.php Normal file
View 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>