From 9989797ecd50074ea8006613ce4b03e3b38f0e89 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 6 Apr 2022 21:52:16 +0200 Subject: Admin panel done --- admin/contact/index.php | 118 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 admin/contact/index.php (limited to 'admin/contact/index.php') diff --git a/admin/contact/index.php b/admin/contact/index.php new file mode 100644 index 0000000..3310762 --- /dev/null +++ b/admin/contact/index.php @@ -0,0 +1,118 @@ + + $_GET["add-project"], + "link" => $_GET["add-project-src"], + "icon" => "about:blank" + ]; + file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/data/contact.json", json_encode($projects, JSON_PRETTY_PRINT)); + header("Location: /admin/contact"); + die(); + } + + if (isset($_GET["delete-project"])) { + if (isset($projects[(int)$_GET["delete-project"]])) { + unset($projects[(int)$_GET["delete-project"]]); + file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/data/contact.json", json_encode($projects, JSON_PRETTY_PRINT)); + header("Location: /admin/contact"); + die(); + } + } + + if (isset($_GET["edit-project"]) && isset($_GET["edit-project-name"]) && isset($_GET["edit-project-source"]) && isset($_GET["edit-project-icon"])) { + if (isset($projects[(int)$_GET["edit-project"]])) { + $projects[(int)$_GET["edit-project"]]["name"] = $_GET["edit-project-name"]; + $projects[(int)$_GET["edit-project"]]["link"] = $_GET["edit-project-source"]; + $projects[(int)$_GET["edit-project"]]["icon"] = $_GET["edit-project-icon"]; + file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/data/contact.json", json_encode($projects, JSON_PRETTY_PRINT)); + header("Location: /admin/contact"); + die(); + } + } +} + +?> + + +
+
+ + +

Edit ()

+ +
+

+ Social Network Name:
+ "> +

+

+ Link:
+ "> +

+

+ Icon URL (can be relative):
+ "> +

+ + "> + +
+ + +

Contact Info Management

+

Contact info added to this list is publicly shown on the website's Contact page and will lead users to containg you.

+ + +
+ + + + +
+ + + + \ No newline at end of file -- cgit