Реализация ChatMessageDTO.
This commit is contained in:
+8
-13
@@ -13,11 +13,7 @@ if (!in_array(UserIp::get(), ['', '127.0.0.1', '91.228.152.24', $_SERVER['SERVER
|
||||
|
||||
function e($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
|
||||
'H:i:s'
|
||||
) . ' (Критическая ошибка): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","TABU","6","1","-1")'
|
||||
);
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['cron_core'])) {
|
||||
@@ -111,14 +107,13 @@ if (isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user'] !
|
||||
$magic->atackUser($u->info['id'], $ua['id'], $ua['team'], $ua['battle'], $ua['bbexp'], 50);
|
||||
|
||||
$rtxt = '[img[items/pal_button8.gif]] "' . $u->info['login'] . '" совершил' . $sx . ' нападение по метке на персонажа "' . $ua['login'] . '".';
|
||||
Db::sql(
|
||||
'insert into chat (new, type, typeTime, time, city, room, text) values (1,6,1,unix_timestamp(),?,?,?)',
|
||||
[
|
||||
$u->info['city'],
|
||||
$u->info['room'],
|
||||
$rtxt,
|
||||
]
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
header('location: main.php');
|
||||
die();
|
||||
|
||||
Reference in New Issue
Block a user