' . '' . '' . '' . '' . $settings['title'] . '' . '' // Sidebar . '' // Main . '' // Finish page . ''; } // Build news page public static function news($settings) { global $config; // HTML5 $body = '' . '' . '' . 'News' . ''; $boardlist = createBoardlist(); $body .= $boardlist['top'] . '

' . $settings['title'] . '

' . '
' . ($settings['subtitle'] ? utf8tohtml($settings['subtitle']) : '') . '
'; $query = query("SELECT * FROM `news` ORDER BY `time` DESC") or error(db_error()); if($query->rowCount() == 0) { $body .= '

(No news to show.)

'; } else { // List news while($news = $query->fetch()) { $body .= '
' . '

' . ($news['subject'] ? $news['subject'] : 'no subject' ) . ' — by ' . $news['name'] . ' at ' . date($config['post_date'], $news['time']) . '

' . $news['body'] . '

'; } } // Finish page $body .= ''; return $body; } // Build sidebar public static function sidebar($settings) { global $config, $board; $body = '' . '' . '' . '' . '' . '' . $settings['title'] . '' . '' . ''; $body .= '
' . $settings['title'] . '
'; for($cat = 0; $cat < count($config['categories']); $cat++) { $body .= '
' . $config['categories'][$cat] . '
'; } foreach($config['custom_categories'] as $name => &$group) { $body .= '
' . $name . '
'; } // Finish page $body .= ''; return $body; } }; ?>