Topic: how would i fix this
heres the code to my index.php on where i know i would need to edit i just dont know what to edit:
<?php
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
function pun_news($fid='', $show=15, $truncate=1)
{
global $lang_common, $db, $pun_config, $db_prefix;
$max_subject_length = 30;
$show_max_topics = 50;
$fid = intval($fid);
$order_by = 't.posted';
$forum_sql = '';
// Was a forum ID supplied?
if ( $fid ) $forum_sql = 'f.id='.$fid.' AND ';
$show = intval($show);
if ($show < 1 || $show > $show_max_topics)
$show = 15;
$saveddate="";
// Fetch $show topics
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE f.id='.$fid.' AND t.moved_to IS NULL ORDER BY '.$order_by.' DESC') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
$show_count = 0;
if ( !$db->num_rows($result) ) return $output;
while ( ($show_count < $show) && ($cur_topic = $db->fetch_assoc($result)) ) {
$temp = '';
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if (pun_strlen($cur_topic['subject']) > $max_subject_length)
$subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
else
$subject_truncated = $cur_topic['subject'];
$newsheading = '<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a> - <em>Posted by '.$cur_topic['poster'].' at '.date('h:i A', $cur_topic['posted']).'</em><br>';
// Group posts by date
$thisdate = date('l, d F Y', $cur_topic['posted']);
if ($thisdate != $saveddate)
{
if ($saveddate)
{
$temp .= "</div></div>";
}
$temp .= '<div class="blockform" style="margin-left: 180px;margin-right: 180px;"><h2><span>'.$thisdate.'</span></h2><div class="box"><div class="inbox"><p>';
$saveddate = $thisdate;
}
else {
$temp .= '<div class="inbox"><p>';
}
$temp .= $newsheading.'</p><p>';
$id = $cur_topic['id'];
$msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
if ( !$db->num_rows($msg) ) continue;
$cur_post = $db->fetch_assoc($msg);
// Display first paragraph only (comment out next four lines to turn off)
if ($truncate == 1)
{
$paragraph = preg_split("/s*n+/", $cur_post['message']);
if (isset($paragraph[1])) {
$cur_post['message'] = $paragraph[0] . "...";
}
}
$cur_post['message'] = parse_message($cur_post['message'], 0);
$temp .= $cur_post['message'];
$temp .= "</p></div>";
if (isset($output)) {
$output .= $temp;
}
else {
$output = $temp;
}
++$show_count;
} // end of while
$output .= "</div></div>";
return $output;
}
?>
<div id="portalconsole" class="block2col">
<div class="blockmenu" style="float:right;width: 170px">
<br />
<h2><span>Recent Cracked Porn</span></h2>
<div class="box">
<div class="inbox">
<?php
$result = $db->query('SELECT id, subject FROM '.$db->prefix.'topics WHERE forum_id=\'9\' ORDER BY posted DESC LIMIT 5') or error('Unable to fetch');
while($topic = $db->fetch_assoc($result))
echo '<a href="viewtopic.php?id='.$topic['id'].'">'.$topic['subject'].'</a><br />';
?>
</div>
</div>
<br />
<h2><span>Recent Programs</span></h2>
<div class="box">
<div class="inbox">
<?php
$result = $db->query('SELECT id, subject FROM '.$db->prefix.'topics WHERE forum_id=\'12\' ORDER BY posted DESC LIMIT 5') or error('Unable to fetch');
while($topic = $db->fetch_assoc($result))
echo '<a href="viewtopic.php?id='.$topic['id'].'">'.$topic['subject'].'</a><br />';
?>
</div>
</div>
<br />
<h2><span>Recent Movies</span></h2>
<div class="box">
<div class="inbox">
<?php
$result = $db->query('SELECT id, subject FROM '.$db->prefix.'topics WHERE forum_id=\'19\' ORDER BY posted DESC LIMIT 5') or error('Unable to fetch');
while($topic = $db->fetch_assoc($result))
echo '<a href="viewtopic.php?id='.$topic['id'].'">'.$topic['subject'].'</a><br />';
?>
</div>
</div>
</div>
<div class="blockmenu" style="float:left;width:170px">
<br />
<h2><span>Navigation</span></h2>
<div class="box">
<div class="inbox">
<ul>
<?
$links = array();
$links[] = '- <a href="index.php">'.$lang_common['Index'].'</a>';
$links[] = '- <a href="forum.php">'.$lang_common['Forum'].'</a>';
$links[] = '- <a href="userlist.php">'.$lang_common['User list'].'</a>';
$links[] = '- <a href="search.php">'.$lang_common['Search'].'</a>';
if ($pun_user['is_guest'])
{
if ($pun_user['g_search'] == '1')
$links[] = '- <a href="register.php">'.$lang_common['Register'].'</a>';
$links[] = '- <a href="login.php">'.$lang_common['Login'].'</a>';
}
else
{
$links[] = '- <a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
$links[] = '- <a href="message_list.php">'.$lang_common['Messages'].'</a>';
if ($pun_user['g_id'] < PUN_GUEST)
$links[] = '- <a href="admin_index.php">'.$lang_common['Admin'].'</a>';
$links[] = '- <a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
}
foreach($links as $link)
echo "\t\t\t\t\t".$link.'<br />'."\n";
?>
</ul>
</div>
</div>
<br />
<?php
if ($pun_user['is_guest'])
{
?>
<h2><span><?php echo $lang_common['Login'] ?></span></h2>
<div class="box">
<div class="inbox" style="text-align: center">
<form id="login" method="post" action="login.php?action=in" onsubmit="return process_form(this)">
<div class="inform">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="redirect_url" value="index.php" />
<label><strong><?php echo $lang_common['Username']?></strong><br /><input type="text" name="req_username" size="16" maxlength="25" tabindex="1" /> <br /></label>
<label><strong><?php echo $lang_common['Password']?></strong><br /><input type="password" name="req_password" size="16" tabindex="2" /><br /></label>
<p><a href="login.php?action=forget" tabindex="5"><?php echo $lang_login['Forgotten pass'] ?></a></p>
<input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>" tabindex="3" />
</div>
</form>
</div>
</div>
<?
} else if (!$pun_user['is_guest'])
{
?>
<h2><span>Affiliates</span></h2>
<div class="box">
<div class="inbox">
- <a href="http://shizzled.com">Shizzled</a>
<br>
- <a href="http://rsmarket.org">RsMarket</a>
<br>
- <a href="http://www.runeinfinity.net">SYI</a>
<br>
- <a href="http://www.cheatskape.com">HYI</a>
<br>
- <a href="http://dl.rapidfiles.info/">RapidFiles</a>
</b>
</b>
</div>
</div>
<br>
<h2><span>Links</span></h2>
<div class="box">
<div class="inbox">
<center>--<b>Intense Dollars</b>--</center>
[<a href="bank.php">Bank</a>]
[<a href="lottery.php">Lottery</a>]
[<a href="donate.php">Donate</a>]
<center>
[<a href="page.php?id=1">Store</a>]
<br>
<center>--<b>Image Upload</b>--</center>
[<a href="page.php?id=3">Upload</a>]
[<a href="/uimages/">Uploaded</a>]
<center>--<b>Java Chat</b>--</center>
[<a href="chat.php">Chatroom</a>]
[<a href="page.php?id=4">Help</a>]
</center>
</b>
</div>
</div>
<br>
<h2><span>Top Donors</span></h2>
<div class="box">
<div class="inbox">
? brian_waggy - $15.00
<br>
<br>
<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="leetskype@hotmail.com" />
<input type="hidden" name="item_name" value="IntensePlanet" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="tax" value="0" />
<input type="submit" name="submit" value="Donate" style="margin-left: 10px" />
</form>
</b>
</center>
</div>
</div>
<br>
<h2><span>Forum Info</span></h2>
<div class="box">
<div class="inbox">
<?php echo 'Number of users: <strong><font size="1">'. $stats['total_users'] ?></strong></font><br />
<?php echo 'Number of topics: <strong><font size="1">'.$stats['total_topics'] ?></strong></font><br />
<?php echo 'Number of posts: <strong><font size="1">'.$stats['total_posts'] ?></strong></font><br />
<!--==================-->
<!--Start Page Content-->
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
function countup(yr,m,d) {
var today=new Date();
var todayy=today.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (todayy < 2000))
todayy="19" + todayy;
if (navigator.appName == "Netscape")
todayy=1900 + todayy;
var todaym=today.getMonth();
var todayd=today.getDate();
var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
var paststring=montharray[m-1]+" "+d+", "+yr;
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1);
document.write("Number of days old:<b> " + difference + "</b>");
}
countup(2006,10,9); // Date in format: (year,month,day)
// End -->
</script>
<!-- End Page Content -->
<!--==================-->
</div>
</div>
<?
}
?>
</div>
</div>
<br>
<div class="blockform" style="margin-left: 180px;margin-right: 180px;">
<h2><span>Welcome</span></h2>
<div class="box">
<div class="inbox">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent augue. Nulla facilisi. Fusce bibendum accumsan erat. Quisque sollicitudin mattis neque. Sed dapibus. Integer a lectus eu sem consequat pellentesque. Morbi rhoncus nulla. Duis adipiscing interdum velit. Fusce ante. Ut vitae enim sit amet magna sodales hendrerit. In sed tortor at sapien convallis eleifend. Proin mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut metus. Cras ac arcu et arcu porttitor blandit. Nam vitae lectus eget mauris sollicitudin placerat. Suspendisse vestibulum. Donec varius libero. Duis velit tellus, euismod vitae, consequat sed, consectetuer ut, purus.
</p>
<p>
Praesent viverra venenatis magna. Etiam in dolor. Ut in justo ac nibh malesuada cursus. Duis urna arcu, aliquam vitae, consequat nec, tincidunt non, mi. Nunc lobortis. Nunc pharetra. Sed porttitor. Maecenas turpis tortor, blandit nec, dignissim in, porttitor eu, odio. In hac habitasse platea dictumst. Suspendisse augue odio, ornare a, elementum ac, tincidunt varius, orci. Nulla libero ante, hendrerit ac, consectetuer eu, sollicitudin et, eros. Duis sapien. Suspendisse ornare enim sit amet dui. Donec ullamcorper diam.
</p>
</div>
</div>
</div>
<?php
echo pun_news(1, 5, 0);
require PUN_ROOT.'footer.php';
could someone do it 4 me then repaste it on this? NOTE: it only does this when i tried to add those 3 tables to the right, i still want them to be on the right side for who ever that edits it.