diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index c049f70e..9adeeeb7 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -13,18 +13,18 @@ function meetings_title() { function user_meetings() { global $DISPLAY_NEWS, $privileges, $user; - + $html = '

' . meetings_title() . '

' . msg(); - + if (isset($_REQUEST['page']) && preg_match("/^[0-9]{1,}$/", $_REQUEST['page'])) $page = $_REQUEST['page']; else $page = 0; - + $news = sql_select("SELECT * FROM `News` WHERE `Treffen`=1 ORDER BY `ID` DESC LIMIT " . sql_escape($page * $DISPLAY_NEWS) . ", " . sql_escape($DISPLAY_NEWS)); foreach ($news as $entry) $html .= display_news($entry); - + $dis_rows = ceil(sql_num_query("SELECT * FROM `News`") / $DISPLAY_NEWS); $html .= '
' . '
'; - + return $html; } function display_news($news) { global $privileges, $p; - + $html = ''; $html .= '
'; $html .= '
'; $html .= '

' . ($news['Treffen'] == 1 ? '[Meeting] ' : '') . ReplaceSmilies($news['Betreff']) . '

'; $html .= '
'; $html .= '
' . ReplaceSmilies(nl2br($news['Text'])) . '
'; - + $html .= '