$quantity = 0; if ($userRealEstateIDsToQuantity && array_key_exists($estateId, $userRealEstateIDsToQuantity)) { $quantity = $userRealEstateIDsToQuantity[$estateId]; } $estatePrice = $originalPrice + INCREASE_REAL_ESTATE_PERCENTAGE * $originalPrice * $quantity; $previousQuanity = $_GET['previousQuanity']; $buy_quantity = $_GET['quantity']; $realEstatePrice = $_GET['purchasePrice']; $requestURL = $serverRoot . 'backend/shoprealestateaction.php?actionToDo=buy&previousQuanity=' . $previousQuanity . '&quantity=' . $buy_quantity . '&userCash=' . $user->getCash() . '&purchasePrice=' . $realEstatePrice . '&realEstateID=' . $estateId . '&originalPrice=' . $originalPrice; echo ' <div class="successmessage"> <p class="successfailuremessage"><span class="success line_height_3" >Congratuations! </span> You have successfully bought <span class="cost">$' . $_GET['cash'] . '</span> for <strong>' . $_GET['diamonds'] . '</strong> Diamonds<a href="' . $requestURL . '" class="notification_domission">Buy Estate</a></p> </div>'; } } $lockedRealEstates = array_values(RealEstate::getLockedRealEstate($playerLevel)); ?> <div class="equipment"> <div class="realestatetop"> <h2>Real Estate</h2> <p>Income: <span class="income">$<?php echo $PlayerIncome; ?> </span> / Upkeep: <span class="upkeep">$<?php echo $PlayerUpkeep; ?> </span></p> </div> <div class="cashflowinfo"> <p>Cash flow: <strong>$<?php