Часть логов теперь пишется в SQLITE, а не в текстовые файлы (#33). Проинициализирован класс Nick в свитках.

This commit is contained in:
Igor Barkov (iwork)
2021-08-26 17:44:14 +03:00
parent 6fa217b93b
commit 5e264f837a
65 changed files with 438 additions and 233 deletions

View File

@@ -1,4 +1,8 @@
<?php
use Battles\GameLogs;
use Battles\Nick;
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
@@ -57,7 +61,7 @@ if ($user['battle'] == 0) {
$t1 = implode(";", $t1);
$t2 = implode(";", $t2);
addlog($user['battle'], '<span class=date>' . date("H:i") . '</span> ' . Nick::id($user['id'])->short() . ' переманил клона ' . Nick::id($bot)->short() . ' на свою сторону<BR>');
GameLogs::addBattleLog($user['battle'], '<span class=date>' . date("H:i") . '</span> ' . Nick::id($user['id'])->short() . ' переманил клона ' . Nick::id($bot)->short() . ' на свою сторону<BR>');
mysql_query('UPDATE `battle` SET `teams` = \'' . serialize($battle) . '\', `t1` = \'' . $t1 . '\', `t2` = \'' . $t2 . '\' WHERE `id` = ' . $user['battle'] . ' ;');
mysql_query("UPDATE `battle` SET `to1` = '" . time() . "', `to2` = '" . time() . "' WHERE `id` = " . $user['battle'] . " LIMIT 1;");