<?php
// $Id: config_2.php,v 1.3 2005/10/22 08:10:52 ohwada Exp $

// 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 );

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 ---


?>