From 432024d515638e17c522ec49f4cc7d98398b925a Mon Sep 17 00:00:00 2001 From: Kuzirashi Date: Sun, 20 Apr 2014 20:45:28 +0200 Subject: [PATCH] Added sorting to Houses. Fixed bugs. Added message to add town, to config.php, when it is not present. Code optimisation. This resolves #40. --- house.php | 14 +++--- houses.php | 122 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 85 insertions(+), 51 deletions(-) diff --git a/house.php b/house.php index 356e192..6679a94 100644 --- a/house.php +++ b/house.php @@ -14,9 +14,9 @@ if ($house !== false && $config['TFSVersion'] === 'TFS_10') { ////////////////////// // Bid on house logic - $bid_char = getValue($_POST['char']); - $bid_amount = getValue($_POST['amount']); - if ($bid_amount !== false && $bid_char !== false) { + $bid_char = &$_POST['char']; + $bid_amount = &$_POST['amount']; + if ($bid_amount && $bid_char) { $bid_char = (int)$bid_char; $bid_amount = (int)$bid_amount; $player = mysql_select_single("SELECT `id`, `account_id`, `name`, `level`, `balance` FROM `players` WHERE `id`='$bid_char' LIMIT 1;"); @@ -86,10 +86,14 @@ if ($house !== false && $config['TFSVersion'] === 'TFS_10') { ?>

House: