Topic: when i add the portal.tpl
when i add the portal.tpl to my members.php script i get this error!
Fatal error: Cannot redeclare showrecent() (previously declared in /homepages/40/d174088604/htdocs/model/include/user/test5.php:8) in /homepages/40/d174088604/htdocs/model/include/user/test5.php on line 8
http://modelcrowd.com/members.php
this is my test5.php code!
it is a truncate latest topics
<div class="block">
<h2 class="block2"><span>News Topics</span></h2>
<div class="box" style="background-image:url(../../img/ifeeldirty/bloque2.gif);padding: 3px 18px 5px 16px;">
<?php
showRecent(10); // Set amount of posts to be displayed here
function showRecent($show=5) {
global $lang_common, $db, $pun_config, $db_prefix;
$order_by = 't.last_post';
$forum_sql = '';
//$show = isset($_GET['show']) ? intval($_GET['show']) : 5;
//if ($show < 1 || $show > 50) $show = 5;
$trunc_len = 20; // Set amount of text to be displayed in subject.
// Fetch $show topics
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
while ($cur_topic = $db->fetch_assoc($result)) {
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
$subject_truncated = pun_htmlspecialchars($cur_topic['subject']);
echo '<li>»'.'<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.substr($cur_topic['subject'], 0, $trunc_len).'</a>...'."\n";
}
echo '</li>';
return;
}
?>
</div>
</div>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!
Don't be stupid and help ! We are the stupid one's !!!