From bf7852bccce954aff2d7c94161f4d301a0f29684 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Wed, 16 Mar 2022 23:20:59 +0100 Subject: Initial commit w/ v1.0.0 --- api/remove.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 api/remove.php (limited to 'api/remove.php') diff --git a/api/remove.php b/api/remove.php new file mode 100644 index 0000000..65f1a82 --- /dev/null +++ b/api/remove.php @@ -0,0 +1,19 @@ +query('//game[@id="' . $id . '"]')->item(0); +$game->parentNode->removeChild($game); + +$count = $doc->getElementsByTagName("count")->item(0); +$count->nodeValue = intval($count->nodeValue) - 1; + +$doc->save($path); +header("Location: " . $_SERVER["HTTP_REFERER"]); -- cgit v1.3.1