Новый класс Chat; session_start() уехал централизованно в конфиг с проверкой на существование ессии перед открытием. Уборка deprecated-артефактов. Работа по внедрению #42.
This commit is contained in:
+6
-4
@@ -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'])) { ?>
|
||||
|
||||
Reference in New Issue
Block a user