better formating, didn't change the code nor bring anything to it (aka useless commit)
This commit is contained in:
parent
fc91f7697c
commit
6491b7d6bd
@ -27,7 +27,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) {
|
|||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) {
|
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) {
|
||||||
if (isset($_POST["name"]) && isset($_POST["description"])) {
|
if (isset($_POST["name"]) && isset($_POST["description"])) {
|
||||||
if (!update_cupboard($_POST["edit_completed"], $_POST["name"], $_POST["description"])) {
|
if (!update_cupboard(
|
||||||
|
$_POST["edit_completed"],
|
||||||
|
$_POST["name"],
|
||||||
|
$_POST["description"]
|
||||||
|
)) {
|
||||||
$erreur = "<p>Something went wrong. Try again later.</p>";
|
$erreur = "<p>Something went wrong. Try again later.</p>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,7 +28,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) {
|
|||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) {
|
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) {
|
||||||
if (isset($_POST["name"]) && isset($_POST["description"]) && isset($_POST["expiration"])) {
|
if (isset($_POST["name"]) && isset($_POST["description"]) && isset($_POST["expiration"])) {
|
||||||
if (!update_product($_POST["edit_completed"], $_POST["name"], $_POST["description"], empty(trim($_POST["expiration"])) ? null : $_POST["expiration"])) {
|
if (!update_product(
|
||||||
|
$_POST["edit_completed"],
|
||||||
|
$_POST["name"],
|
||||||
|
$_POST["description"],
|
||||||
|
empty(trim($_POST["expiration"])) ? null : $_POST["expiration"]
|
||||||
|
)) {
|
||||||
$erreur = "<p>Something went wrong. Try again later.</p>";
|
$erreur = "<p>Something went wrong. Try again later.</p>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -49,10 +54,10 @@ foreach (get_users_products_array() as $row) {
|
|||||||
. "</td><td>"
|
. "</td><td>"
|
||||||
. htmlspecialchars($row["cupboard_name"] !== NULL ? $row["cupboard_name"] : "-")
|
. htmlspecialchars($row["cupboard_name"] !== NULL ? $row["cupboard_name"] : "-")
|
||||||
. "</td><td>"
|
. "</td><td>"
|
||||||
. "<form method='post'><button type='publish' name='edit' value='"
|
. "<form method='post'><button type='publish' name='edit' value='"
|
||||||
. $row["public_id"] . "'>Editer</button></form>"
|
. $row["public_id"] . "'>Editer</button></form>"
|
||||||
. "</td><td>"
|
. "</td><td>"
|
||||||
. "<form method='post'><button type='publish' name='delete' value='"
|
. "<form method='post'><button type='publish' name='delete' value='"
|
||||||
. $row["public_id"] . "'>Delete</button></form>"
|
. $row["public_id"] . "'>Delete</button></form>"
|
||||||
. "</td><tr>\n";
|
. "</td><tr>\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user