Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Broken Page


So i am working on a mod that would allow users to buy houses or properties and ive got it all working but for some reason the code breaks the layout of fusion and i can not seem to figure out why. the page displays fine on initial load but then when you go to sell your house or buy your house the layout breaks and looks something like this.
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include INFUSIONS."sr/defined_db.php";

// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."sr/locale/".$settings['locale'].".php")) {
   // Load the locale file matching the current site locale setting.
   include INFUSIONS."sr/locale/".$settings['locale'].".php";
} else {
   // Load the infusion's default locale file.
   include INFUSIONS."sr/locale/English.php";

require "global_func.php";

//Defined Variables
$maxcars = $userdata['user_cars_ownedmax'];
$usermoneys = $userdata['user_money'];
$userid = $userdata['user_id'];

//Member Permissions
if (iMEMBER) {

$mpq = mysql_query("SELECT * FROM ".DB_HOUSES." WHERE house_carsmax='$maxcars'");
$mp = mysql_fetch_array($mpq);
$_GET['property'] = abs((int) $_GET['property']);

if ($_GET['property'])
opentable("Buy House");
    $npq =
            mysql_query("SELECT * FROM ".DB_HOUSES." WHERE house_id=".$_GET['property']."");
    $np = mysql_fetch_array($npq);
    if ($np['house_carsmax'] < $mp['house_carsmax'])
        echo "You cannot downgrade in houses!";
    else if ($np['house_price'] > $usermoneys)
        echo "You do not have enough money to buy the ".$np['house_name']."";
        mysql_query("UPDATE ".DB_USERS." SET user_money=money-".$np['house_price'].",user_cars_ownedmax=".$np['house_carsmax']." WHERE user_id=$userid");
        echo "Congrats, you bought the ".$np['house_name']." for $hpf!";
else if (isset($_GET['sellhouse']))
   opentable("Sell House");
    $npq =
            mysql_query("SELECT * FROM ".DB_HOUSES." WHERE house_carsmax=".$userdata['user_cars_ownedmax']."");
    $np = mysql_fetch_array($npq);
    if ($maxcars == 1)
        echo "You already live in the lowest property!";
                "UPDATE ".DB_USERS." SET user_cars_ownedmax=1 WHERE user_id=$userid");
        echo "You sold your ".$np['house_name']." and went back to your shed.";
    echo "</br><center>Your current property: <strong>".$mp['house_name']."</strong><br /><br />
   <table><tr><th>House</th><th>House Price</th><th>Car Lot Size</th><th></th><th>Buy?</th></tr>";
    if ($maxcars > 1)
        echo "<a href='estate.php?sellhouse'>Sell Your House</a><br /><br />";
    $hq =
            mysql_query("SELECT * FROM ".DB_HOUSES." WHERE house_carsmax>$maxcars ORDER BY house_carsmax ASC");
    while ($r = mysql_fetch_array($hq))
   //Money Format
   $hpf = money_formatter($r['house_price']);
      echo "<tr><td>".$r['house_name']."</a></td><td>".$hpf."</td>
   <td>Car Storage: ".$r['house_carsmax']." cars</td>
   <td><a href='estate.php?property=".$r['house_id']."'><img src='images/houses/".$r['house_img']."' alt='".$r['house_name']."' style='width:100px;height:75px;'></img></td><td><a href='estate.php?property=".$r['house_id']."'>Buy</tr>";
echo "</table></center>";
} else {
echo"Access Denied";   


require_once THEMES."templates/footer.php";

vidzspot attached the following file:
broken.png [142.14kB / 24 Downloads]
Thread Information
1 post
1,050 times
Last Post
Last updated on 5 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: vidzspot