2 $page = isset ($_GET['page']) ?
$_GET['page'] : 1;
3 $pages = ($page - 1) * $userinfo['tpp'];
6 $number_of_items = mysql_result (mysql_query ('SELECT COUNT(*) FROM `topics` WHERE '.$list_criteria), 0);
9 if ($number_of_items > $userinfo['tpp'])
10 $pagelist = pagelist();
14 <tr><th>Topic Name</th><th>Created By</th><th>Messages</th>'.
15 ($userinfo['viewdisp'] & 1 ?
'<th>Views</th>' : '').
17 ($userinfo['viewdisp'] & 2 ?
'<th>Last View</th>' : '').
23 $topics = mysql_query ('SELECT `topicid`, `topicname`, `active`, `postedby`, `lastpostsec`, `views`, `viewsec` FROM `topics` WHERE '.$list_criteria.' LIMIT '.$pages.', '.$userinfo['tpp']);
24 while ($myrow = mysql_fetch_row ($topics))
26 echo '<tr class='.colour().'>
27 <td><a href="topic.php?b='.intval ($_GET['b']).';t='.$myrow[0].'">'.$myrow[1].'</a>'.
28 ($myrow[2] == 'closed' ?
$cfg['img'][2] : null).
29 ($myrow[2] == 'deleted' ?
$cfg['img'][3] : null).'</td>
30 <td>'.userlink ($myrow[3]).'</td>
31 <td>'.mysql_result (mysql_query ('SELECT COUNT(*) FROM `msgmeta` WHERE `topic` = '.$myrow[0]), 0).'</td>'.
32 ($userinfo['viewdisp'] & 1 ?
'
33 <td>'.$myrow[5].'</td>' : null).'
34 <td>'.date2 ($myrow[4]).'</td>'.
35 ($userinfo['viewdisp'] & 2 ?
'
36 <td>'.date2 ($myrow[6]).'</td>' : null).'