From 2a2fa4096919437518c173a6bdb5090b4d102b8a Mon Sep 17 00:00:00 2001 From: lopar Date: Mon, 5 Nov 2018 23:09:51 +0200 Subject: [PATCH] Fix syschat sending --- admin/admin.php | 3 +-- chat.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/admin.php b/admin/admin.php index 995809d..71b24e0 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -1005,8 +1005,7 @@ while ($row = $prs->fetch_assoc()) { } # Системное сообщение. if ($_POST['newsmsg']) { - $from = ''; - AddChatSystem($from . $_POST['newsmsg'] . ""); + AddChatSystem($_POST['newsmsg']); echo "Системное сообщение отправлено."; } # Меняем статусы diff --git a/chat.php b/chat.php index b93b430..44f59bc 100644 --- a/chat.php +++ b/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('%s %s', $d->format('H:i'),$m)."
"; + echo sprintf('%s %s', $d->format('H:i'),$m)."
"; } else echo sprintf('%s [%s]: %s', $d->format('H:i'),$message['from'],$m)."
"; } }