<?php
// $Id: config_2.php,v 1.4 2006/06/21 04:29:44 ohwada Exp $

// 2006-06-20 K.OHWADA
// REQ 3873: login user can read RSS.

// 2005-10-01 K.OHWADA
// change index.php to class

//=========================================================
// What's New Module
// admin config
// 2005-10-01 K.OHWADA
//=========================================================

include_once 'admin_header.php';

// class
$class_config_form =& Whatsnew_Config_Form::getInstance();
$class_config_save =& Whatsnew_Config_Save::getInstance();

$op = get_post_get('op');

if ($op == 'save')
{
	if( !check_token() ) 
	{
		xoops_cp_header();
		xoops_error("Token Error");
	}
	else
	{
		$class_config_save->save();
		redirect_header("config_2.php", 2, _WHATSNEW_CONFIG_SAVED);
	}
}
else
{
	xoops_cp_header();
}

print_header();
print_menu();
echo "<h4>"._MI_WHATSNEW_ADMENU_CONFIG2."</h4>\n";
$class_config_form->set_submit_value( _WHATSNEW_SAVE );

echo "<h4>"._WHATSNEW_CONFIG_MAIN."</h4>\n";
$class_config_form->set_form_title( _WHATSNEW_CONFIG_MAIN );
$class_config_form->show_by_catid( 2 );

// REQ 3873: login user can read RSS.
echo "<h4>"._WHATSNEW_CONFIG_RSS."</h4>\n";
$class_config_form->set_form_title( _WHATSNEW_CONFIG_RSS );
$class_config_form->show_by_catid( 5 );

echo "<h4>"._WHATSNEW_CONFIG_SITE."</h4>\n";
$class_config_form->set_form_title( _WHATSNEW_CONFIG_SITE );
$class_config_form->show_by_catid( 3 );

echo "<h4>"._WHATSNEW_CONFIG_PING."</h4>\n";
$class_config_form->set_form_title( _WHATSNEW_CONFIG_PING );
$class_config_form->show_by_catid( 4 );

xoops_cp_footer();
exit();
// --- main end ---


?>