Update AdminPresenter.php

This commit is contained in:
0x7d5 2021-09-12 00:36:17 +05:00 committed by GitHub
parent 97b13c935b
commit ba7a0d711a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,9 +81,22 @@ final class AdminPresenter extends OpenVKPresenter
$this->notFound(); $this->notFound();
$this->template->club = $club; $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;
} }
} }