<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
/* NSN News                                             */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/
defined('MAXIMUS') or Header("Location: ../../index.php");

if (is_file('modules/News/includes/functions.php')) {
	include_once('modules/News/includes/functions.php');
}
$module_name = "News";
$neconfig = ne_get_configs();
get_lang($module_name);
$index = 1;
automated_news();

// init news
$commentlimit   = $db->XMFnum($neconfig['commentlimit']);
$notify         = $db->XMFbin($neconfig['notify']);
$notify_email   = stripslashes($neconfig['notify_email']);
$notify_subject = stripslashes($neconfig['notify_subject']);
$notify_message = stripslashes($neconfig['notify_message']);
$notify_from    = stripslashes($neconfig['notify_from']);
$moderate       = $db->XMFnum($neconfig['moderate']);
$CensorMode     = $db->XMFnum($neconfig['CensorMode']);
$CensorReplace  = stripslashes($neconfig['CensorReplace']);
$pollcomm       = $db->XMFbin($neconfig['pollcomm']);
$articlecomm    = $db->XMFbin($neconfig['articlecomm']);
//

if (!empty($new_topic)) {
	redirect_url("modules.php?name=News&file=topics&topic=$new_topic");
die();
}

switch ($op) {

    default:
    if (is_file('modules/News/includes/homenews.php')) {include_once('modules/News/includes/homenews.php');}
    break;

    case 'rate_article':
    if (is_file('modules/News/includes/rate_article.php')) {include_once('modules/News/includes/rate_article.php');}
    break;

    case 'rate_complete':
    if (is_file('modules/News/includes/rate_complete.php')) {include_once('modules/News/includes/rate_complete.php');}
    break;

    case 'pdf':
    if (is_file('modules/News/includes/pdf.php')) {include_once('modules/News/includes/pdf.php');}
    break;

}