aboutsummaryrefslogtreecommitdiffstats
path: root/inc/account.inc
blob: 6f398bb973e9ddee9f6892c5ba7c93fd7bd6fea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require_once("messages.inc");

function debitAccount($amount) {
	if($_SESSION["mine"]["gold"] < $amount) {
		sendError("gold_insufficient");
		return false;
	}
	$_SESSION["mine"]["gold"] -= $amount;
	return true;
}

function creditAccount($amount) {
	$_SESSION["mine"]["gold"] += $amount;
}


?>