Forum cleanup

This commit is contained in:
Igor Barkov [iwork] 2018-11-01 12:10:02 +02:00
parent 133292ae9a
commit 8a1a313dca

View File

@ -2,8 +2,10 @@
session_start();
include('config.php');
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
$sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc();
if (!empty($_SESSION['uid'])) {
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
$sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc();
} else $user = $sleep = [];
if (!isset($_GET['page'])) {
$ps = 0;
@ -14,7 +16,7 @@ if (!isset($_GET['page'])) {
$isModerator = false;
$isAdmin = false;
if (($user['align'] >= 1.7 && $user['align'] < 2)) {
if (($user['align'] >= 1.1 && $user['align'] < 2)) {
$isModerator = true;
}