refactor and custom user entities

This commit is contained in:
2023-11-06 02:40:12 +02:00
parent ce2691971b
commit 1645f58a63
14 changed files with 828 additions and 587 deletions

View File

@@ -102,7 +102,7 @@ $lvl_exp = [
];
if ($res['exp'] >= $lvl_exp[$res['level'] + 1]) {
if ($res && $res['exp'] >= $lvl_exp[$res['level'] + 1]) {
$res['level']++;
mysql_query('UPDATE `clan` SET `level` = "' . $res['level'] . '" WHERE `id` = "' . $res['id'] . '" LIMIT 1');
mysql_query(
@@ -481,7 +481,7 @@ if ($userclan->isAwaitingConfirmation()) {
exit('<div>Заявка на регистрацию клана ' . $userclan->printClan() . ' в процессе рассмотрения.</div>');
}
if (!isset($res['id'])) {
if (!$res) {
$clans = Db::getRows('select name, align, level from clan where status = 1 order by align, level desc, name');
?>
<script>document.getElementById('se-pre-con').parentNode.removeChild(document.getElementById('se-pre-con'));</script>