aboutsummaryrefslogtreecommitdiffstats
path: root/inc/mine.inc
blob: a2ecd09ead45831a7a632e4e0871bfffc67380bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

function initCraftMine() {
	$_SESSION["mine"] = array("mine" => 0, "gold" => 0, "miners" => 0);
}

function withdrawMine() {
	$amount = intval($_POST["amount"]);
	if($amount == 0) return;
	$_SESSION["mine"]["gold"] += $amount;
	echo $_SESSION["mine"]["gold"];
}

function sendMine() {
	if(empty($_SESSION["mine"])) initCraftMine();
	$mine = $_SESSION["mine"];
	echo $mine["gold"];
}


?>