aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authoralexichi <alexbankai96@gmail.com>2016-04-25 10:00:20 +0200
committeralexichi <alexbankai96@gmail.com>2016-04-25 10:08:29 +0200
commitd013e0e873277dd1bf29f51a83bbd9e467cad23b (patch)
tree85bc045e1e46c000376b9e033f7b7e1faa2dfaf0 /inc
parenta6768cc97e3b418e0df08bcc2b09d8ffb1c9daa2 (diff)
parent198eaff1fb3469e27318592c4b592e2f099f41a1 (diff)
downloadcandybox-d013e0e873277dd1bf29f51a83bbd9e467cad23b.tar.gz
candybox-d013e0e873277dd1bf29f51a83bbd9e467cad23b.tar.bz2
candybox-d013e0e873277dd1bf29f51a83bbd9e467cad23b.tar.xz
candybox-d013e0e873277dd1bf29f51a83bbd9e467cad23b.zip
Merge branch 'master' of piernov.org:candybox into alexichi
Conflicts: js/craftmine.js
Diffstat (limited to 'inc')
-rw-r--r--inc/mine.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/mine.inc b/inc/mine.inc
index 7a68237..a2ecd09 100644
--- a/inc/mine.inc
+++ b/inc/mine.inc
@@ -5,9 +5,10 @@ function initCraftMine() {
}
function withdrawMine() {
- $mine = $_SESSION["mine"];
- $_SESSION["mine"]["gold"] += $mine["mine"];
- $_SESSION["mine"]["mine"] = 0;
+ $amount = intval($_POST["amount"]);
+ if($amount == 0) return;
+ $_SESSION["mine"]["gold"] += $amount;
+ echo $_SESSION["mine"]["gold"];
}
function sendMine() {