seany123 Posted April 19, 2009 Share Posted April 19, 2009 im trying to add content to my template so when the template is included it will display the content above the the other content on the page... here is the code for my template, the php code at the bottom is the content i wish to go above the other normal page. <?php $query = $db->execute("select * from `city` where `city_id` like '$player->city_id'"); $city = $query->fetchrow(); ?> <html> <head> <title>mafiakiller</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="http://www.mafiakiller.co.cc/css/style.css" type="text/css" media="all" /> </script> </head> <body alink="#cc9900" vlink="#cc9900" link="#cc9900"> <div id="holder"> <div id="top_nav"> <div id="left"><a href="http://www.mafiakiller.co.cc/">Home</a> | <a href="http://www.vividgamer.com/" target="_new">vividGAMER.com</a></div> <div id="right"><a href="http://www.mafiakiller.co.cc/news.php">News</a> | <a href="http://www.mafiakiller.co.cc/online.php">Players Online</a> | <a href="http://www.mafiakiller.co.cc/c.php" target="_blank">Chat</a> | <a href="http://www.mafiakiller.co.cc/forum.php">Forum</a> | <a href="http://www.mafiakiller.co.cc/itempedia.php">Itempedia</a> | <a href="http://www.mafiakiller.co.cc/guide.php">Game Guide</a> | <a href="http://www.mafiakiller.co.cc/support.php">Support</a></div> </div> <div id="header"> <div id="logo"><a href="http://www.mafiakiller.co.cc/"><p></p></a></div> <div id="top_right"> <table width="95%" align="right"><tr> <td width="50%" style="font-size: 10px;"> <table> <tr> <td colspan='3' style="font-size: 10px;">[<?=$player->id?>] <a title='Respected Mobster [24 RM Days Left]' style='color:#CCCC00;font-weight: bold;'><?php if ($player->ncolor == 1) { echo "<a href='profile.php?id=" . $player->username . "'><font color='blue'>" . $player->username . "</font></a>"; } else if($player->ncolor == 2) { echo "<a href='profile.php?id=" . $player->username . "'><font color='green'>" . $player->username . "</font></a>"; } else if($player->ncolor == 3) { echo "<a href='profile.php?id=" . $player->username . "'><font color='yellow'>" . $player->username . "</font></a>"; } else if($player->ncolor == 4) { echo "<a href='profile.php?id=" . $player->username . "'><font color='pink'>" . $player->username . "</font></a>"; } else if($player->ncolor == 5) { echo "<a href='profile.php?id=" . $player->username . "'><font color='silver'>" . $player->username . "</font></a>"; } else if($player->staff >= 1) { echo "<b><a href='profile.php?id=" . $player->username . "'><font color='#CCCC00'>" . $player->username . "</font></a></b>"; } else if($player->rm >= 1) { echo "<a href='profile.php?id=" . $player->username . "'><font color='red'>" . $player->username . "</font></a>"; } else { echo "<a href='profile.php?id=" . $player->username . "'><font color='CC9900'>" . $player->username . "</font></a>"; } ?> </a></td> </tr> <tr> <td style="font-size: 10px;">Level:</td> <td colspan='2' style="font-size: 10px;"><?=$player->level?></td> </tr> <tr> <td style="font-size: 10px;">Money:</td> <td colspan='2' style="font-size: 10px;">$<?= $english_format_number = number_format($player->money);?></td> </tr> <tr> <td style="font-size: 10px;">Points:</td> <td style="font-size: 10px;"><?= $english_format_number = number_format($player->points);?></td> <td style="font-size: 10px;">[<a href='http://www.mafiakiller.co.cc/elite.php'>buy</a>] [<a href='http://www.mafiakiller.co.cc/point_shop.php'>use</a>]</td> </tr> </table> </td> <td width="50%"> <table width="100%"><tr> <td width="20%" style="font-size: 10px;">HP:</td> <td width="80%" title="16,100 / 16,100 [100%]"><img src="../../bargen.php?hp" alt="hp"></td> </tr><tr> <td width="20%" style="font-size: 10px;">Energy:</td> <td width="80%" title="331 / 331 [100%]"><img src="../../bargen.php?energy" alt="energy"></td> </tr><tr> <td width="20%" style="font-size: 10px;">Awake:</td> <td width="80%" title="4,301 / 10,000 [43%]"><img src="../../bargen.php?awake" alt="awake"></td> </tr><tr> <td width="20%" style="font-size: 10px;">Nerve:</td> <td width="80%" title="326 / 326 [100%]"><img src="../../bargen.php?nerve" alt="nerve"></td> </tr></table> </td> </tr></table> </div> </div> <div id="top_bar"></div> <div class="h_full"> <div id="left"> 18 Apr 2009, 8:34am | Day Update: 4:00am</div> <div id="right"><a href='http://www.mafiakiller.co.cc/vote.php'>Vote</a> | <a href='http://www.mafiakiller.co.cc/surveys.php'>Surveys</a> | <a href='http://www.mafiakiller.co.cc/referrals.php'>Refer For Points</a> | <a href='http://www.mafiakiller.co.cc/elite.php'>Upgrade Account</a></div> </div> <div id="left_c"> <div class="menu"> <h3> Menu</h3> <div class="bg"> <a href="http://www.mafiakiller.co.cc/"> <b>~</b> Home</a> <a href="http://www.mafiakiller.co.cc/inventory.php"> <b>~</b> Inventory</a> <a href="../../city/<?=$city['city_id']?>.php"> <b>~</b> <? echo $city['city_name'];?></a> <a href="http://www.mafiakiller.co.cc/bank.php"> <b>~</b> Bank</a> <a href="http://www.mafiakiller.co.cc/gym.php"> <b>~</b> Gym</a> <?php if($player->hospital >= 1 || $player->prison >= 1) { echo "<a href=\%22http:/www.mafiakiller.co.cc/crime.php\%22> <b>~</b> Crime</a>"; } ?> <?php if($player->gang_id >= 1) { echo"<a href=\%22http:/www.mafiakiller.co.cc/your_gang.php\%22> <b>~</b> Your Gang</a>"; echo "<a href=\%22http:/www.mafiakiller.co.cc/gang_mailbox.php\%22> <b>~</b> Gang Mail [-]</a>"; } ?> <a href="http://www.mafiakiller.co.cc/mailbox.php"> <b>~</b> Mailbox [<?=unread_messages($player->id, $db)?>]</a> <a href="http://www.mafiakiller.co.cc/logs.php"> <b>~</b> Events [<?=unread_log($player->id, $db)?>]</a> <a href="http://www.mafiakiller.co.cc/prison.php"> <b>~</b> Prison</a> <a href="http://www.mafiakiller.co.cc/hospital.php"> <b>~</b> Hospital [124]</a> <a href="http://www.mafiakiller.co.cc/spy_log.php"> <b>~</b> Spy Log</a> <a href="http://www.mafiakiller.co.cc/your_cars.php"> <b>~</b> Your Cars</a> <a href="http://www.mafiakiller.co.cc/your_pets.php"> <b>~</b> Your Pets</a> <a href="http://www.mafiakiller.co.cc/notepad.php"> <b>~</b> Notepad</a> <a href="http://www.mafiakiller.co.cc/search.php"> <b>~</b> Search</a> <a href="http://www.mafiakiller.co.cc/newspaper.php"> <b>~</b> Newspaper</a> <a href="http://www.mafiakiller.co.cc/forum.php"> <b>~</b> Forum</a> <a href="http://www.mafiakiller.co.cc/c.php"> <b>~</b> Chat Room</a> <a href="http://www.mafiakiller.co.cc/logout.php"> <b>~</b> Logout</a></div> <h3> Support</h3><div class="bg"> <a href="http://www.mafiakiller.co.cc/support.php"> <b>~</b> Support Desk</a> <a href="http://www.mafiakiller.co.cc/forum/5.php"> <b>~</b> Help Forum</a></div> <h3> Account</h3><div class="bg"> <a href="http://www.mafiakiller.co.cc/edit_details.php"> <b>~</b> Edit Account</a> <a href="http://www.mafiakiller.co.cc/friendlist.php"> <b>~</b> Contact List</a> <a href="http://www.mafiakiller.co.cc/ignorelist.php"> <b>~</b> Manage Ignore List</a> <a href="http://www.mafiakiller.co.cc/elite.php"> <b>~</b> Upgrade Account</a></div> <h3> Misc</h3><div class="bg"> <a href="http://www.facebook.com/group.php?gid=4687573787" target="_blank"> <b>~</b> Facebook Group</a> <a href="http://www.myspace.com/mafiakillergame" target="_blank"> <b>~</b> Myspace Page</a> </div> </div> </div> </div> <?php if($player->rm >= 0) { echo "<div id=\"left_c\"><div class=\"g_content\"><h3> Become A Respected Mobster</h3><div class=\"g_text\"> <table width=\'100%\'>"; echo "<tr>"; echo "<td align=\'left\' width=\'58%\'>"; echo "You're not a Respected Mobster yet! Why not?<br /><br />"; echo "You're missing out!<br /><br />"; echo "<a style=\'font-size: 18px;\' href=upgrade.php\>Upgrade Now!<br />Starting From $3.00!</a>"; echo "</td>"; echo "<td width=\'42%\'>"; echo "<li>Energy Regenerates <b><u>Twice</u></b> As Quick</li>"; echo "<li>Bank Interest is <b><u>DOUBLED</u></b>!</li>"; echo "<li>Yellow Name</li>"; echo "<li>Respected Mobster Status</li>"; echo "<li><b><u>Cash Bonus</u></b> on Purchase</li>"; echo "<li><b><u>Points Bonus</u></b> on Purchase</li>"; echo "<li>Access to <b><u>RM Only</u></b> Cities</li>"; echo "<li><b><u>Larger</u></b> Inventory Size</li>"; echo "</td>"; echo "</tr>"; echo "</table></div></div>"; } ?> when i include this code the php bit messes up with the normal page... NOTE - The php code is a copy of the content which header "Respected mobster". General info, attribute, battle stat, crime stat, respected mob and advert are all from the the normal page which is includeing the template. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
seany123 Posted April 19, 2009 Author Share Posted April 19, 2009 ive tried messing around this this part.. echo "<div id=\"left_c\ but nothing really changes. Quote Link to comment Share on other sites More sharing options...
play_ Posted April 19, 2009 Share Posted April 19, 2009 This is more of a CSS/HTML question. On the div that holds the text "youre missing out", try putting style="clear:right" or clear:both Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.