4 $prefetch = array('`u_points`', '`u_mlist_view`');
7 $page->title
= _('Message List');
9 if ( isset($_GET['topic']) ) {
10 $topicid = intval($_GET['topic']);
11 $topic = $DB->query('SELECT `b_name`, `boardid`, `b_view_level`, `b_view_points`, `b_topic_level`, `t_name`
12 FROM `boards`, `topics`
13 WHERE `boardid` = `t_board` AND `topicid` = '.$topicid)->fetch_row();
16 if ( !is_array($topic) )
17 $page->errorfooter('topicid');
19 if ( $topic[2] > $user->u_level ||
$topic[3] > $user->u_points
)
20 $page->errorfooter('levelpoints', $topic[2], $topic[3]);
22 $page->title
.= ': '.$topic[5];
24 $page->nav
[_('Topic List').': '.$topic[0]] = 'topiclist?board='.$topic[1];
25 if ( $user instanceof authuser
)
26 $user->userlinks
[_('Post Message')] = 'post?topic='.$topicid;
30 switch ( $user->u_mlist_view
) {
32 new messagelist_flat($topicid); break;
34 new messagelist_threaded($topicid); break;
36 new messagelist_irc($topicid); break;