hasExpired()) { $tmp = fetchAllHouses_03(); $cache->setContent($tmp); $cache->save(); foreach ($tmp as $t) { if ($t['town'] == $townid) $array[] = $t; } $array = isset($array) ? $array : false; } else { $tmp = $cache->load(); foreach ($tmp as $t) { if ($t['town'] == $townid) $array[] = $t; } $array = isset($array) ? $array : false; } // Design and present the list if ($array) { $guild_support = (isset($array[0]['guild'])) ? true : false; ?>

house list.

Town list / houses
">
'; echo ""; echo ""; echo ""; echo ""; echo ""; if ($value['owner'] == 0) echo ""; else { if ($guild_support && $value['guild'] == 1) { $guild_name = get_guild_name($value['owner']); echo ''; } else { $data = user_character_data($value['owner'], 'name'); echo ''; } } echo ''; } ?>
Name: Size: Doors: Beds: Price: Owner:
". $value['name'] ."". $value['size'] ."". $value['doors'] ."". $value['beds'] ."". $value['price'] ."None'. $guild_name .''. $data['name'] .'

'; //Token::debug($_POST['token']); echo 'Please clear your web cache/cookies OR use another web browser
'; } } else { if (empty($_POST) === true && $config['ServerEngine'] === 'TFS_03') { ?>
Town list / houses
">
House file not found

FAILED TO LOCATE/READ FILE AT:
". $house['house_file'] ."

LINUX users: Make sure www-data have read access to file.
WINDOWS users: Learn to write correct file path.

"); exit(); } // Load and cache SQL house data: $cache = new Cache('engine/cache/houses/sqldata'); if ($cache->hasExpired()) { $house_query = mysql_select_multi('SELECT `players`.`name`, `houses`.`id` FROM `players`, `houses` WHERE `houses`.`owner` = `players`.`id`;'); $cache->setContent($house_query); $cache->save(); } else $house_query = $cache->load(); $sqmPrice = $house['price_sqm']; $house_load = simplexml_load_file($house['house_file']); if ($house_query !== false && $house_load !== false) { ?>

House list

'. $row['name'] .''; foreach ($house_load as $house_fetch){ $house_price = (int)$house_fetch['size'] * $sqmPrice; ?>
House Location Owner Size Rent
Something is wrong with the cache.

'; } else if ($config['ServerEngine'] === 'TFS_10') { // Fetch values $querystring_id = &$_GET['id']; $townid = ($querystring_id) ? (int)$_GET['id'] : $config['houseConfig']['HouseListDefaultTown']; $towns = $config['towns']; $order = &$_GET['order']; $type = &$_GET['type']; // Create Search house box ?>
Town Order Sort
hasExpired()) { $houses = mysql_select_multi("SELECT `id`, `owner`, `paid`, `warnings`, `name`, `rent`, `town_id`, `size`, `beds`, `bid`, `bid_end`, `last_bid`, `highest_bidder` FROM `houses` ORDER BY {$order} {$type};"); if ($houses !== false) { // Fetch player names $playerlist = array(); foreach ($houses as $h) if ($h['owner'] > 0) $playerlist[] = $h['owner']; if (!empty($playerlist)) { $ids = join(',', $playerlist); $tmpPlayers = mysql_select_multi("SELECT `id`, `name` FROM players WHERE `id` IN ($ids);"); // Sort $tmpPlayers by player id $tmpById = array(); foreach ($tmpPlayers as $p) $tmpById[$p['id']] = $p['name']; for ($i = 0; $i < count($houses); $i++) if ($houses[$i]['owner'] > 0) $houses[$i]['ownername'] = $tmpById[$houses[$i]['owner']]; } $cache->setContent($houses); $cache->save(); } } else $houses = $cache->load(); if ($houses !== false || !empty($houses)) { // Intialize stuff //data_dump($houses, false, "House data"); ?> ". $house['ownername'] .""; else echo ($house['highest_bidder'] == 0 ? '' : ''); ?>
Name Size Beds Rent Owner Town
". $house['name'] .""; ?> NoneSelling
Failed to fetch data from sql->houses table.

Is the table empty?

"; } // End TFS 1.0 logic } include 'layout/overall/footer.php'; ?>