Coding Overlapping Causing Errors

Status
Not open for further replies.

JayC

Always Learning
Aug 8, 2013
5,497
1,398
I know this project I am working on is related to HABBO
this thread involves CODING and is not meant to be talking about habbo so lets stick to just CODING, thanks!

Anyways I am having a problem with my website... I have a generic_top.tpl file that holds the top bar which displays information to the user, and I have the generic_top.tpl requiring top.php which is my side navigator.. When it calls to it , it flattens my div boxes and breaks them..

Without requiring top.php:

Requiring top.php:
Kit7nwF.png


Coding:


Code:
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8"%www%/>
    <link rel="stylesheet" href="%www%/newdesign/layout.css" type="text/css" media="screen" />
    <!--[if lt IE 9]>
    <link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="js/jquery-1.5.2.min.js" type="text/javascript"></script>
    <script src="js/hideshow.js" type="text/javascript"></script>
    <script src="js/jquery.tablesorter.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jquery.equalHeight.js"></script>
    <script type="text/javascript">
   
    $(document).ready(function()
        {
            $(".tablesorter").tablesorter();
        }
    );
    $(document).ready(function() {

    //When page loads...
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content

    //On Click Event
    $("ul.tabs li").click(function() {

        $("ul.tabs li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".tab_content").hide(); //Hide all tab content

        var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active ID content
        return false;
    });

});
   
    <script type="text/javascript">

    function Toggle(id)
    {
        var List = document.getElementById('list-' + id);
        var Button = document.getElementById('plus-' + id);
       
        if (List.style.display == 'block' || List.style.display == '')
        {
            List.style.display = 'none';
            Button.innerHTML = '+';
        }
        else
        {
            List.style.display = 'block';
            Button.innerHTML = '-';
        }
       
        setCookie('tab-' + id, List.style.display, 9999);   
    }

    function t(id)
    {
        var el = document.getElementById(id);
       
        if (el.style.display == 'block' || el.style.display == '')
        {
            el.style.display = 'none';
        }
        else
        {
            el.style.display = 'block';
        }
    }

    function setCookie(c_name,value,expiredays)
    {
        var exdate=new Date();
        exdate.setDate(exdate.getDate()+expiredays);
        document.cookie=c_name+ "=" +escape(value)+
        ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
    }

    function checkCookies()
    {
        ca = document.cookie.split(';');

        for (i = 0; i < ca.length; i++)
        {
            bits = ca[i].split('=');
           
            key = trim(bits[0]);
            value = trim(bits[1]);
           
            if (key.substr(0, 3) == 'tab')
            {
                tabName = key.substr(4);
               
                if (value == 'none')
                {
                    Toggle(tabName);
                }
            }
        }
    }

    function trim(value)
    {
        value = value.replace(/^\s+/,'');
        value = value.replace(/\s+$/,'');
        return value;
    }
    </script>
</head>

<body class="cbp-spmenu-push cbp-spmenu-push-toright">
<nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left cbp-spmenu-open" id="cbp-spmenu-s1">
        <h3><font color="green">Navigator</font></h3>
        <hr>
        <h3><font color="lightgreen">General</h3></font>
        <ul class="toggle">
            <a href="%www%/me.php"><font color="white">Me</a></font><br>
            <a href="%www%/community.php"><font color="white">Community</a></font><br>
            <a href="%www%/vip"><font color="white">Shop</a></font><br>
        </ul><hr>
        <h3><font color="lightgreen">Community</h3></font>
        <ul class="toggle">
            <a href="%www%/articles"><font color="white">News</a></font><br>
            <a href="%www%/topstats.php"><font color="white">Top Stats</a></font><br>
            <a href="%www%/tos.php"><font color="white">Terms of Service</a></font><br>
            <a href="%www%/rotw.php"><font color="white">ROTW Info</a></font><br>
            </ul><hr>
        <h3><font color="lightgreen">Shop</h3></font>
        <ul class="toggle">
            <a href="%www%/badgeshop.php"><font color="white">Badge Shop</a></font><br>
            <a href="%www%/pixels.php"><font color="white">Pixel Shop</a></font><br>
            <a href="%www%/coins.php"><font color="white">Credit Shop</a></font><br>
            <a href="%www%/vippoints.php"><font color="white">Shell Shop</a></font><br>
            </ul><hr>
            <h3><font color="lightgreen">Staff</h3></font>
        <ul class="toggle">
            <a href="%www%/vipmembers.php"><font color="white">VIP Members</a></font><br>
            <a href="%www%/experts.php"><font color="white">eXperts</a></font><br>
            <a href="%www%/events.php"><font color="white">Events</a></font><br>
            <a href="%www%/community/staff"><font color="white">Management</a></font><br>
            </ul><hr>
            <h3><font color="lightgreen">Extras</h3></font>
        <ul class="toggle">
            <a href="%www%/tinychat.php"><font color="white">Tinychat</a></font><br>
            <a href="%www%/lottery.php"><font color="white">Lottery</a></font><br>
            <a href="%www%/vault.php"><font color="white">Vault</a></font><br>
            </ul><hr>
            <?php if ($users->hasFuse(USER_ID, 'fuse_housekeeping_login')) { ?>
            <h3><font color="red">Housekeeping</h3></font>
            <a href="%www%/allseeingeye/index.php"><font color="white">HouseKeeping</a></font><br>
            <?php } ?><br>
            </body>
</nav>

Code:
<?php
$getSettings = dbquery("SELECT * FROM users WHERE username = '" . USER_NAME . "'");
$userAccount = mysql_fetch_assoc($getSettings);
?>
<body id="%body_id%" class="<?php if (!LOGGED_IN) { echo 'anonymous'; } ?> ">
<link rel="stylesheet" href="%www%/css/top.css" type="text/css" />

<div id="top">
<p class="alignleft"><b>Welcome Back %habboName% | <img src="/images/test/coin.png"/> <?php echo number_format($userAccount["credits"]); ?> Credits | <img src="/images/test/pixel.png"/><?php echo number_format($userAccount["activity_points"]); ?> Pixels  | <img src="http://127.0.0.1/images/vipcoin.gif"> Crowns: <?php echo number_format($userAccount["vip_points"]); ?> | Current Rank: <?php echo number_format($userAccount["rank"]); ?> |
<p class="alignright"> Logged in as <b>%habboName%</b> | <a href="/client" target="uberClientWnd" onclick="HabboClient.openOrFocus(this); return false;"><b>Enter Hotel</b><i></i></a>
<div style="clear: both;"></div></div> 
<?php
require_once "top.php";
?>

<div id="container">
<div id="content" style="position: relative" class="clearfix">

I thank you for looking over this code in advanced, I have narrowed down the arrow to only 1 file though:) just can't find whats causing it to glitch

Bump, please someone!

Please Close Thread @Canadian @RastaLulz I fixed error myself :) Recoded both pages
 
Last edited by a moderator:
Status
Not open for further replies.

Users who are viewing this thread

Top