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} кр.";