bank fixes

This commit is contained in:
lopar 2018-03-09 20:55:26 +02:00
parent 1bce446b16
commit 722f8514c7

View File

@ -13,23 +13,12 @@ if ($user['battle'] != 0) {
$cost_login = 25;
######## ОБЩИЕ ЗАПРОСЫ В БАЗУ ###
$bank = db::c()->query('SELECT `id`, `cr`, `ekr` FROM `bank` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
#################################
function inschet($userid)
{
$banks = db::c()->query('SELECT `id` FROM `bank` WHERE `owner` = ?i', $userid);
echo "<select style='width:150px' name=id>";
while ($rah = $banks->fetch_assoc()) {
echo "<option>" . $rah['id'] . "</option>";
}
echo "</select>";
}
$bank = db::c()->query('SELECT `id`, `cr`, `ekr` FROM `bank` WHERE `id` = ?i', $_SESSION['bankid'])->fetch_assoc();
if (!$bank['id']) {
db::c()->query('INSERT INTO `bank` (`id`) VALUES (?i)', $_SESSION['bankid']);
$_SESSION['bankid'] = null;
db::c()->query('INSERT INTO `bank` (`id`) VALUES (?i)', $_SESSION['uid']);
}
?>