Реализация 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
+13 -9
View File
@@ -246,22 +246,26 @@ function timeOut($ttm)
return $out;
}
function e($t)
function e(string $text, string $to = '', int $time = 0)
{
$text = mysql_real_escape_string($text);
if (empty($time)) {
$time = time();
}
mysql_query(
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=#cb0000>' . mysql_real_escape_string(
$t
) . '</font>","capitalcity","","6","1","' . time() . '")'
"INSERT INTO `chat` (`text`,`to`,`type`,`new`,`time`,`color`) VALUES (
$text,
$to,
6,
1,
$time,
'#cb0000')"
);
}
function e2($t)
{
mysql_query(
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=#cb0000>' . mysql_real_escape_string(
$t
) . '</font>","capitalcity","Мусорщик","6","1","-1")'
);
e($t, 'Мусорщик', -1);
}
//Персонаж 1 нападает на 2