Files
game/_incl_data/class/User/Login.php

24 lines
824 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace User;
use Core\Config;
readonly final class Login
{
public string $fullLogin;
public function __construct(
int|string|null $align,
int|string|null $clanName,
int $level,
string $login
) {
$imgBase = Config::img() . DIRECTORY_SEPARATOR . 'i';
$alignStr = empty($align) ? '' : "<img src='$imgBase/align/align$align.gif' alt=''>";
$clanStr = empty($clanName) ? '' : "<img src='$imgBase/clan/$clanName.gif' alt='$clanName'>";
$spacedLogin = str_replace(' ', '%20', $login);
$loginLink = "<a href='/inf.php?login=$spacedLogin' target='_blank'><img src='$imgBase/inf.gif' title='Инф. о $login' alt='Инф. о $login'></a>";
$this->fullLogin = "$alignStr$clanStr<strong>$login</strong> [$level]$loginLink";
}
}