• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Php code messed up in footer

freaksavior

To infinity ... and beyond!
Joined
Dec 11, 2006
Messages
8,095 (1.28/day)
System Name ZeroUptime | M.A.S.S / MM1
Processor Xeon 2659 v3 / Xeon 2683 v4 / ARM A14
Motherboard Asus X99-E-10G WS / ASRock x99 usb 3.1 / Apple
Cooling NZXT Kraken / Noctua NH-L12 / Apple
Memory 16Gb DDR4 / 32Gb DDR4 / 16GB HBLM
Video Card(s) Powercooler ATI vega 64 / GT 7300 / ARM
Storage Samsung 970 512 Evo NVMe / A lot. / 256 + 512 External TB3
Display(s) Acer Predator X34 / Headless / Acer X34 Non predator
Case NZXT H630 |Rosewill 8bay 4u server chasiss / MMM1
Audio Device(s) Onboard / Onboard / Onboard
Power Supply Corais HX850 | Corsair TX750 / Internal 250w
Mouse g502 proteus core / Headless / g502 proteus core
Keyboard Corsair K95 Cherry Blue / Headless / K65 Cherry Red
Software Windows 10 / ESXI / Big Sur 11.2.2
Hey guys,

I modified the code in this footer.php file but I have no idea why it's not being formatted right. Before I messed with it, it worked.

<?php
?>

<!-- FOOTER -->
<div id="footer">

<?php if(GetDCCPInterface()->getIGeneral()->showFooterLinks()) { ?>
<div class="links-info-container">


<div class="clear-both"></div>
</div> <!--links-info-container-->
<?php } ?>

<?php if(GetDCCPInterface()->getIGeneral()->showFooterWidgetized()) { ?>
<div id="widgetized-footer">
<div class="sidebar">
<?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarA(); ?>
</div>
<div class="sidebar">
<?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarB(); ?>
</div>
<div class="sidebar-last">
<?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarC(); ?>
</div>
<div class="clear-both"></div>
</div> <!--widgetized-footer-->

<div class="links">
<h6>ABOUT</h6>
<a class="linkType3" href="#">History</a><br />
<a class="linkType3" href="#">Jobs Information</a><br />
<a class="linkType3" href="#">Our Services</a><br />
<a class="linkType3" href="#">Our Stuff</a>
</div>

<div class="links">
<h6>SERVICES</h6>
<a class="linkType3" href="#">Website Templates</a><br />
<a class="linkType3" href="#">Logo Design</a><br />
<a class="linkType3" href="#">Mobile Applications</a><br />
<a class="linkType3" href="#">Graphic Design</a>
</div>

<div class="links">
<h6>TEMPLATES</h6>
<a class="linkType3" href="#">Image positioning</a><br />
<a class="linkType3" href="#">List examples</a><br />
<a class="linkType3" href="#">Text and Table</a><br />
<a class="linkType3" href="#">Full Page examples</a>
</div>

<div class="links">
<h6>CONTACT / HELP</h6>
<a class="linkType3" href="#">Help/FAQ</a><br />
<a class="linkType3" href="#">Contact</a><br />
<a class="linkType3" href="#">Office Locations</a><br />
<a class="linkType3" href="#">Company Headquarter</a>
</div>

<div class="info">
<h6>COMPANY INFO</h6>
<p>Company street adress 12</p>
<p>State 1234</p>
<p>precious@ourdomain.com</p>
<p>Phone: (550) 2343-1234</p>
<p>Fax: (550) 2343-123</p>
</div>

<?php }


$fb_style = ' style="';
$show_copy = GetDCCPInterface()->getIGeneral()->showFooterCopy();
$show_line = GetDCCPInterface()->getIGeneral()->showFooterLine();

if(!$show_line)
{
$fb_style .= 'background-image:none;';
}
$fb_style .= '" ';

echo '<div id="footer-bottom" '.$fb_style.'>';

if($show_copy)
{
echo GetDCCPInterface()->getIGeneral()->getFooterCopy().'<br />';
}

if(GetDCCPInterface()->getIGeneral()->showFooterLogo())
{
?>

<a href="<?php echo get_bloginfo('url'); ?>"><img src="<?php echo GetDCCPInterface()->getIGeneral()->getFooterLogoPath(); ?>" style="margin-top:8px;" alt="" /></a><br />

<?php } ?>
</div> <!--footer-bottom-->

</div> <!--footer-->



