From 081a98a2f65fefcab19eb485eeea07b81892d01e Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 24 Jun 2018 14:34:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A5=D1=80=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D0=B2=20=D1=81?= =?UTF-8?q?=D0=B5=D1=81=D1=81=D0=B8=D0=B8,=20=D1=87=D1=82=D0=BE=D0=B1?= =?UTF-8?q?=D1=8B=20=D0=B8=D0=B7=D0=B1=D0=B5=D0=B6=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=BB=D0=BE=D0=B3=D0=B8=D0=BD=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- post.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/post.php b/post.php index 25cea92..67c60a2 100644 --- a/post.php +++ b/post.php @@ -30,9 +30,10 @@ if ($_SESSION['receiverName']) { $allowOperations = true; $receiverId = $receiver['id']; $submit = filter_input(INPUT_POST, 'action'); + $telegraphText = filter_input(INPUT_POST, 'message'); + + if ($submit == 'sendMessage' && $telegraphText && $user['money'] >= 1) { - if ($submit == 'sendMessage' && $user['money'] >= 1) { - $telegraphText = filter_input(INPUT_POST, 'message'); if ($telegraphText) { db::c()->query('UPDATE `users` SET `money` = `money` - 1 WHERE id=?i', $user['id']); db::c()->query('INSERT INTO `telegraph` (`receiver`,`text`) VALUES (?i,"?s")', $receiverId, $telegraphText); @@ -96,8 +97,7 @@ if ($_SESSION['receiverName']) { - +