diff --git a/Assets/functions.php b/Assets/functions.php index 6b4934c..77a79eb 100644 --- a/Assets/functions.php +++ b/Assets/functions.php @@ -309,4 +309,20 @@ function createEvent($bdd, $titre, $date, $site){ $req->bind_param("ssi", $date, $titre, $site); $req->execute(); return $bdd->insert_id; +} + +function deleteEvent($bdd, $eventId){ + $sql = "DELETE FROM evenements WHERE id = ?"; + $req = $bdd->prepare($sql); + $req->bind_param("i", $eventId); + $req->execute(); + return $req->affected_rows > 0; +} + +function deleteActu($bdd, $eventId){ + $sql = "DELETE FROM actus WHERE id = ?"; + $req = $bdd->prepare($sql); + $req->bind_param("i", $eventId); + $req->execute(); + return $req->affected_rows > 0; } \ No newline at end of file diff --git a/admin/delete.php b/admin/delete.php new file mode 100644 index 0000000..e9fe756 --- /dev/null +++ b/admin/delete.php @@ -0,0 +1,36 @@ + - diff --git a/admin/modifyEvent.php b/admin/modifyEvent.php index 19d3194..312c59b 100644 --- a/admin/modifyEvent.php +++ b/admin/modifyEvent.php @@ -192,6 +192,10 @@ if (!empty($_POST['new'])) { + + diff --git a/admin/modifySpecificActuality.php b/admin/modifySpecificActuality.php index b224a83..de19344 100644 --- a/admin/modifySpecificActuality.php +++ b/admin/modifySpecificActuality.php @@ -155,6 +155,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { accept="image/*"> + +