<?php wp_footer(); GetDCCPInterface()->getIGeneral()->printFooterTrackingCode(); ?>
</body>
</html>

<?php ob_end_flush(); ?>

It looks like this right now
Screen shot 2011-06-04 at 12.52.32 PM.png
but it should look like
Screen shot 2011-06-04 at 12.53.49 PM.png

What did I do wrong?
Original code is this
<?php

?>

<!-- FOOTER -->
<div id="footer">

<?php if(GetDCCPInterface()->getIGeneral()->showFooterLinks()) { ?>
<div class="links-info-container">

<div class="links">
<h6>ABOUT</h6>
<a class="linkType3" href="#">History</a><br />
<a class="linkType3" href="#">Jobs Information</a><br />
<a class="linkType3" href="#">Our Services</a><br />
<a class="linkType3" href="#">Our Stuff</a>
</div>

<div class="links">
<h6>SERVICES</h6>
<a class="linkType3" href="#">Website Templates</a><br />
<a class="linkType3" href="#">Logo Design</a><br />
<a class="linkType3" href="#">Mobile Applications</a><br />
<a class="linkType3" href="#">Graphic Design</a>
</div>

<div class="links">
<h6>TEMPLATES</h6>
<a class="linkType3" href="#">Image positioning</a><br />
<a class="linkType3" href="#">List examples</a><br />
<a class="linkType3" href="#">Text and Table</a><br />
<a class="linkType3" href="#">Full Page examples</a>
</div>

<div class="links">
<h6>CONTACT / HELP</h6>
<a class="linkType3" href="#">Help/FAQ</a><br />
<a class="linkType3" href="#">Contact</a><br />
<a class="linkType3" href="#">Office Locations</a><br />
<a class="linkType3" href="#">Company Headquarter</a>
</div>

<div class="info">
<h6>COMPANY INFO</h6>
<p>Company street adress 12</p>
<p>State 1234</p>
<p>precious@ourdomain.com</p>
<p>Phone: (550) 2343-1234</p>
<p>Fax: (550) 2343-123</p>
</div>
<div class="clear-both"></div>
</div> <!--links-info-container-->
<?php } ?>

<?php if(GetDCCPInterface()->getIGeneral()->showFooterWidgetized()) { ?>
<div id="widgetized-footer">
<div class="sidebar">
<?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarA(); ?>
</div>
<div class="sidebar">
<?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarB(); ?>
</div>
<div class="sidebar-last">
<?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarC(); ?>
</div>
<div class="clear-both"></div>
</div> <!--widgetized-footer-->
<?php }


$fb_style = ' style="';
$show_copy = GetDCCPInterface()->getIGeneral()->showFooterCopy();
$show_line = GetDCCPInterface()->getIGeneral()->showFooterLine();

if(!$show_line)
{
$fb_style .= 'background-image:none;';
}
$fb_style .= '" ';

echo '<div id="footer-bottom" '.$fb_style.'>';

if($show_copy)
{
echo GetDCCPInterface()->getIGeneral()->getFooterCopy().'<br />';
}

if(GetDCCPInterface()->getIGeneral()->showFooterLogo())
{
?>
<a href="<?php echo get_bloginfo('url'); ?>"><img src="<?php echo GetDCCPInterface()->getIGeneral()->getFooterLogoPath(); ?>" style="margin-top:8px;" alt="" /></a><br />
<?php } ?>
</div> <!--footer-bottom-->

</div> <!--footer-->



<?php wp_footer(); GetDCCPInterface()->getIGeneral()->printFooterTrackingCode(); ?>
</body>
</html>

<?php ob_end_flush(); ?>

I need the widgets above the messed up area so I know i'm headed in the right direction but I'm just not sure what is wrong.
Thanks for the help guys
 

freaksavior

To infinity ... and beyond!
Joined
Dec 11, 2006
Messages
8,095 (1.28/day)
System Name ZeroUptime | M.A.S.S / MM1
Processor Xeon 2659 v3 / Xeon 2683 v4 / ARM A14
Motherboard Asus X99-E-10G WS / ASRock x99 usb 3.1 / Apple
Cooling NZXT Kraken / Noctua NH-L12 / Apple
Memory 16Gb DDR4 / 32Gb DDR4 / 16GB HBLM
Video Card(s) Powercooler ATI vega 64 / GT 7300 / ARM
Storage Samsung 970 512 Evo NVMe / A lot. / 256 + 512 External TB3
Display(s) Acer Predator X34 / Headless / Acer X34 Non predator
Case NZXT H630 |Rosewill 8bay 4u server chasiss / MMM1
Audio Device(s) Onboard / Onboard / Onboard
Power Supply Corais HX850 | Corsair TX750 / Internal 250w
Mouse g502 proteus core / Headless / g502 proteus core
Keyboard Corsair K95 Cherry Blue / Headless / K65 Cherry Red
Software Windows 10 / ESXI / Big Sur 11.2.2
Figured it out afterall. I tried for almost two days.

