From ba7a0d711aa8ab3639edf9390a50e1f912185fbf Mon Sep 17 00:00:00 2001 From: 0x7d5 <86822737+VladimirLapskiy@users.noreply.github.com> Date: Sun, 12 Sep 2021 00:36:17 +0500 Subject: [PATCH 1/2] Update AdminPresenter.php --- Web/Presenters/AdminPresenter.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Web/Presenters/AdminPresenter.php b/Web/Presenters/AdminPresenter.php index d9d8a800..9b8db0e6 100644 --- a/Web/Presenters/AdminPresenter.php +++ b/Web/Presenters/AdminPresenter.php @@ -81,9 +81,22 @@ final class AdminPresenter extends OpenVKPresenter $this->notFound(); $this->template->club = $club; + + if($_SERVER["REQUEST_METHOD"] !== "POST") + return; - if($_SERVER["REQUEST_METHOD"] === "POST") { - + switch($_POST["act"] ?? "info") { + default: + case "info": + $club->setOwner($this->postParam("id_owner")); + $club->setName($this->postParam("name")); + $club->setAbout($this->postParam("about")); + $club->setShortCode($this->postParam("shortcode")); + $club->setVerified(empty($this->postParam("verify") ? 0 : 1)); + $club->setBlock_reason($this->postParam("ban_reason")); + $club->save(); + break; + } } From ec24de251e143d69f59839801e58e8e0d7363703 Mon Sep 17 00:00:00 2001 From: 0x7d5 <86822737+VladimirLapskiy@users.noreply.github.com> Date: Sun, 12 Sep 2021 00:37:05 +0500 Subject: [PATCH 2/2] Add files via upload --- Web/Presenters/templates/Admin/Club.xml | 78 +++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Web/Presenters/templates/Admin/Club.xml diff --git a/Web/Presenters/templates/Admin/Club.xml b/Web/Presenters/templates/Admin/Club.xml new file mode 100644 index 00000000..9f36d403 --- /dev/null +++ b/Web/Presenters/templates/Admin/Club.xml @@ -0,0 +1,78 @@ +{extends "@layout.xml"} + +{block title} + Редактировать {$club->getCanonicalName()} +{/block} + +{block heading} + {$club->getCanonicalName()} +{/block} + + +{block content} +
+
+{/block} \ No newline at end of file