Изменено поле в БД, вынесены лишние функции их functions в профильные файлы. Оказывается, давно не работал логин и плохо работали сессии. Проверяется. Прочие мелкие баги и чистка самых хвостов.
This commit is contained in:
+3
-2
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Battles\ShopItem;
|
||||
use Battles\Template;
|
||||
|
||||
require_once 'functions.php';
|
||||
@@ -87,7 +88,7 @@ if (isset($_POST['buyFirst'])) {
|
||||
} else {
|
||||
$user['money'] -= 5;
|
||||
mysql_query('UPDATE `users` SET `money` = "' . $user['money'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
takeshopitem(1930, 'shop', '', '', 0, 0, $user['id'], 1, '', 0);
|
||||
ShopItem::giveNewItem(1930, $user['id']);
|
||||
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"" . $user['login'] . "\" купил Фамильный Герб за 5кр.', '1', '" . time() . "')");
|
||||
$error = 'Вы купили Фамильный Герб';
|
||||
}
|
||||
@@ -113,7 +114,7 @@ if (isset($_POST['buySecond'])) {
|
||||
} else {
|
||||
$user['money'] -= 15;
|
||||
mysql_query('UPDATE `users` SET `money` = "' . $user['money'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
takeshopitem(1931, 'shop', '', '', 0, 0, $user['id'], 1, '', 0);
|
||||
ShopItem::giveNewItem(1931, $user['id']);
|
||||
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"" . $user['login'] . "\" купил Фамильный Герб (x2) за 15кр.', '1', '" . time() . "')");
|
||||
$error = 'Вы купили Фамильный Герб (x2)';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user