Реализация ChatMessageDTO.

This commit is contained in:
2023-01-28 04:24:37 +02:00
parent d9ec810f7f
commit 99b90a198b
105 changed files with 11492 additions and 10578 deletions
+17 -8
View File
@@ -279,10 +279,14 @@ if ($u->room['file'] == 'bank') {
$u->bank['id']
) . ' на ваш банковский счет №' . getNum($ub['id']) . '.';
mysql_query(
"INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time(
) . "','12','0','1')"
);
$cmsg = new ChatMessage();
$cmsg->setCity($ut['city']);
$cmsg->setRoom($ut['room']);
$cmsg->setTo($ut['login']);
$cmsg->setText($text);
$cmsg->setType(12);
$cmsg->setTypeTime(1);
(new Chat())->sendMsg($cmsg);
}
} else {
$re2 = 'Не удалось выполнить операцию';
@@ -365,10 +369,15 @@ if ($u->room['file'] == 'bank') {
$text = '&quot;[login:' . $u->info['login'] . ']&quot; перевел' . ($u->info['sex'] == 0 ? "" : "а") . ' вам <b>' . ($mn - $prc) . ' кр.</b> со своего банковского счета №' . getNum(
$u->bank['id']
) . ' на ваш банковский счет №' . getNum($ub['id']) . '.';
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time(
) . "','6','0','1')"
);
$cmsg = new ChatMessage();
$cmsg->setCity($ut['city']);
$cmsg->setRoom($ut['room']);
$cmsg->setTo($ut['login']);
$cmsg->setText($text);
$cmsg->setType(6);
$cmsg->setTypeTime(1);
(new Chat())->sendMsg($cmsg);
}
} else {
$re2 = 'Не удалось выполнить операцию';