diff --git a/html/inc/news.inc b/html/inc/news.inc index 7dfc46b7a8..4aea5d8dbb 100644 --- a/html/inc/news.inc +++ b/html/inc/news.inc @@ -37,7 +37,7 @@ function news_item($date, $title, $post) { <span class=news_content>$text</span> <span class=news_date>$d "; - if ($forum_link) { + if ($forum_link && !DISABLE_FORUMS) { echo " · <a href=".URL_BASE."forum_thread.php?id=$post->thread> ".tra("Comment")."</a> "; diff --git a/html/inc/user.inc b/html/inc/user.inc index b141d00dd1..1d619013a3 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -247,9 +247,11 @@ function show_community_private($user) { } row2(tra("Profile"), $x); } - $tot = total_posts($user); - if ($tot) { - row2(tra("Message boards"), "<a href=\"".URL_BASE."forum_user_posts.php?userid=$user->id\">".tra("%1 posts", $tot)."</a>"); + if (!DISABLE_FORUMS) { + $tot = total_posts($user); + if ($tot) { + row2(tra("Message boards"), "<a href=\"".URL_BASE."forum_user_posts.php?userid=$user->id\">".tra("%1 posts", $tot)."</a>"); + } } row2(tra("Private messages"), pm_notification($user).pm_email_remind($user)); @@ -373,8 +375,10 @@ function community_links($clo, $logged_in_user){ row2(tra("Team"), tra("None")); } } - if ($tot) { - row2(tra("Message boards"), "<a href=\"".URL_BASE."forum_user_posts.php?userid=$user->id\">".tra("%1 posts", $tot)."</a>"); + if (!DISABLE_FORUMS) { + if ($tot) { + row2(tra("Message boards"), "<a href=\"".URL_BASE."forum_user_posts.php?userid=$user->id\">".tra("%1 posts", $tot)."</a>"); + } } if ($logged_in_user && $logged_in_user->id != $user->id) { row2(tra("Contact"), "<a href=\"pm.php?action=new&userid=".$user->id."\">".tra("Send private message")."</a>"); diff --git a/html/ops/index.php b/html/ops/index.php index 73d10653b5..2dd6aeb72b 100644 --- a/html/ops/index.php +++ b/html/ops/index.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -124,6 +124,7 @@ echo " </td> <td><b>User management</b> <ul> + <li><a href=".URL_BASE."/forum_index.php>Post news item</a></li> <li><a href=\"profile_screen_form.php\">Screen user profiles </a></li> <li><a href=\"badge_admin.php\">Badges</a></li> <li><a href=\"manage_special_users.php\">User privileges</a></li> @@ -134,7 +135,6 @@ echo " ID: <input name=\"userid\"> </form> </li> - </li> </ul> </td> </tr> diff --git a/html/user/edit_forum_preferences_action.php b/html/user/edit_forum_preferences_action.php index 9e6c394a85..c8f7bbf58f 100644 --- a/html/user/edit_forum_preferences_action.php +++ b/html/user/edit_forum_preferences_action.php @@ -59,6 +59,13 @@ if (post_str("action", true)=="reset"){ exit; } +$pmn = post_int("pm_notification"); +if ($pmn != $user->prefs->pm_notification) { + $user->prefs->update("pm_notification=$pmn"); +} + +if (!DISABLE_FORUMS) { + $avatar_type = post_int("avatar_select"); $newfile=IMAGE_PATH.$user->id."_avatar.jpg"; @@ -108,7 +115,6 @@ $highlight_special = ($_POST["forum_highlight_special"]!="")?1:0; $jump_to_unread = ($_POST["forum_jump_to_unread"]!="")?1:0; $ignore_sticky_posts = ($_POST["forum_ignore_sticky_posts"]!="")?1:0; $no_signature_by_default = ($_POST["signature_by_default"]!="")?0:1; -$pm_notification = post_int("pm_notification"); $signature = post_str("signature", true); if (strlen($signature)>250) { error_page(tra("Your signature was too long, please keep it less than 250 characters.")); @@ -120,8 +126,9 @@ if ($display_wrap_postcount<1) $display_wrap_postcount=1; $signature = BoincDb::escape_string($signature); -$user->prefs->update("images_as_links=$images_as_links, link_popup=$link_popup, hide_avatars=$hide_avatars, hide_signatures=$hide_signatures, highlight_special=$highlight_special, jump_to_unread=$jump_to_unread, ignore_sticky_posts=$ignore_sticky_posts, no_signature_by_default=$no_signature_by_default, pm_notification=$pm_notification, avatar='$avatar_url', signature='$signature', forum_sorting=$forum_sort, thread_sorting=$thread_sort, display_wrap_postcount=$display_wrap_postcount"); +$user->prefs->update("images_as_links=$images_as_links, link_popup=$link_popup, hide_avatars=$hide_avatars, hide_signatures=$hide_signatures, highlight_special=$highlight_special, jump_to_unread=$jump_to_unread, ignore_sticky_posts=$ignore_sticky_posts, no_signature_by_default=$no_signature_by_default, avatar='$avatar_url', signature='$signature', forum_sorting=$forum_sort, thread_sorting=$thread_sort, display_wrap_postcount=$display_wrap_postcount"); +} // DISABLE_FORUMS $add_user_to_filter = ($_POST["add_user_to_filter"]!=""); if ($add_user_to_filter){ diff --git a/html/user/edit_forum_preferences_form.php b/html/user/edit_forum_preferences_form.php index ce07917d07..4936eefaa8 100644 --- a/html/user/edit_forum_preferences_form.php +++ b/html/user/edit_forum_preferences_form.php @@ -60,6 +60,7 @@ row2( " ); +if (!DISABLE_FORUMS) { // ------------ Forum identity ----------- $select_0 = $select_1 = $select_2 = ""; @@ -142,6 +143,7 @@ row2(tra("How to sort"), <input type=\"checkbox\" name=\"forum_ignore_sticky_posts\" ".$forum_ignore_sticky_posts.">".tra("Don't move sticky posts to top")."<br> " ); +} // DISABLE_FORUMS // ------------ Message filtering ----------- diff --git a/html/user/forum_banishment_vote.php b/html/user/forum_banishment_vote.php index 2ef252faeb..d28b439f38 100644 --- a/html/user/forum_banishment_vote.php +++ b/html/user/forum_banishment_vote.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -20,6 +20,8 @@ require_once('../inc/util.inc'); require_once('../inc/forum_db.inc'); require_once('../inc/forum_banishment_vote.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("action", "userid")); $config = get_config(); diff --git a/html/user/forum_banishment_vote_action.php b/html/user/forum_banishment_vote_action.php index e4eedee3fc..ec6d51e20f 100644 --- a/html/user/forum_banishment_vote_action.php +++ b/html/user/forum_banishment_vote_action.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -21,6 +21,8 @@ require_once("../inc/util.inc"); require_once("../inc/forum_db.inc"); require_once("../inc/forum_banishment_vote.inc"); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("action", "userid", "tnow", "ttok")); $config = get_config(); diff --git a/html/user/forum_forum.php b/html/user/forum_forum.php index 8de5c86a30..e6519d6f84 100644 --- a/html/user/forum_forum.php +++ b/html/user/forum_forum.php @@ -33,6 +33,11 @@ if (!$start) $start = 0; $forum = BoincForum::lookup_id($id); if (!$forum) error_page("forum ID not found"); $user = get_logged_in_user(false); +BoincForumPrefs::lookup($user); + +if (DISABLE_FORUMS && !is_admin($user)) { + error_page("Forums are disabled"); +} if (!is_forum_visible_to_user($forum, $user)) { if ($user) { @@ -41,8 +46,6 @@ if (!is_forum_visible_to_user($forum, $user)) { error_page(tra("Not visible to you")); } -BoincForumPrefs::lookup($user); - if (!$sort_style) { // get the sort style either from the logged in user or a cookie if ($user){ diff --git a/html/user/forum_get_data.php b/html/user/forum_get_data.php index c17c20f182..c7025ec784 100644 --- a/html/user/forum_get_data.php +++ b/html/user/forum_get_data.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -22,6 +22,10 @@ require_once("../inc/xml.inc"); xml_header(); +if (DISABLE_FORUMS) { + xml_error(-1, "Forums are disabled"); +} + $retval = db_init_xml(); if ($retval) xml_error($retval); diff --git a/html/user/forum_help_desk.php b/html/user/forum_help_desk.php index 52640652f7..4a652b8157 100644 --- a/html/user/forum_help_desk.php +++ b/html/user/forum_help_desk.php @@ -20,6 +20,8 @@ require_once('../inc/forum.inc'); require_once('../inc/util.inc'); require_once('../inc/time.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array()); $user = get_logged_in_user(false); diff --git a/html/user/forum_index.php b/html/user/forum_index.php index b13927090a..3fd0f74c98 100644 --- a/html/user/forum_index.php +++ b/html/user/forum_index.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -26,6 +26,11 @@ require_once('../inc/time.inc'); check_get_args(array("read", "return", "tnow", "ttok")); $user = get_logged_in_user(false); +BoincForumPrefs::lookup($user); + +if (DISABLE_FORUMS && !is_admin($user)) { + error_page("Forums are disabled"); +} // Process request to mark all posts as read // diff --git a/html/user/forum_moderate_post.php b/html/user/forum_moderate_post.php index 3ef671e721..ab55c20b9c 100644 --- a/html/user/forum_moderate_post.php +++ b/html/user/forum_moderate_post.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -18,11 +18,14 @@ // The form where a moderator decides what he is going to do to a post. -// Submits informaiton to forum_moderate_post_action.php for actual action +// Submits information to forum_moderate_post_action.php for actual action // to be done. +require_once('../inc/util.inc'); require_once('../inc/forum.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("id", "action", "userid", "tnow", "ttok")); $logged_in_user = get_logged_in_user(); diff --git a/html/user/forum_moderate_post_action.php b/html/user/forum_moderate_post_action.php index bbba0481e5..6e5aa5c05a 100644 --- a/html/user/forum_moderate_post_action.php +++ b/html/user/forum_moderate_post_action.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -16,9 +16,12 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +require_once("../inc/util.inc"); require_once("../inc/forum.inc"); require_once("../inc/forum_email.inc"); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("id", "action", "tnow", "ttok")); function mod_comment() { diff --git a/html/user/forum_moderate_thread.php b/html/user/forum_moderate_thread.php index 4e59a035c5..6fac18f5b5 100644 --- a/html/user/forum_moderate_thread.php +++ b/html/user/forum_moderate_thread.php @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +require_once('../inc/util.inc'); require_once('../inc/forum.inc'); check_get_args(array("action", "thread", "ttok", "tnow")); @@ -23,6 +24,10 @@ check_get_args(array("action", "thread", "ttok", "tnow")); $logged_in_user = get_logged_in_user(); BoincForumPrefs::lookup($logged_in_user); +if (DISABLE_FORUMS && !is_admin($logged_in_user)) { + error_page("Forums are disabled"); +} + if (!get_str('action')) { error_page("unknown action"); } diff --git a/html/user/forum_moderate_thread_action.php b/html/user/forum_moderate_thread_action.php index 6d2dac5b40..c8ae526366 100644 --- a/html/user/forum_moderate_thread_action.php +++ b/html/user/forum_moderate_thread_action.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +require_once("../inc/util.inc"); require_once("../inc/forum.inc"); require_once("../inc/forum_email.inc"); @@ -24,6 +25,10 @@ check_get_args(array("action", "thread", "tnow", "ttok")); $logged_in_user = get_logged_in_user(); check_tokens($logged_in_user->authenticator); BoincForumPrefs::lookup($logged_in_user); +if (DISABLE_FORUMS && !is_admin($logged_in_user)) { + error_page("Forums are disabled"); +} + $action = post_str('action', true); if (!$action) { $action = get_str('action'); diff --git a/html/user/forum_post.php b/html/user/forum_post.php index a00102701b..be7060aa4b 100644 --- a/html/user/forum_post.php +++ b/html/user/forum_post.php @@ -36,6 +36,10 @@ check_banished($logged_in_user); $forumid = get_int("id"); $forum = BoincForum::lookup_id($forumid); +if (DISABLE_FORUMS && !is_admin($logged_in_user)) { + error_page("Forums are disabled"); +} + if (!user_can_create_thread($logged_in_user, $forum)) { error_page(tra("Only project admins may create a thread here. However, you may reply to existing threads.")); } diff --git a/html/user/forum_rate.php b/html/user/forum_rate.php index ed9e866760..771cef2829 100644 --- a/html/user/forum_rate.php +++ b/html/user/forum_rate.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -21,6 +21,8 @@ require_once('../inc/forum.inc'); require_once('../inc/util.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + $config = get_config(); if (parse_bool($config, "no_forum_rating")) { page_head(tra("Rating offline")); diff --git a/html/user/forum_reply.php b/html/user/forum_reply.php index d6fbfdb0d0..fa1d49e827 100644 --- a/html/user/forum_reply.php +++ b/html/user/forum_reply.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -19,11 +19,14 @@ // Post a reply to a thread. // Both input (form) and action take place here. +require_once('../inc/util.inc'); require_once('../inc/forum_email.inc'); require_once('../inc/forum.inc'); require_once('../inc/bbcode_html.inc'); require_once('../inc/akismet.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + $logged_in_user = get_logged_in_user(true); BoincForumPrefs::lookup($logged_in_user); check_banished($logged_in_user); diff --git a/html/user/forum_report_post.php b/html/user/forum_report_post.php index 04d7ea7d4f..2319bfca4c 100644 --- a/html/user/forum_report_post.php +++ b/html/user/forum_report_post.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -21,9 +21,12 @@ // For this file to work the project must have defined who // should receive such reports (in the configuration file) +require_once('../inc/util.inc'); require_once('../inc/forum.inc'); require_once('../inc/forum_email.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("post", "submit", "reason", "tnow", "ttok")); $postId = get_int('post'); diff --git a/html/user/forum_rss.php b/html/user/forum_rss.php index 062becf7bb..57e3c228a1 100644 --- a/html/user/forum_rss.php +++ b/html/user/forum_rss.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -24,10 +24,12 @@ // Else enumerate threads by decreasing timestamp, // and show the post with latest timestamp for each -require_once("../project/project.inc"); +require_once("../inc/util.inc"); require_once("../inc/boinc_db.inc"); require_once("../inc/forum_rss.inc"); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + $forumid = get_int('forumid'); $forum = BoincForum::lookup_id($forumid); if (!$forum) error_page("no such forum"); diff --git a/html/user/forum_search.php b/html/user/forum_search.php index 8d3405f711..28c0cade7b 100644 --- a/html/user/forum_search.php +++ b/html/user/forum_search.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -22,6 +22,8 @@ require_once('../inc/forum.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("forumid")); page_head(tra("Forum search")); diff --git a/html/user/forum_search_action.php b/html/user/forum_search_action.php index 2bb38e9d65..f21069318d 100644 --- a/html/user/forum_search_action.php +++ b/html/user/forum_search_action.php @@ -23,6 +23,8 @@ require_once('../inc/time.inc'); require_once('../inc/text_transform.inc'); require_once('../inc/forum.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array()); // Searches for the keywords in the $keyword_list array in thread titles. diff --git a/html/user/forum_subscribe.php b/html/user/forum_subscribe.php index ac4d36cdcc..f21cf3136d 100644 --- a/html/user/forum_subscribe.php +++ b/html/user/forum_subscribe.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -22,6 +22,8 @@ require_once('../inc/forum.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("action", "thread", "tnow", "ttok")); $action = get_str('action'); diff --git a/html/user/forum_thread.php b/html/user/forum_thread.php index 41dc0a7a61..088ec9b615 100644 --- a/html/user/forum_thread.php +++ b/html/user/forum_thread.php @@ -37,12 +37,17 @@ if ($filter != "false"){ } $logged_in_user = get_logged_in_user(false); + $tokens = ""; if ($logged_in_user) { BoincForumPrefs::lookup($logged_in_user); $tokens = url_tokens($logged_in_user->authenticator); } +if (DISABLE_FORUMS && !is_admin($logged_in_user)) { + error_page("Forums are disabled"); +} + if ($threadid < 1) { error_page("Invalid thread ID!"); } diff --git a/html/user/forum_thread_status.php b/html/user/forum_thread_status.php index 84f1824029..d0ba6dcb57 100644 --- a/html/user/forum_thread_status.php +++ b/html/user/forum_thread_status.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -28,6 +28,11 @@ $thread = BoincThread::lookup_id($threadid); if (!$thread) error_page("no such thread"); $logged_in_user = get_logged_in_user(); +BoincForumPrefs::lookup($logged_in_user); + +if (DISABLE_FORUMS && !is_admin($logged_in_user)) { + error_page("Forums are disabled"); +} $owner = BoincUser::lookup_id($thread->owner); if ($logged_in_user->id == $owner->id){ diff --git a/html/user/forum_thread_vote.php b/html/user/forum_thread_vote.php index e03611fd10..66950dfa5f 100644 --- a/html/user/forum_thread_vote.php +++ b/html/user/forum_thread_vote.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -21,6 +21,8 @@ require_once('../inc/forum.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("id")); $threadid = get_int('id'); diff --git a/html/user/forum_user_posts.php b/html/user/forum_user_posts.php index 83b1859d8e..825052fec0 100644 --- a/html/user/forum_user_posts.php +++ b/html/user/forum_user_posts.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -21,6 +21,8 @@ require_once('../inc/time.inc'); require_once('../inc/forum.inc'); require_once('../inc/user.inc'); +if (DISABLE_FORUMS) error_page("Forums are disabled"); + check_get_args(array("userid", "offset")); $userid = get_int("userid"); diff --git a/html/user/sample_index.php b/html/user/sample_index.php index 2efbf84049..1823428dd8 100644 --- a/html/user/sample_index.php +++ b/html/user/sample_index.php @@ -1,7 +1,7 @@ <?php // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -22,10 +22,6 @@ // my developing your own stylesheet // and customizing the header/footer functions in html/project/project.inc -error_reporting(E_ALL); -ini_set('display_errors', true); -ini_set('display_startup_errors', true); - require_once("../inc/db.inc"); require_once("../inc/util.inc"); require_once("../inc/news.inc");