Fix syschat sending
This commit is contained in:
parent
60a5f64ff9
commit
2a2fa40969
@ -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>";
|
||||
}
|
||||
# Меняем статусы
|
||||
|
2
chat.php
2
chat.php
@ -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>";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user