Fix syschat sending

This commit is contained in:
lopar 2018-11-05 23:09:51 +02:00
parent 60a5f64ff9
commit 2a2fa40969
2 changed files with 2 additions and 3 deletions

View File

@ -1005,8 +1005,7 @@ while ($row = $prs->fetch_assoc()) {
}
# Системное сообщение.
if ($_POST['newsmsg']) {
$from = '<span style="background:#faa;">';
AddChatSystem($from . $_POST['newsmsg'] . "</span>");
AddChatSystem($_POST['newsmsg']);
echo "<b style='color: green;'>Системное сообщение отправлено.</b>";
}
# Меняем статусы

View File

@ -30,7 +30,7 @@ FROM `chat` ORDER BY `id` ASC LIMIT 50');
$d = new DateTime($message['msgdate']);
$m = htmlspecialchars($message['msg']);
if ($message['type'] == 'sys') {
echo sprintf('<span style="color:maroon">%s %s</span>', $d->format('H:i'),$m)." <br>";
echo sprintf('<span style="color:maroon;background:#faa;">%s %s</span>', $d->format('H:i'),$m)." <br>";
} else echo sprintf('%s [%s]: %s', $d->format('H:i'),$message['from'],$m)." <br>";
}
}