Регистрация кажется завелась.

This commit is contained in:
2023-01-12 01:39:26 +02:00
parent 83fcf92ba0
commit f1d838fcc4
5 changed files with 76 additions and 74 deletions

View File

@@ -1879,8 +1879,27 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
private function __construct()
{
$this->info = Db::getRow(
'select
if (!empty($_SESSION['uid'])) {
$this->info = Db::getRow(
'select
*,
users.id as id,
users.level as level,
users.align as align,
users.sex as sex,
users.clan as clan,
stats.timeGo as timeGo,
users.name as name,
stats.lider as lider
from users
left join stats on users.id = stats.id
left join room on users.room = room.id
where users.id = ?',
[$_SESSION['uid']]
);
} else {
$this->info = Db::getRow(
'select
*,
users.id as id,
users.level as level,
@@ -1894,9 +1913,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
left join stats on users.id = stats.id
left join room on users.room = room.id
where login = ?',
[$_COOKIE['login']]
);
[$_COOKIE['login']]
);
}
Database::init(); // для всяких mysql_*
$this->infoTasks();