blob: 42932436e3e6bd11ffd9048f3b3b398c533343e7 (
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 json_encode($_SESSION["mine"]["gold"]);
}
function sendMine() {
if(empty($_SESSION["mine"])) initCraftMine();
$mine = $_SESSION["mine"];
echo $mine["gold"];
}
?>
|