From 540e5bace98936ac96d09b80e63497890bb5f4f9 Mon Sep 17 00:00:00 2001 From: "Igor Barkov [iwork]" Date: Mon, 28 Jan 2019 18:15:24 +0200 Subject: [PATCH] =?UTF-8?q?Final:=20=D0=94=D0=B5=D0=BB=D0=B0=D0=B5=D0=BC?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=B4=D0=B0=D1=80=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inf.php | 2 +- presents.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/inf.php b/inf.php index 3483bf8..69c9166 100644 --- a/inf.php +++ b/inf.php @@ -72,7 +72,7 @@ if (!empty($user['realname'])) echo "Имя: " . $user['realname'] . "
"; while ($row = $presents_new->fetch_assoc()) if (empty($row['sender'])) $sender = 'Анонимный подарок'; else $sender = 'Подарок от ' . $row['sender']; - echo ""; + echo ""; ?> diff --git a/presents.php b/presents.php index fb0b9f9..0293262 100644 --- a/presents.php +++ b/presents.php @@ -52,9 +52,10 @@ if (!empty($_POST['sendAction'])) { else $from = $user['login']; db::c()->query('UPDATE `users` SET `money` = `money` - ?i WHERE `id` = ?i', $cost, $_SESSION['uid']); - db::c()->query('INSERT INTO users_presents (owner, img, text, sender, expiration_date) VALUES (?i,"?s","?s","?s",DATE_ADD(NOW(),INTERVAL ?i DAY))', $receiver['id'], $_POST['present'], $_POST['text'], $_POST['from'], $_POST['days']); - $deloText = "{$user['login']} купил подарок за {$cost} кр. и подарил его персонажу {$_POST['receiver']}"; - addToDelo($deloText); + db::c()->query('INSERT INTO users_presents (owner, img, text, sender, expiration_date) VALUES (?i,"?s","?s","?s",DATE_ADD(NOW(),INTERVAL ?i DAY))', $receiver['id'], $_POST['present'], $_POST['text'], $_POST['sender'], $_POST['days']); + #FIXME Я так не хочу подключать functions! +// $deloText = "{$user['login']} купил подарок за {$cost} кр. и подарил его персонажу {$_POST['receiver']}"; +// addToDelo($deloText); $telegraphText = "Вам пришёл подарок от {$from}!"; db::c()->query('INSERT INTO `telegraph` (receiver, text) VALUES (?i,"?s")', $receiver['id'], $telegraphText)->fetch_assoc(); $status = "Подарок удачно доставлен к {$_POST['receiver']}! Вы потратили {$cost} кр.";