Новый класс Chat; session_start() уехал централизованно в конфиг с проверкой на существование ессии перед открытием. Уборка deprecated-артефактов. Работа по внедрению #42.
This commit is contained in:
parent
1f38e6bd61
commit
6fa217b93b
@ -4,7 +4,6 @@
|
|||||||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||||
* Project name: Battles-Game
|
* Project name: Battles-Game
|
||||||
*/
|
*/
|
||||||
session_start();
|
|
||||||
require_once '../functions.php';
|
require_once '../functions.php';
|
||||||
|
|
||||||
use Battles\Bank;
|
use Battles\Bank;
|
||||||
@ -35,11 +34,10 @@ if (isset($_POST['syschatmsg'])) {
|
|||||||
|
|
||||||
//clans to reg
|
//clans to reg
|
||||||
$unregisteredClans = new class {
|
$unregisteredClans = new class {
|
||||||
public DBPDO $db;
|
|
||||||
|
|
||||||
public function getList()
|
public function getList()
|
||||||
{
|
{
|
||||||
$row = $this->db->ofetchAll('SELECT * FROM clans WHERE status = 0');
|
$row = DBPDO::$db->ofetchAll('SELECT * FROM clans WHERE status = 0');
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < count($row)) {
|
while ($i < count($row)) {
|
||||||
$id = $row[$i]->owner_id;
|
$id = $row[$i]->owner_id;
|
||||||
@ -66,17 +64,16 @@ UNREGCLANLIST;
|
|||||||
|
|
||||||
public function allowRegister($id)
|
public function allowRegister($id)
|
||||||
{
|
{
|
||||||
$this->db->execute('UPDATE clans SET status = 1 WHERE status = 0 AND owner_id = ?', $id);
|
DBPDO::$db->execute('UPDATE clans SET status = 1 WHERE status = 0 AND owner_id = ?', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function disallowRegister($id)
|
public function disallowRegister($id)
|
||||||
{
|
{
|
||||||
$bank = new Bank($id);
|
$bank = new Bank($id);
|
||||||
$this->db->execute('DELETE FROM clans WHERE status = 0 AND owner_id = ?', $id);
|
DBPDO::$db->execute('DELETE FROM clans WHERE status = 0 AND owner_id = ?', $id);
|
||||||
$bank::setBankMoney($bank->getMoney() + GameConfigs::CLAN['clan_register_cost'], $id);
|
$bank::setBankMoney($bank->getMoney() + GameConfigs::CLAN['clan_register_cost'], $id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$unregisteredClans->db = DBPDO::$db;
|
|
||||||
$unregisteredClans->getList();
|
$unregisteredClans->getList();
|
||||||
|
|
||||||
if (isset($_GET['regclan'])) {
|
if (isset($_GET['regclan'])) {
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
* Project name: Battles-Game
|
* Project name: Battles-Game
|
||||||
*/
|
*/
|
||||||
|
|
||||||
session_start();
|
use Battles\Database\DBPDO;
|
||||||
|
use Battles\DressedItems;
|
||||||
|
use Battles\Template;
|
||||||
|
|
||||||
require_once "../functions.php";
|
require_once "../functions.php";
|
||||||
if (!$user->getAdmin()) {
|
if (!$user->getAdmin()) {
|
||||||
header("HTTP/1.0 404 Not Found");
|
header("HTTP/1.0 404 Not Found");
|
||||||
@ -18,13 +21,13 @@ $end = $_POST['end'] ?? null;
|
|||||||
$del = $_POST['del'] ?? null;
|
$del = $_POST['del'] ?? null;
|
||||||
|
|
||||||
if ($player) {
|
if ($player) {
|
||||||
$row = db::c()->query('SELECT id, login FROM users WHERE id = "?s" OR login = "?s"', $player, $player)->fetch_assoc();
|
$row = DBPDO::$db->ofetch('select id, login from users where id = ? or login = ?', [$player, $player]);
|
||||||
$_SESSION['player_id'] = $row['id'];
|
$_SESSION['player_id'] = $row->id;
|
||||||
$_SESSION['player_name'] = $row['login'];
|
$_SESSION['player_name'] = $row->login;
|
||||||
unset($row);
|
unset($row);
|
||||||
}
|
}
|
||||||
if ($undress_char) {
|
if ($undress_char) {
|
||||||
\Battles\DressedItems::undressAllItems($_SESSION['player_id']);
|
DressedItems::undressAllItems($_SESSION['player_id']);
|
||||||
}
|
}
|
||||||
if ($end) {
|
if ($end) {
|
||||||
unset($_SESSION['player_id']);
|
unset($_SESSION['player_id']);
|
||||||
@ -36,16 +39,16 @@ if (isset($_SESSION['player_id'])) {
|
|||||||
if ($del) {
|
if ($del) {
|
||||||
$itemdel = db::c()->query('SELECT item_type, dressed_slot FROM inventory WHERE id=?i', $del)->fetch_assoc();
|
$itemdel = db::c()->query('SELECT item_type, dressed_slot FROM inventory WHERE id=?i', $del)->fetch_assoc();
|
||||||
if ($itemdel['dressed_slot'] == 1) {
|
if ($itemdel['dressed_slot'] == 1) {
|
||||||
$item = new \Battles\DressedItems($del);
|
$item = new DressedItems($del);
|
||||||
$item->undressItem($itemdel['item_type']);
|
$item->undressItem($itemdel['item_type']);
|
||||||
if ($itemdel['item_type'] == 5) {
|
if ($itemdel['item_type'] == 5) {
|
||||||
$item->undressItem(6);
|
$item->undressItem(6);
|
||||||
$item->undressItem(7);
|
$item->undressItem(7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
db::c()->query('DELETE FROM `inventory` WHERE `id` = ?i', $del);
|
DBPDO::$db->execute('delete from inventory where id = ?', $del);
|
||||||
}
|
}
|
||||||
\Battles\Template::header('ᐰdminка инвентаря');
|
Template::header('ᐰdminка инвентаря');
|
||||||
?>
|
?>
|
||||||
<h1>Администрирование инвентаря <?php if (isset($_SESSION['player_name'])) echo $_SESSION['player_name']; ?></h1>
|
<h1>Администрирование инвентаря <?php if (isset($_SESSION['player_name'])) echo $_SESSION['player_name']; ?></h1>
|
||||||
<table class='adm'>
|
<table class='adm'>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
|
||||||
include "config.php";
|
include "config.php";
|
||||||
//$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '2106' LIMIT 1;"));
|
//$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '2106' LIMIT 1;"));
|
||||||
//include "functions.php";
|
//include "functions.php";
|
||||||
|
@ -4,7 +4,6 @@ use Battles\Bank;
|
|||||||
use Battles\GameLogs;
|
use Battles\GameLogs;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
const SMITH = 'оружейник';
|
const SMITH = 'оружейник';
|
||||||
const MERCENARY = 'наёмник';
|
const MERCENARY = 'наёмник';
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
$start = db::c()->query('SELECT `value` FROM `variables` WHERE `var` = "arena_of_gods"')->fetch_assoc();
|
$start = db::c()->query('SELECT `value` FROM `variables` WHERE `var` = "arena_of_gods"')->fetch_assoc();
|
||||||
|
1
bank.php
1
bank.php
@ -6,7 +6,6 @@ use Battles\Rooms;
|
|||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
use Exceptions\GameException;
|
use Exceptions\GameException;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
const SUCCESS = "Успешная операция!";
|
const SUCCESS = "Успешная операция!";
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Template;
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$header = $_GET['header'] ?? null;
|
$header = $_GET['header'] ?? null;
|
||||||
$ch = $_GET['ch'] ?? null;
|
$ch = $_GET['ch'] ?? null;
|
||||||
@ -7,7 +9,7 @@ $ch = $_GET['ch'] ?? null;
|
|||||||
if ($header) {
|
if ($header) {
|
||||||
exit;
|
exit;
|
||||||
} elseif ($ch != null) {
|
} elseif ($ch != null) {
|
||||||
\Battles\Template::header('buttons');
|
Template::header('buttons');
|
||||||
?>
|
?>
|
||||||
<script language="JavaScript" src="js/ch.js"></script>
|
<script language="JavaScript" src="js/ch.js"></script>
|
||||||
<script language="JavaScript" src="js/sl2.js"></script>
|
<script language="JavaScript" src="js/sl2.js"></script>
|
||||||
@ -231,7 +233,7 @@ if ($header) {
|
|||||||
<div id="oMenu" style="position: absolute; border:1px solid #666; background-color:#CCC; display:none; "></div>
|
<div id="oMenu" style="position: absolute; border:1px solid #666; background-color:#CCC; display:none; "></div>
|
||||||
<div id="ClearMenu" style="position: absolute; border:1px solid #666; background-color: #e2e0e0; display: none;"></div>
|
<div id="ClearMenu" style="position: absolute; border:1px solid #666; background-color: #e2e0e0; display: none;"></div>
|
||||||
|
|
||||||
<? } else { \Battles\Template::header('buttons'); ?>
|
<? } else { Template::header('buttons'); ?>
|
||||||
<script language="JavaScript" src="js/chat.js"></script>
|
<script language="JavaScript" src="js/chat.js"></script>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
|
|
||||||
|
1
buy.php
1
buy.php
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
//Покупка абилок? Тут?!
|
//Покупка абилок? Тут?!
|
||||||
session_start();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header('Location: Index.php');
|
header('Location: Index.php');
|
||||||
exit;
|
exit;
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
if (empty($user->getClan())) {
|
if (empty($user->getClan())) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Template;
|
||||||
|
|
||||||
require_once('functions.php');
|
require_once('functions.php');
|
||||||
if ($user->getRoom() == 51) {
|
if ($user->getRoom() == 51) {
|
||||||
header('location: city.php');
|
header('location: city.php');
|
||||||
@ -100,7 +102,7 @@ if ($map_user['Up'] == 1) {
|
|||||||
onclick="location.href='?move=true&Dir=Up';" alt="Вверх">
|
onclick="location.href='?move=true&Dir=Up';" alt="Вверх">
|
||||||
MAP;
|
MAP;
|
||||||
}
|
}
|
||||||
\Battles\Template::header('forest');
|
Template::header('forest');
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" type="text/css" href="css/hostel.css"/>
|
<link rel="stylesheet" type="text/css" href="css/hostel.css"/>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}';"));
|
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}';"));
|
||||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Template;
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$in_park = mysql_fetch_array(mysql_query("SELECT * FROM `cit_park` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
$in_park = mysql_fetch_array(mysql_query("SELECT * FROM `cit_park` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||||
@ -106,7 +108,7 @@ if ($_POST['attack']) {
|
|||||||
|
|
||||||
|
|
||||||
//старт боя - конец
|
//старт боя - конец
|
||||||
\Battles\Template::header('Городской Парк');
|
Template::header('Городской Парк');
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
function refreshPeriodic() {
|
function refreshPeriodic() {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($user->getRoom() == 403) {
|
if ($user->getRoom() == 403) {
|
||||||
include "startpodzemel.php";
|
include "startpodzemel.php";
|
||||||
|
1
cave.php
1
cave.php
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
//require_once 'cave/cave_bots.php';
|
//require_once 'cave/cave_bots.php';
|
||||||
$userslots = ['sergi', 'kulon', 'perchi', 'weap', 'bron', 'r1', 'r2', 'r3', 'helm', 'shit', 'boots', 'rybax', 'plaw', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9', 'm10'];
|
$userslots = ['sergi', 'kulon', 'perchi', 'weap', 'bron', 'r1', 'r2', 'r3', 'helm', 'shit', 'boots', 'rybax', 'plaw', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9', 'm10'];
|
||||||
|
5
ch.php
5
ch.php
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Battles\Database\DBPDO;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']);
|
DBPDO::$db->execute('update online set real_time = ? where user_id = ?', [time(), User::$current->getId()]);
|
||||||
|
|
||||||
if (isset($_GET['online']) && $_GET['online'] != null) {
|
if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||||
if ($_GET['room'] && (int)$_GET['room'] < 500) {
|
if ($_GET['room'] && (int)$_GET['room'] < 500) {
|
||||||
|
56
chat.php
56
chat.php
@ -5,52 +5,18 @@
|
|||||||
* Project name: Battles-Game
|
* Project name: Battles-Game
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Battles\Chat;
|
||||||
use Battles\Database\DBPDO;
|
use Battles\Database\DBPDO;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
|
$chat = new Chat(new DBPDO());
|
||||||
$msg = $_POST['msg'] ?? null;
|
if (!empty($_POST['msg'])) {
|
||||||
$uid = $_SESSION['uid'] ?? null;
|
$chat->addMessage($_POST['msg']);
|
||||||
if ($msg) {
|
|
||||||
$db = new DBPDO();
|
|
||||||
$db->execute('INSERT INTO chat (user_id,msg) VALUES (?,?)', [$uid, $msg]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_messages()
|
|
||||||
{
|
|
||||||
$db = new DBPDO();
|
|
||||||
|
|
||||||
$chat = $db->ofetchALL('SELECT msg,msgdate,type,s.login AS sender, r.login AS receiver, s.id AS sid, r.id AS rid FROM chat
|
|
||||||
LEFT JOIN users s on s.id = chat.user_id
|
|
||||||
LEFT JOIN users r on r.id = chat.receiver_id
|
|
||||||
WHERE r.id = ? OR r.id IS NULL OR s.id = ? ORDER BY chat.id', [$_SESSION['uid'], $_SESSION['uid']]);
|
|
||||||
$i = 0;
|
|
||||||
while ($i < count($chat)) {
|
|
||||||
$d = new DateTime($chat[$i]->msgdate);
|
|
||||||
$m = htmlspecialchars($chat[$i]->msg);
|
|
||||||
if ($chat[$i]->type == 'sys') { /* Системка */
|
|
||||||
echo sprintf('<span style="color:maroon;background:#faa;">%s %s</span><br>', $d->format('H:i'), $m);
|
|
||||||
} elseif ($chat[$i]->rid == $_SESSION['uid']) { /* С указанным получателем */
|
|
||||||
if ($chat[$i]->type == 'sms') { /* Телеграмма */
|
|
||||||
echo sprintf('<span style="color:darkgreen;background:#afa;">%s Телеграмма от [%s]: %s</span><br>', $d->format('d.m.Y H:i'), $chat[$i]->sender, $m);
|
|
||||||
} elseif ($chat[$i]->type == 'private') { /* Приват */
|
|
||||||
echo sprintf('<span style="background:#efe;">%s [%s] → [%s]: %s</span><br>', $d->format('H:i'), $chat[$i]->sender, $chat[$i]->receiver, $m);
|
|
||||||
} else { /* Общак */
|
|
||||||
echo sprintf('%s [%s] → [%s]: %s<br>', $d->format('H:i'), $chat[$i]->sender, $chat[$i]->receiver, $m);
|
|
||||||
}
|
|
||||||
} else { /* Без указанного получателя */
|
|
||||||
echo sprintf('%s [%s]: %s<br>', $d->format('H:i'), $chat[$i]->sender, $m);
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
unset($i, $chat, $db);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Template::header('chat');
|
Template::header('chat');
|
||||||
show_messages();
|
echo $chat->getMessages();
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
form {
|
form {
|
||||||
@ -72,6 +38,18 @@ show_messages();
|
|||||||
border: none;
|
border: none;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.chatsys {
|
||||||
|
color:maroon;
|
||||||
|
background:#faa;
|
||||||
|
}
|
||||||
|
span.chatsms {
|
||||||
|
color:darkgreen;
|
||||||
|
background:#afa;
|
||||||
|
}
|
||||||
|
span.chatprivate {
|
||||||
|
background:#efe;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div>
|
<div>
|
||||||
<?php ?>
|
<?php ?>
|
||||||
|
6
city.php
6
city.php
@ -2,7 +2,9 @@
|
|||||||
/**
|
/**
|
||||||
* Центральная площадь
|
* Центральная площадь
|
||||||
*/
|
*/
|
||||||
session_start();
|
|
||||||
|
use Battles\Template;
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
if ($user->getZayavka()) {
|
if ($user->getZayavka()) {
|
||||||
@ -195,7 +197,7 @@ switch ($location[0]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
\Battles\Template::header('city');
|
Template::header('city');
|
||||||
echo sprintf('<div style="text-align: right;">Сейчас в игре: %s игроков.></div>', $online->getNumRows());
|
echo sprintf('<div style="text-align: right;">Сейчас в игре: %s игроков.></div>', $online->getNumRows());
|
||||||
if (in_array($user->getRoom(), [20, 21, 26, 2601, 2655, 2111, 2701, 2702])) {
|
if (in_array($user->getRoom(), [20, 21, 26, 2601, 2655, 2111, 2701, 2702])) {
|
||||||
/* Улицы:
|
/* Улицы:
|
||||||
|
1
clan.php
1
clan.php
@ -7,7 +7,6 @@ use Battles\Rooms;
|
|||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
use Battles\User;
|
use Battles\User;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
if (!User::$current->getClan()) {
|
if (!User::$current->getClan()) {
|
||||||
exit('Ошибка! Вы не состоите в клане!');
|
exit('Ошибка! Вы не состоите в клане!');
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||||
$klan = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1;"));
|
$klan = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1;"));
|
||||||
|
@ -5,7 +5,6 @@ use Battles\GameConfigs;
|
|||||||
use Battles\Rooms;
|
use Battles\Rooms;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
$userClan = db::c()->query('SELECT short_name, full_name, info FROM clans where owner_id = ?i', $user->getId())->fetch_object();
|
$userClan = db::c()->query('SELECT short_name, full_name, info FROM clans where owner_id = ?i', $user->getId())->fetch_object();
|
||||||
$clanFullName = $_POST['clan_full_name'] ?? '';
|
$clanFullName = $_POST['clan_full_name'] ?? '';
|
||||||
|
68
classes/Battles/Chat.php
Normal file
68
classes/Battles/Chat.php
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Battles;
|
||||||
|
|
||||||
|
use Battles\Database\DBPDO;
|
||||||
|
use DateTime;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class Chat
|
||||||
|
{
|
||||||
|
private DateTime $d;
|
||||||
|
private DBPDO $db;
|
||||||
|
|
||||||
|
public function __construct(DBPDO $db)
|
||||||
|
{
|
||||||
|
$this->db = $db;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMessages(): ?string
|
||||||
|
{
|
||||||
|
$query = 'select
|
||||||
|
msg,
|
||||||
|
msgdate,
|
||||||
|
type,
|
||||||
|
s.login as sender,
|
||||||
|
r.login as receiver,
|
||||||
|
s.id as sid,
|
||||||
|
r.id as rid
|
||||||
|
from chat
|
||||||
|
left join users s on s.id = chat.user_id
|
||||||
|
left join users r on r.id = chat.receiver_id
|
||||||
|
where
|
||||||
|
r.id = ?
|
||||||
|
or r.id is null
|
||||||
|
or s.id = ?
|
||||||
|
order by chat.id';
|
||||||
|
$chatrows = $this->db->ofetchALL($query, [User::$current->getId(), User::$current->getId()]);
|
||||||
|
$wrappedMessage = null;
|
||||||
|
foreach ($chatrows as $row) {
|
||||||
|
try {
|
||||||
|
$this->d = new DateTime($row->msgdate);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo 'Chat Datetime Whoops!';
|
||||||
|
}
|
||||||
|
$m = htmlspecialchars($row->msg);
|
||||||
|
if ($row->type === 'sys') {
|
||||||
|
$wrappedMessage .= sprintf('<span class="chatsys">%s %s</span><br>', $this->d->format('H:i'), $m);
|
||||||
|
} elseif ($row->rid == User::$current->getId()) {
|
||||||
|
if ($row->type == 'sms') {
|
||||||
|
$wrappedMessage .= sprintf('<span class="chatsms">%s Телеграмма от [%s]: %s</span><br>', $this->d->format('d.m.Y H:i'), $row->sender, $m);
|
||||||
|
} elseif ($row->type == 'private') {
|
||||||
|
$wrappedMessage .= sprintf('<span class="chatprivate">%s [%s] → [%s]: %s</span><br>', $this->d->format('H:i'), $row->sender, $row->receiver, $m);
|
||||||
|
} else {
|
||||||
|
$wrappedMessage .= sprintf('%s [%s] → [%s]: %s<br>', $this->d->format('H:i'), $row->sender, $row->receiver, $m);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$wrappedMessage .= sprintf('%s [%s]: %s<br>', $this->d->format('H:i'), $row->sender, $m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $wrappedMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addMessage($msg)
|
||||||
|
{
|
||||||
|
$this->db->execute('insert into chat (user_id, msg) values (?,?)', [User::$current->getId(), $msg]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,7 +4,6 @@ use Battles\GameLogs;
|
|||||||
use Battles\ShopItem;
|
use Battles\ShopItem;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
$get = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
$get = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
||||||
$putItemCost = (int)filter_input(INPUT_POST, 'cost', FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
|
$putItemCost = (int)filter_input(INPUT_POST, 'cost', FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
|
||||||
|
15
config.php
15
config.php
@ -9,6 +9,11 @@
|
|||||||
ini_set('display_errors', 'On');
|
ini_set('display_errors', 'On');
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
const GAMEDOMAIN = "battles.lan";
|
const GAMEDOMAIN = "battles.lan";
|
||||||
|
|
||||||
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Запрещаем кэшировать
|
* Запрещаем кэшировать
|
||||||
*/
|
*/
|
||||||
@ -36,6 +41,16 @@ spl_autoload_register(function ($className) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Глобальные переменные. Промежуточное решение для совместимости.
|
||||||
|
*/
|
||||||
|
if (empty(\Battles\Database\DBPDO::$db)) {
|
||||||
|
\Battles\Database\DBPDO::$db = new \Battles\Database\DBPDO();
|
||||||
|
}
|
||||||
|
if (empty(\Battles\User::$current) && $_SESSION['uid']) {
|
||||||
|
\Battles\User::$current = new \Battles\User($_SESSION['uid']);
|
||||||
|
}
|
||||||
|
|
||||||
// Для нападалок. Сперва комнаты в которых нельзя напасть, потом персонажи на которых нельзя напасть.
|
// Для нападалок. Сперва комнаты в которых нельзя напасть, потом персонажи на которых нельзя напасть.
|
||||||
const UNKILABLE = [
|
const UNKILABLE = [
|
||||||
'rooms' => [620, 621, 1051, 1052],
|
'rooms' => [620, 621, 1051, 1052],
|
||||||
|
14
enter.php
14
enter.php
@ -4,15 +4,13 @@ use Battles\Database\DBPDO;
|
|||||||
use Battles\GameLogs;
|
use Battles\GameLogs;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
const ERROR_NO_SUCH_USER = 'Такого пользователя не существует!';
|
const ERROR_NO_SUCH_USER = 'Такого пользователя не существует!';
|
||||||
const ERROR_USER_IS_BLOCKED = 'Пользователь заблокирован!';
|
const ERROR_USER_IS_BLOCKED = 'Пользователь заблокирован!';
|
||||||
const ERROR_WRONG_PASSWORD = 'Неверный пароль!';
|
const ERROR_WRONG_PASSWORD = 'Неверный пароль!';
|
||||||
const ERROR_EMPTY_CREDENTIALS = 'Вы не ввели логин или пароль!';
|
const ERROR_EMPTY_CREDENTIALS = 'Вы не ввели логин или пароль!';
|
||||||
$db = new DBPDO();
|
|
||||||
foreach ($_POST as $key => $val) { //Проверка всех значений массива POST одним махом.
|
foreach ($_POST as $key => $val) { //Проверка всех значений массива POST одним махом.
|
||||||
$_POST[$key] = iconv(mb_detect_encoding($_POST[$key], 'auto'), 'utf-8', $val);
|
$_POST[$key] = iconv(mb_detect_encoding($val, 'auto'), 'utf-8', $val);
|
||||||
}
|
}
|
||||||
|
|
||||||
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);
|
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
@ -21,7 +19,7 @@ $battle = $_COOKIE['battle'] ?? '';
|
|||||||
$error = "";
|
$error = "";
|
||||||
|
|
||||||
if ($username && $password) {
|
if ($username && $password) {
|
||||||
$user_query = $db->ofetch('SELECT id, login, pass, room, block FROM users WHERE login = ?', $username);
|
$user_query = DBPDO::$db->ofetch('SELECT id, login, pass, room, block FROM users WHERE login = ?', $username);
|
||||||
|
|
||||||
if (!$user_query->id) {
|
if (!$user_query->id) {
|
||||||
$error = ERROR_NO_SUCH_USER;
|
$error = ERROR_NO_SUCH_USER;
|
||||||
@ -41,14 +39,14 @@ if ($username && $password) {
|
|||||||
setcookie("hashcode", md5($user_query->id . $user_query->pass . $username), time() + 43200, "/", GAMEDOMAIN);
|
setcookie("hashcode", md5($user_query->id . $user_query->pass . $username), time() + 43200, "/", GAMEDOMAIN);
|
||||||
$_SESSION['sid'] = session_id();
|
$_SESSION['sid'] = session_id();
|
||||||
|
|
||||||
$onl = $db->ofetch('SELECT user_id FROM online WHERE user_id = ?', $user_query->id);
|
$onl = DBPDO::$db->ofetch('SELECT user_id FROM online WHERE user_id = ?', $user_query->id);
|
||||||
if (isset($onl->user_id)) {
|
if (isset($onl->user_id)) {
|
||||||
$db->execute('UPDATE online SET date = ? WHERE user_id = ?', [time(), $user_query->id]);
|
DBPDO::$db->execute('UPDATE online SET date = ? WHERE user_id = ?', [time(), $user_query->id]);
|
||||||
} else {
|
} else {
|
||||||
$db->execute('INSERT INTO online (user_id, date, room, real_time) VALUES (?,?,?,?)', [$user_query->id, time(), $user_query->room, time()]);
|
DBPDO::$db->execute('INSERT INTO online (user_id, date, room, real_time) VALUES (?,?,?,?)', [$user_query->id, time(), $user_query->room, time()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->execute('UPDATE users SET session_id = ?, enter_game = 1 WHERE id = ?', [session_id(), $user_query->id]);
|
DBPDO::$db->execute('UPDATE users SET session_id = ?, enter_game = 1 WHERE id = ?', [session_id(), $user_query->id]);
|
||||||
header("Location: fight.php");
|
header("Location: fight.php");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
function secs2hrs($s, $short = 0)
|
function secs2hrs($s, $short = 0)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
if (isset($_POST['end'])) {
|
if (isset($_POST['end'])) {
|
||||||
header("Location: main.php");
|
header("Location: main.php");
|
||||||
exit;
|
exit;
|
||||||
|
15
fight.php
15
fight.php
@ -1,14 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Database\DBPDO;
|
||||||
|
use Battles\Template;
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
require_once 'config.php';
|
require_once 'config.php';
|
||||||
$userLoginStatus = db::c()->query('SELECT enter_game FROM users WHERE id = ?i', $_SESSION['uid'])->getNumRows() ?? 0;
|
$userLoginStatus = DBPDO::$db->ofetch('select enter_game from users where id = ?', User::$current->getId());
|
||||||
if (empty($userLoginStatus)) {
|
if (empty($userLoginStatus->enter_game)) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
|
exit();
|
||||||
} else {
|
} else {
|
||||||
db::c()->query('UPDATE `users` SET `enter_game` = 0 WHERE `enter_game` = 1 AND `id` = ?i', $_SESSION['uid']);
|
DBPDO::$db->execute('update users set enter_game = 0 where enter_game = 1 and id = ?', User::$current->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
\Battles\Template::header('Окно игры');
|
Template::header('Окно игры');
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
if (!navigator.cookieEnabled) {
|
if (!navigator.cookieEnabled) {
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($user->getRoom() == 51) {
|
if ($user->getRoom() == 51) {
|
||||||
header('location: city.php');
|
header('location: city.php');
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once 'config.php';
|
require_once 'config.php';
|
||||||
$user = new \Battles\User($_SESSION['uid']);
|
$user = \Battles\User::$current;
|
||||||
$sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc();
|
$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;
|
$ps = $_GET['page'] ?? 0;
|
||||||
$isModerator = false;
|
$isModerator = false;
|
||||||
|
@ -12,7 +12,6 @@ use Battles\Travel;
|
|||||||
use Battles\User;
|
use Battles\User;
|
||||||
|
|
||||||
require_once 'config.php';
|
require_once 'config.php';
|
||||||
DBPDO::$db = new DBPDO();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Разрушенный замок на замковой улице. */
|
/* Разрушенный замок на замковой улице. */
|
||||||
session_start();
|
const CASTLE_MAX_LEVEL = 10;
|
||||||
define("CASTLE_MAX_LEVEL", 10);
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
$castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok');
|
$castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok');
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
use Battles\Template;
|
||||||
exit;
|
|
||||||
}
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
|
|
||||||
$error = '';
|
$error = '';
|
||||||
@ -204,7 +203,7 @@ if ($_GET['exit'] == 1) {
|
|||||||
header('Location: city.php');
|
header('Location: city.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
\Battles\Template::header('group_arena');
|
Template::header('group_arena');
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
function growl(title, color, message, stycky) {
|
function growl(title, color, message, stycky) {
|
||||||
|
1
hell.php
1
hell.php
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
class hellround
|
class hellround
|
||||||
|
10
hostel.php
10
hostel.php
@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Template;
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
require_once 'config.php';
|
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'));
|
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
||||||
#include('functions.php');
|
|
||||||
$error = '';
|
$error = '';
|
||||||
$rs = '';
|
$rs = '';
|
||||||
$base = [1 => ['type' => 'Сумка'], 2 => ['type' => 'Сундук'], 3 => ['type' => 'Комната'], 4 => ['type' => 'Амбар']];
|
$base = [1 => ['type' => 'Сумка'], 2 => ['type' => 'Сундук'], 3 => ['type' => 'Комната'], 4 => ['type' => 'Амбар']];
|
||||||
@ -150,7 +152,7 @@ if ($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||||||
}
|
}
|
||||||
header('Location: hostel.php');
|
header('Location: hostel.php');
|
||||||
}
|
}
|
||||||
\Battles\Template::header('Хостел');
|
Template::header('Хостел');
|
||||||
?>
|
?>
|
||||||
<script src="js/ajaxLoad.js"></script>
|
<script src="js/ajaxLoad.js"></script>
|
||||||
<? if (isset($hostel['id'])) { ?>
|
<? if (isset($hostel['id'])) { ?>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$hostel = mysql_fetch_array(mysql_query('SELECT * FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
$hostel = \Battles\Database\DBPDO::$db->fetch('select * from hostel where uid = ?', \Battles\User::$current->getId());
|
||||||
$base = [1 => [8, 16, 24, 32], 2 => [15, 30, 45, 60], 3 => [25, 50, 75, 100], 4 => [40, 80, 120, 160]];
|
$base = [1 => [8, 16, 24, 32], 2 => [15, 30, 45, 60], 3 => [25, 50, 75, 100], 4 => [40, 80, 120, 160]];
|
||||||
|
|
||||||
if (isset($_POST['act']) && $_POST['act'] == 'pay' && isset($user['id']) && isset($hostel['id'])) {
|
if (isset($_POST['act']) && $_POST['act'] == 'pay' && isset($user['id']) && isset($hostel['id'])) {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
$d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) AS `mass` FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0"));
|
$d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) AS `mass` FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0"));
|
||||||
|
1
inf.php
1
inf.php
@ -4,7 +4,6 @@ use Battles\Models\PresentsModel;
|
|||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
use Battles\UserInfo;
|
use Battles\UserInfo;
|
||||||
|
|
||||||
session_start();
|
|
||||||
include_once 'config.php';
|
include_once 'config.php';
|
||||||
$userInfo = new UserInfo(urldecode($_SERVER['QUERY_STRING']));
|
$userInfo = new UserInfo(urldecode($_SERVER['QUERY_STRING']));
|
||||||
$presentsModel = new PresentsModel($userInfo->getId());
|
$presentsModel = new PresentsModel($userInfo->getId());
|
||||||
|
1
lab.php
1
lab.php
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($user['lab'] == 0) {
|
if ($user['lab'] == 0) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
|
3
lab2.php
3
lab2.php
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($user['lab'] == 0) {
|
if ($user['lab'] == 0) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
@ -393,7 +392,7 @@ echo "<tr><td><td><button style='width:50px; height:50px;' class='INPUT' disable
|
|||||||
$u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'");
|
$u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'");
|
||||||
$u_lab_kol = mysql_num_rows($u_lab);
|
$u_lab_kol = mysql_num_rows($u_lab);
|
||||||
$heal_all = (($u_lab_kol / 2) + 1);
|
$heal_all = (($u_lab_kol / 2) + 1);
|
||||||
echo "Всего в Лабиринте: <b>" . $u_lab_kol . "</b> чел. <small><a href=\"#\" onclick=\"javascript:if (confirm('Излечить всех за $heal_all кр?')){ location.href='lab.php?healall=1&cost=$heal_all';}\">[излечить]</a></small><br>";
|
echo "Всего в Лабиринте: <b>" . $u_lab_kol . "</b> чел. <small><a href=\\";
|
||||||
echo "<b>В этой комнате:</b>";
|
echo "<b>В этой комнате:</b>";
|
||||||
echo "<br><li><u>Игроки:</u>";
|
echo "<br><li><u>Игроки:</u>";
|
||||||
while ($items = mysql_fetch_array($data3)) {
|
while ($items = mysql_fetch_array($data3)) {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$errkom = '';
|
$errkom = '';
|
||||||
mysql_query('DELETE FROM `laba_zv` WHERE `time` < "' . (time() - 1 * 60 * 60) . '"');
|
mysql_query('DELETE FROM `laba_zv` WHERE `time` < "' . (time() - 1 * 60 * 60) . '"');
|
||||||
|
11
labirint.php
11
labirint.php
@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\DressedItems;
|
||||||
|
use Battles\Template;
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
$q2 = mysql_fetch_array(mysql_query('SELECT * FROM `qst_user` WHERE `uid` = "' . $user['id'] . '" AND `cancel` = "0" AND `finish` = "0" LIMIT 1'));
|
$q2 = mysql_fetch_array(mysql_query('SELECT * FROM `qst_user` WHERE `uid` = "' . $user['id'] . '" AND `cancel` = "0" AND `finish` = "0" LIMIT 1'));
|
||||||
@ -141,7 +144,7 @@ if (isset($_POST['exit'])) {
|
|||||||
}
|
}
|
||||||
$dresed = mysql_query('SELECT `id`, `type` FROM `inventory` WHERE `dressed` = 1 AND `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
$dresed = mysql_query('SELECT `id`, `type` FROM `inventory` WHERE `dressed` = 1 AND `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
||||||
while ($pl = mysql_fetch_array($dresed)) {
|
while ($pl = mysql_fetch_array($dresed)) {
|
||||||
$item = new \Battles\DressedItems($user['id']);
|
$item = new DressedItems($user['id']);
|
||||||
$item->undressItem($pl['type']);
|
$item->undressItem($pl['type']);
|
||||||
}
|
}
|
||||||
mysql_query('DELETE FROM `inventory` WHERE `laba` > 0 AND `owner` = "' . $user['id'] . '"');
|
mysql_query('DELETE FROM `inventory` WHERE `laba` > 0 AND `owner` = "' . $user['id'] . '"');
|
||||||
@ -291,7 +294,7 @@ if ($user['y'] >= count($map_d) - 2) {
|
|||||||
}
|
}
|
||||||
$dresed = mysql_query('SELECT `id`, `type` FROM `inventory` WHERE `dressed` = 1 AND `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
$dresed = mysql_query('SELECT `id`, `type` FROM `inventory` WHERE `dressed` = 1 AND `laba` = 2 AND `owner` = "' . $user['id'] . '"');
|
||||||
while ($pl = mysql_fetch_array($dresed)) {
|
while ($pl = mysql_fetch_array($dresed)) {
|
||||||
$item = new \Battles\DressedItems($user['id']);
|
$item = new DressedItems($user['id']);
|
||||||
$item->undressItem($pl['type']);
|
$item->undressItem($pl['type']);
|
||||||
}
|
}
|
||||||
mysql_query('UPDATE `inventory` SET `laba` = 0 WHERE `laba` = 1 AND `owner` = "' . $user['id'] . '"');
|
mysql_query('UPDATE `inventory` SET `laba` = 0 WHERE `laba` = 1 AND `owner` = "' . $user['id'] . '"');
|
||||||
@ -461,7 +464,7 @@ if (isset($varos['trap1']['vals']) && $varos['trap1']['vals'] > 0) {
|
|||||||
$effed .= '<div><img width="40" height="25" src="/i/sh/event_timer_trap.gif" /> - Время перехода +3 секунды (Осталось : ' . timeOut($varos['trap1']['time'] - time()) . ')</div>';
|
$effed .= '<div><img width="40" height="25" src="/i/sh/event_timer_trap.gif" /> - Время перехода +3 секунды (Осталось : ' . timeOut($varos['trap1']['time'] - time()) . ')</div>';
|
||||||
}
|
}
|
||||||
unset($varos);
|
unset($varos);
|
||||||
\Battles\Template::header('labirint');
|
Template::header('labirint');
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="js/jquery.js"></script>
|
<script type="text/javascript" src="js/jquery.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
use Battles\UserInfo;
|
use Battles\UserInfo;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
Template::header('Библиотека Просвещения');
|
Template::header('Библиотека Просвещения');
|
||||||
?>
|
?>
|
||||||
|
1
main.php
1
main.php
@ -10,7 +10,6 @@ use Battles\UserInfo;
|
|||||||
use Battles\UserStats;
|
use Battles\UserStats;
|
||||||
use Battles\User;
|
use Battles\User;
|
||||||
|
|
||||||
session_start();
|
|
||||||
$get = filter_input(INPUT_SERVER, 'QUERY_STRING');
|
$get = filter_input(INPUT_SERVER, 'QUERY_STRING');
|
||||||
if ($get == 'exit') {
|
if ($get == 'exit') {
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
|
||||||
header('Location: /index.php');
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
require_once 'classes/quests_class.php';
|
require_once 'classes/quests_class.php';
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($_GET['act'] == "atk") {
|
if ($_GET['act'] == "atk") {
|
||||||
$ass = mysql_query("SELECT glav_id,glava,name FROM labirint WHERE user_id=" . $user['id'] . "");
|
$ass = mysql_query("SELECT glav_id,glava,name FROM labirint WHERE user_id=" . $user['id'] . "");
|
||||||
|
107
podzem/edit.php
107
podzem/edit.php
@ -1,51 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
// Что ты такое?
|
||||||
|
use Battles\Database\DBPDO;
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
require_once "../config.php";
|
require_once "../config.php";
|
||||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
$user = User::$current;
|
||||||
if ($user['admin']) {
|
if (!User::$current->getAdmin()) {
|
||||||
?>
|
exit('Access denied!');
|
||||||
<table width="100%" border="1" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td align="left" valign="top">
|
|
||||||
<table width="700" border="1" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="300" align="left" valign="top">
|
|
||||||
<?
|
|
||||||
$nec = mysql_query("SELECT * FROM podzem2");
|
|
||||||
while ($sc = mysql_fetch_array($nec)) {
|
|
||||||
print"<a href='edit_podzem.php?name=" . $sc['name'] . "'>" . $sc['name'] . "</a><br />";
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="400" align="left" valign="top">
|
|
||||||
|
|
||||||
<form action="" method="get">
|
|
||||||
<? if (!$_GET['new']) { ?>
|
|
||||||
<input name="new" type="submit" value="Создать новую"/>
|
|
||||||
<?
|
|
||||||
if ($_GET['new']) {
|
|
||||||
print "<script>location.href='main.php?act=none'</script>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
if ($_GET['news']) {
|
|
||||||
$SQL2 = mysql_query("INSERT INTO podzem2(name) VALUES('" . $_GET['name'] . "')");
|
|
||||||
print "<script>location.href='edit.php'</script>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else { ?>
|
|
||||||
<input style="font-size:12px;" name="name" type="text" size="10" value="Название"/>
|
|
||||||
<input name="news" type="submit" value="Создать"/>
|
|
||||||
<?
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?
|
|
||||||
}
|
}
|
||||||
?>
|
$nec = DBPDO::$db->fetchAll('select * from podzem2');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
.row {
|
||||||
|
cursor: default;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column {
|
||||||
|
padding: 10px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="row">
|
||||||
|
<div class="column left">
|
||||||
|
<?php
|
||||||
|
foreach ($nec as $row) {
|
||||||
|
echo sprintf('<a href="edit_podzem.php?name=%s">%s</a><br>', $row['name'], $row['name']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="column right">
|
||||||
|
<form action="" method="get">
|
||||||
|
<?php if (empty($_GET['new'])): ?>
|
||||||
|
<input name="new" type="submit" value="Создать новую">
|
||||||
|
<?php
|
||||||
|
if (!empty($_GET['news'] && !empty($_GET['name']))) {
|
||||||
|
$SQL2 = DBPDO::$db->execute('insert into podzem2 (name) value ?', $_GET['name']);
|
||||||
|
exit("<script>location.href='edit.php'</script>");
|
||||||
|
} ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<input style="font-size:12px;" name="name" type="text" size="10" value="Название">
|
||||||
|
<input name="news" type="submit" value="Создать">
|
||||||
|
<?php endif; ?>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
File diff suppressed because it is too large
Load Diff
1076
podzem_dialog.php
1076
podzem_dialog.php
File diff suppressed because it is too large
Load Diff
2
post.php
2
post.php
@ -6,7 +6,7 @@ use Battles\InventoryItem;
|
|||||||
use Battles\Nick;
|
use Battles\Nick;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
if ($_GET['change'] ?? 0) {
|
if ($_GET['change'] ?? 0) {
|
||||||
unset($_SESSION['receiverName']);
|
unset($_SESSION['receiverName']);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
use Battles\User;
|
use Battles\User;
|
||||||
|
|
||||||
session_start();
|
|
||||||
if ($_SESSION['uid'] != 2) {
|
if ($_SESSION['uid'] != 2) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
if (empty($_SESSION['uid'])) {
|
|
||||||
header('Location: /index.php');
|
|
||||||
}
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
include('classes/quests_class.php');
|
include('classes/quests_class.php');
|
||||||
$status = '';
|
$status = '';
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template, Battles\Database\DBPDO;
|
use Battles\Template, Battles\Database\DBPDO;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
|
|
||||||
if ($_COOKIE[GAMEDOMAIN] ?? null) {
|
if ($_COOKIE[GAMEDOMAIN] ?? null) {
|
||||||
|
@ -4,7 +4,6 @@ use Battles\Bank;
|
|||||||
use Battles\GameLogs;
|
use Battles\GameLogs;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once("functions.php");
|
require_once("functions.php");
|
||||||
const GRAV_LIMIT = 32;
|
const GRAV_LIMIT = 32;
|
||||||
const GRAV_COST = 30;
|
const GRAV_COST = 30;
|
||||||
|
1
shop.php
1
shop.php
@ -6,7 +6,6 @@ use Battles\Item;
|
|||||||
use Battles\ShopItem;
|
use Battles\ShopItem;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
$saleItems = false;
|
$saleItems = false;
|
||||||
$shopCategoryType = $_POST['sale'] ?? '';
|
$shopCategoryType = $_POST['sale'] ?? '';
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Database\DBPDO;
|
||||||
|
use Battles\Template;
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$Tournament = new Tournament();
|
$Tournament = new Tournament();
|
||||||
\Battles\Template::header('Турниры');
|
Template::header('Турниры');
|
||||||
?>
|
?>
|
||||||
<META HTTP-EQUIV="REFRESH" CONTENT="10">
|
<META HTTP-EQUIV="REFRESH" CONTENT="10">
|
||||||
<div style='color:#8F0000; font-weight:bold; font-size:16px; text-align:center; float:left;'>Турнирная</div>
|
<div style='color:#8F0000; font-weight:bold; font-size:16px; text-align:center; float:left;'>Турнирная</div>
|
||||||
@ -29,20 +33,20 @@ if (!empty($_POST)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$dateD = mysql_fetch_row(mysql_query("select datetime from turnament where old=0 limit 1"));
|
$dateD = DBPDO::$db->fetch('select datetime from turnament where old = 0 limit 1');
|
||||||
|
|
||||||
if (mktime() >= ($dateD[0] + 10)) {
|
if (mktime() >= ($dateD['dt'] + 10)) {
|
||||||
$Tournament->UpdateTournir();
|
$Tournament->UpdateTournir();
|
||||||
}
|
}
|
||||||
$Tournament->showAllTurnament();
|
$Tournament->showAllTurnament();
|
||||||
|
|
||||||
if (mktime() >= ($dateD[0] + 10)) {
|
if (mktime() >= ($dateD['dt'] + 10)) {
|
||||||
$Tournament->StartTournir();
|
$Tournament->StartTournir();
|
||||||
}
|
}
|
||||||
$Tournament->ShowTournirFinaliats();
|
$Tournament->ShowTournirFinaliats();
|
||||||
?>
|
?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php if ($user->getAdmin()) { ?>
|
<?php if (User::$current->getAdmin()) { ?>
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" name="newtournament" value="Добавить новый турнир">
|
<input type="submit" name="newtournament" value="Добавить новый турнир">
|
||||||
<input type="submit" name="preptournament" value="Приготовить турнир и запустить">
|
<input type="submit" name="preptournament" value="Приготовить турнир и запустить">
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
class predbannik_bs
|
class predbannik_bs
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($user['in_tower'] != 1) {
|
if (User::$current->getInTower() != 1) {
|
||||||
header('Location: main.php');
|
header('Location: main.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$effect = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '{$user['id']}' LIMIT 1"));
|
$effect = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '{$user['id']}' LIMIT 1"));
|
||||||
if ($user->getRoom() != 31) {
|
if ($user->getRoom() != 31) {
|
||||||
|
23
ul_clans.php
23
ul_clans.php
@ -1,23 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
|
use Battles\Database\DBPDO;
|
||||||
|
use Battles\Template;
|
||||||
|
use Battles\User;
|
||||||
|
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
$user = new \Battles\User($_SESSION['uid']);
|
if (!empty($_GET['id']) && User::$current->getAdmin()) {
|
||||||
if ($_GET['id'] && $user->getAdmin()) {
|
|
||||||
echo "Пробуем перейти на выбранную замковую улицу...";
|
echo "Пробуем перейти на выбранную замковую улицу...";
|
||||||
$_SESSION["klan"] = $_GET['klan'];
|
$_SESSION["klan"] = $_GET['klan'];
|
||||||
$a = $_GET['klan'];
|
$a = $_GET['klan'];
|
||||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 651, `online`.`room` = 651 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
DBPDO::$db->execute('update users, online set users.room = 651, online.room = 651 where user_id = id and user_id = ?', User::$current->getId());
|
||||||
header("location: city.php");
|
header("location: city.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
\Battles\Template::header('Клановый перекрёсток');
|
Template::header('Клановый перекрёсток');
|
||||||
?>
|
?>
|
||||||
<a href="/city.php?strah=1">← назад</a>
|
<a href="/city.php?strah=1">← назад</a>
|
||||||
<h1>Переход к клановым улицам</h1>
|
<h1>Переход к клановым улицам</h1>
|
||||||
На данный момент свои замки имеют такие кланы:
|
На данный момент свои замки имеют такие кланы:
|
||||||
<?php
|
<?php
|
||||||
$query = db::c()->query('SELECT `id`,`short`,`align`,`name` FROM `clans` WHERE `zamok` = 2');
|
$rows = DBPDO::$db->fetchAll('select short_name, full_name, owner_id from clans where zamok = 2');
|
||||||
while ($row = $query->fetch_assoc()) {
|
foreach ($rows as $row) {
|
||||||
$frm = "<img src='i/align_%s.png'> <img src='i/clan/%s.png'> %s<br><form><input name='klan' type='hidden' value='%s'><input type='submit' value='Вход'></form>";
|
$frm = "<img src='i/clan/%s.png'> %s<br><form><input name='klan' type='hidden' value='%s'><input type='submit' value='Вход'></form>";
|
||||||
echo sprintf($frm, $row['align'], $row['short'], $row['name'], $row['id']);
|
echo sprintf($frm, $row['short_name'], $row['full_name'], $row['owner_id']);
|
||||||
}
|
}
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
if (!empty($_GET['teleport']) && $user->getAdmin() == 1) {
|
if (!empty($_GET['teleport']) && $user->getAdmin() == 1) {
|
||||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
use Battles\User;
|
use Battles\User;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
|
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
|
||||||
$oldpsw = filter_input(INPUT_POST, 'oldpsw', FILTER_SANITIZE_SPECIAL_CHARS);
|
$oldpsw = filter_input(INPUT_POST, 'oldpsw', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
1
vxod.php
1
vxod.php
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if ($user->getLevel() < 4 && $user->getLevel() > 10) {
|
if ($user->getLevel() < 4 && $user->getLevel() > 10) {
|
||||||
header('location: main.php?act=none');
|
header('location: main.php?act=none');
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Battles\DressedItems;
|
||||||
use Battles\Nick;
|
use Battles\Nick;
|
||||||
use Battles\Template;
|
use Battles\Template;
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
try {
|
try {
|
||||||
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE, `clans` WRITE');
|
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE, `clans` WRITE');
|
||||||
@ -419,11 +419,11 @@ class Zayavka
|
|||||||
|
|
||||||
if ($z['type'] == 4 || $z['type'] == 5) {
|
if ($z['type'] == 4 || $z['type'] == 5) {
|
||||||
foreach ($z['team1'] as $k => $v) {
|
foreach ($z['team1'] as $k => $v) {
|
||||||
\Battles\DressedItems::undressAllItems($v);
|
DressedItems::undressAllItems($v);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($z['team2'] as $k => $v) {
|
foreach ($z['team2'] as $k => $v) {
|
||||||
\Battles\DressedItems::undressAllItems($v);
|
DressedItems::undressAllItems($v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user