this is the code i use to create my active.php file (well almost only few changes for my personal site style)
<?php
/***********************************************************************
Copyright (C) 2002, 2003, 2004 Rickard Andersson (rickard@punbb.org)
This file is part of PunBB.
PunBB is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
PunBB is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
************************************************************************/
$pun_root = './';
require $pun_root.'include/common.php';
// Load the common language file
require $pun_root.'lang/'.$language.'/'.$language.'_common.php';
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Active Topics';
require $pun_root.'header.php';
$day_limit = 2; // make this the auto number of days you want to be displayed.
$days = isset($_POST['days']) ? $_POST['days'] : $day_limit;
$posts_since = mktime(date("H"), date("i"), date("s"), date("m"), (date("d")-$days), date("Y"));
$latest = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_poster, t.num_replies, 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 t.moved_to IS NULL
AND f.admmod_only=0
AND t.last_post>'.$posts_since.'
ORDER BY last_post DESC');
?>
<table class="punspacer" cellspacing="1" cellpadding="4">
<tr>
<td style="width: 14%;"><b><a href="index.php"><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?></a> / Active Topics</b></td>
<td class="punright"><form method="post" action="">Days to show: <input type="text" name="days" value="<?php echo $days; ?>" size="3"> <input type="submit" value="Go"></form></td>
</tr>
</table>
<table class="punmain" cellspacing="1" cellpadding="4">
<tr class="punhead">
<td class="punhead"><?php echo $lang_common['Topic'] ?></td>
<td class="punhead" style="width: 5%; white-space: nowrap">Replies</td>
<td class="punhead" style="width: 14%; white-space: nowrap">Last Poster</td>
<td class="punhead" style="width: 14%; white-space: nowrap"><?php echo $lang_common['Last post'] ?></td>
</tr>
<?php
while ($ak_post = $db->fetch_assoc($latest)) {
$subject_new_posts = '[ <a href="viewtopic.php?id='.$ak_post['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]';
?>
<tr class="puntopic">
<td class="puncon2"><a href="viewtopic.php?id=<?php echo $ak_post['id'] ?>&action=new"><?php echo pun_htmlspecialchars($ak_post['subject']) ?></a> <?php echo $subject_new_posts; ?></td>
<td class="puncon2"><?php echo pun_htmlspecialchars($ak_post['num_replies']) ?></td>
<td class="puncon2"><?php echo pun_htmlspecialchars($ak_post['last_poster']) ?></td>
<td class="puncon2" style="white-space: nowrap"><?php echo format_time($ak_post['last_post']) ?></td>
</tr>
<?php
}
?>
</table>
<table class="punspacer" cellspacing="1" cellpadding="4"><tr><td> </td></tr></table>
<?php
require $pun_root.'footer.php';