aboutsummaryrefslogtreecommitdiffstats
path: root/inc/mine.inc
blob: aea04ad2ba026f2058d25f63cc947334f017146e (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" => 1);
}

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"];
}


?>