Telegraph to chat on-login (а само сообщение и отправителя, значит, закрысили и не передаём...).

This commit is contained in:
Igor Barkov [iwork] 2019-02-12 16:46:28 +02:00
parent 55813f6781
commit ec6579ea6b

View File

@ -48,7 +48,7 @@ if ($username && $password) {
$sms = db::c()->query('SELECT * FROM `telegraph` WHERE `receiver` = ?i', $data['id']);
while ($res = $sms->fetch_assoc()) {
db::c()->query('INSERT INTO `chat` (`uid`, `msg`, `type`) VALUES (?i, "?s", "?s")', $uid, $msg, 'sms');
db::c()->query('INSERT INTO `chat` (`touid`, `msg`, `type`) VALUES (?i, "?s", "?s")', $res['receiver'], $res['msg'], 'sms');
}
db::c()->query('DELETE FROM `telegraph` WHERE `receiver` = ?i', $data['id']);
header("Location: fight.php");