Новый класс Chat; session_start() уехал централизованно в конфиг с проверкой на существование ессии перед открытием. Уборка deprecated-артефактов. Работа по внедрению #42.

This commit is contained in:
Igor Barkov (iwork)
2021-08-25 18:24:12 +03:00
parent 1f38e6bd61
commit 6fa217b93b
63 changed files with 2253 additions and 2322 deletions
+6 -4
View File
@@ -1,9 +1,11 @@
<?php
session_start();
use Battles\Template;
use Battles\User;
require_once 'config.php';
$user = new \Battles\User($_SESSION['uid']);
$user = User::$current;
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
#include('functions.php');
$error = '';
$rs = '';
$base = [1 => ['type' => 'Сумка'], 2 => ['type' => 'Сундук'], 3 => ['type' => 'Комната'], 4 => ['type' => 'Амбар']];
@@ -150,7 +152,7 @@ if ($_GET['unsleep'] && $user['sleep'] > 0) {
}
header('Location: hostel.php');
}
\Battles\Template::header('Хостел');
Template::header('Хостел');
?>
<script src="js/ajaxLoad.js"></script>
<? if (isset($hostel['id'])) { ?>