notices fixes

This commit is contained in:
lopar 2019-01-16 03:00:08 +02:00
parent 9234227fc5
commit a46d001b16

View File

@ -11,7 +11,7 @@ require_once 'config.php';
* Класс-заглушка для работы глобальных переменных в функциях.
* Возвращает массив данных таблицы users.
*/
$user = (new users_row($_SESSION['uid']))->result();
if (isset($_SESSION['uid'])) $user = (new users_row($_SESSION['uid']))->result();
if (isset($user['id']) && $user['block'] == 1) {
die();
@ -572,7 +572,8 @@ function level_up($uid)
}
######## FIXME ВЕЧНЫЕ 12-ТКИ!!!!!!!!!!!!
$in_user = db::c()->query('SELECT `id`, `exp`, `nextup`, `level` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
if (isset($_SESSION['uid']))
$in_user = db::c()->query('SELECT `id`, `exp`, `nextup`, `level` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
if (isset($in_user['id']) && ($in_user['exp'] >= $in_user['nextup']) && $in_user['level'] < 13) {
level_up($in_user['id']);
}