if ($mode == 'own') { $where = 'news.author=' . $_SESSION['userid']; } $query = 'news.id, news.active, news.start, news.end, news.author, person.first_name as author_first_name, person.last_name as author_last_name, news.topic, news.text from news join person on
function current_news() { include_once $GLOBALS['root'] . 'news/func.php'; $news_data = select_news('now'); $content = ''; foreach ($news_data as $i => $data) { $news = new news($data); $news->format(); $content .= $news->tmpl(); } return $content; }