Recent Posts ';
+
+ $query = '';
+ foreach($boards as &$_board) {
+ // Block Board
+ if ($_board['uri'] != "aurora") {
+ $query .= sprintf("SELECT *, '%s' AS `board` FROM `posts_%s` UNION ALL ", $_board['uri'], $_board['uri']);
+ }
+ }
+ $query = preg_replace('/UNION ALL $/', 'ORDER BY `time` DESC LIMIT 15', $query);
+ $query = query($query) or error(db_error());
+
+ while($post = $query->fetch()) {
+ openBoard($post['board']);
+
+ $body .= '' . $board['name'] . ': ';
+ $snip = pm_snippet($post['body'], 95);
+ if($snip === "")
+ {
+ $body .= '<empty>';
+ }
+ else
+ {
+ $body .= $snip;
+ }
+ $body .= ' '; + } + + // News + + $body .= ' |
(No news to show.)
'; + } else { + // List news + while($news = $query->fetch()) { + $body .= ''; + $body .= '