Куча мелких фиксов, уборка мусора.

This commit is contained in:
lopar
2020-09-30 01:39:06 +03:00
parent 640e85cf18
commit 5ac30becb7
149 changed files with 4221 additions and 11012 deletions
+7 -22
View File
@@ -1,30 +1,15 @@
<?php
session_start();
include('config.php');
if ($_SESSION['uid'] == null) header("Location: index.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 (!isset($_GET['page'])) {
$ps = 0;
} else {
$ps = $_GET['page'];
require_once 'config.php';
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
$user = new User($_SESSION['uid']);
$sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc();
$ps = $_GET['page'] ?? 0;
$isModerator = false;
$isAdmin = false;
if (($user['align'] >= 1.1 && $user['align'] < 2)) {
$isModerator = true;
}
if ($user['admin'] == 1) {
$isAdmin = true;
$isModerator = true;
}
$edit = '';
$search = '';