Code:
<?php
/**********************************************************************
* PRESTIGE WORDPRESS EDITION 
* (Ideal For Business And Personal Use: Portfolio or Blog)     
* 
* File name:   
*      footer.php
* Brief:       
*      Footer code for all theme files
* Author:      
*      #####
* Author URI:
*      #####
* Contact:
*      ######  
***********************************************************************/
?>

    <!-- FOOTER -->      
    <div id="footer">
    
        <?php if(GetDCCPInterface()->getIGeneral()->showFooterLinks()) { ?>
        
        <?php } ?>
        
        <?php if(GetDCCPInterface()->getIGeneral()->showFooterWidgetized()) { ?>
        <div id="widgetized-footer">
            <div class="sidebar">
                <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarA(); ?>
            </div>
            <div class="sidebar">
                <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarB(); ?> 
            </div>
            <div class="sidebar-last">
                <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarC(); ?> 
            </div>
            <div class="clear-both"></div>                        
        </div> <!--widgetized-footer-->

        <div class="links-info-container">
    
            <div class="links">
                <h6>ABOUT</h6>
                <a class="linkType3" href="#">History</a><br />
                <a class="linkType3" href="#">Jobs Information</a><br />
                <a class="linkType3" href="#">Our Services</a><br />
                <a class="linkType3" href="#">Our Stuff</a>
               </div>
            
            <div class="links">
                <h6>SERVICES</h6>
                <a class="linkType3" href="#">Website Templates</a><br />
                <a class="linkType3" href="#">Logo Design</a><br />
                <a class="linkType3" href="#">Mobile Applications</a><br />
                <a class="linkType3" href="#">Graphic Design</a>
               </div>
            
            <div class="links">
                <h6>TEMPLATES</h6>
                <a class="linkType3" href="#">Image positioning</a><br />
                <a class="linkType3" href="#">List examples</a><br />
                <a class="linkType3" href="#">Text and Table</a><br />
                <a class="linkType3" href="#">Full Page examples</a>
               </div>
            
            <div class="links">
                <h6>CONTACT / HELP</h6>
                <a class="linkType3" href="#">Help/FAQ</a><br />
                <a class="linkType3" href="#">Contact</a><br />
                <a class="linkType3" href="#">Office Locations</a><br />
                <a class="linkType3" href="#">Company Headquarter</a>
               </div>
            
            <div class="info">
                <h6>COMPANY INFO</h6>
                <p>Company street adress 12</p>
                <p>State 1234</p>
                <p>precious@ourdomain.com</p>
                <p>Phone: (550) 2343-1234</p>
                <p>Fax: (550) 2343-123</p>
            </div>
            <div class="clear-both"></div> 

        <?php } 
        

            $fb_style = ' style="';
            $show_copy = GetDCCPInterface()->getIGeneral()->showFooterCopy();
            $show_line = GetDCCPInterface()->getIGeneral()->showFooterLine();

            if(!$show_line)
            {
                $fb_style .= 'background-image:none;';     
            }
            $fb_style .= '" ';
            
            echo '<div id="footer-bottom" '.$fb_style.'>';
            
                if($show_copy)
                {
                    echo GetDCCPInterface()->getIGeneral()->getFooterCopy().'<br />';
                }
                
                if(GetDCCPInterface()->getIGeneral()->showFooterLogo())
                {              
            ?>
            <a href="<?php  echo get_bloginfo('url'); ?>"><img src="<?php  echo GetDCCPInterface()->getIGeneral()->getFooterLogoPath(); ?>" style="margin-top:8px;" alt="" /></a><br />
            <?php } ?>
        </div> <!--footer-bottom-->  
        
    </div> <!--footer-->
    

  
    <?php wp_footer(); GetDCCPInterface()->getIGeneral()->printFooterTrackingCode(); ?>
</body>
</html>

<?php ob_end_flush(); ?>
 
Top