mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
61 lines
1.4 KiB
PHP
61 lines
1.4 KiB
PHP
|
<?php declare(strict_types=1);
|
||
|
namespace openvk\Web\Presenters;
|
||
|
use openvk\Web\Models\Repositories\{Users, Managers};
|
||
|
use Composer\Factory;
|
||
|
use Composer\IO\NullIO;
|
||
|
use Chandler\Session\Session;
|
||
|
|
||
|
final class AboutPresenter extends OpenVKPresenter
|
||
|
{
|
||
|
protected $banTolerant = true;
|
||
|
|
||
|
function renderIndex(): void
|
||
|
{
|
||
|
if(!is_null($this->user)) {
|
||
|
header("HTTP/1.1 302 Found");
|
||
|
header("Location: /id" . $this->user->id);
|
||
|
exit;
|
||
|
}
|
||
|
|
||
|
$this->template->stats = (new Users)->getStatistics();
|
||
|
}
|
||
|
|
||
|
function renderRules(): void
|
||
|
{
|
||
|
$this->template->rules = file_get_contents(__DIR__ . "/../../data/rules.xhtml");
|
||
|
}
|
||
|
|
||
|
function renderHelp(): void
|
||
|
{}
|
||
|
|
||
|
function renderBB(): void
|
||
|
{}
|
||
|
|
||
|
function renderInvite(): void
|
||
|
{}
|
||
|
|
||
|
function renderDonate(): void
|
||
|
{}
|
||
|
|
||
|
function renderPrivacy(): void
|
||
|
{}
|
||
|
|
||
|
function renderVersion(): void
|
||
|
{
|
||
|
//$composerFactory = new Factory();
|
||
|
//$composer = $composerFactory->createComposer(new NullIO(), OPENVK_ROOT . "/composer.json", false);
|
||
|
}
|
||
|
|
||
|
function renderLanguage(): void
|
||
|
{
|
||
|
if(!is_null($_GET['lg'])){
|
||
|
Session::i()->set("lang", $_GET['lg']);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function renderSandbox(): void
|
||
|
{
|
||
|
$this->template->manager = (new Managers)->get(4);
|
||
|
}
|
||
|
}
|