Ban.php 987 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * This file is part of the ForkBB <https://github.com/forkbb>.
  4. *
  5. * @copyright (c) Visman <mio.visman@yandex.ru, https://github.com/MioVisman>
  6. * @license The MIT License (MIT)
  7. */
  8. declare(strict_types=1);
  9. namespace ForkBB\Models\Pages;
  10. use ForkBB\Models\Page;
  11. use ForkBB\Models\User\User;
  12. use function \ForkBB\__;
  13. class Ban extends Page
  14. {
  15. /**
  16. * Подготавливает данные для шаблона
  17. */
  18. public function ban(User $user): Page
  19. {
  20. $this->httpStatus = 403;
  21. $this->nameTpl = 'ban';
  22. # $this->onlinePos = 'ban';
  23. # $this->robots = 'noindex';
  24. $this->titles = 'Info';
  25. $this->ban = $user->banInfo;
  26. $this->adminEmail = $this->c->config->o_admin_email;
  27. $this->bannedIp = $user->isGuest;
  28. return $this;
  29. }
  30. /**
  31. * Подготовка страницы к отображению
  32. */
  33. public function prepare(): void
  34. {
  35. }
  36. }