From 0417260bf158c5d7b62888dae2e202b0de115a05 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 10 Aug 2022 00:04:25 +0200 Subject: Initial commit --- api/emergency-real.php | 19 ++++++++++++ api/emergency.php | 19 ++++++++++++ api/fronter.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ api/save.php | 43 ++++++++++++++++++++++++++ 4 files changed, 163 insertions(+) create mode 100644 api/emergency-real.php create mode 100644 api/emergency.php create mode 100644 api/fronter.php create mode 100644 api/save.php (limited to 'api') diff --git a/api/emergency-real.php b/api/emergency-real.php new file mode 100644 index 0000000..20a918f --- /dev/null +++ b/api/emergency-real.php @@ -0,0 +1,19 @@ + [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: ⚠️🆘 EMERGENCY ⚠️🆘\r\n" . + "Priority: urgent\r\n" . + "Tags: emergency", + 'content' => "This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now!" + ] +])); + +die(); \ No newline at end of file diff --git a/api/emergency.php b/api/emergency.php new file mode 100644 index 0000000..eb2a054 --- /dev/null +++ b/api/emergency.php @@ -0,0 +1,19 @@ + [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: [Test] ⚠️🆘 EMERGENCY ⚠️🆘\r\n" . + "Priority: urgent\r\n" . + "Tags: emergency", + 'content' => "[This notification is test] This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now! [This notification is test]" + ] +])); + +die(); \ No newline at end of file diff --git a/api/fronter.php b/api/fronter.php new file mode 100644 index 0000000..44c2c76 --- /dev/null +++ b/api/fronter.php @@ -0,0 +1,82 @@ + -1 ? $index - 1 : $index); + + break; + + default: + header("Location: /?error=Invalid type name") and die(); + break; +} + +file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system-planner.json", json_encode($list)); + +die(); \ No newline at end of file diff --git a/api/save.php b/api/save.php new file mode 100644 index 0000000..ef8a07d --- /dev/null +++ b/api/save.php @@ -0,0 +1,43 @@ +