<?php
/*
Simple:Press Forum
Admin Toolbox Panel Rendering
$LastChangedDate: 2009-11-13 12:59:56 -0700 (Fri, 13 Nov 2009) $
$Rev: 2963 $
*/

if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF']))
{
	die('Access Denied');
}

function sfa_render_toolbox_panel($formid)
{
?>
	<div class="clearboth"></div>

	<div class="wrap sfatag">
		<?php
			sfa_render_sidemenu();
		?>
		<div id='sfmsgspot'></div>
		<div id="sfmaincontainer">
			<?php sfa_render_toolbox_container($formid); ?>
		</div>
			<div class="clearboth"></div>
	</div>
<?php
	return;
}

function sfa_render_toolbox_container($formid)
{
	switch($formid)
	{
		case 'toolbox':
			include_once (SF_PLUGIN_DIR.'/admin/panel-toolbox/forms/sfa-toolbox-toolbox-form.php');
			sfa_toolbox_toolbox_form();
			break;

		case 'log':
			include_once (SF_PLUGIN_DIR.'/admin/panel-toolbox/forms/sfa-toolbox-log-form.php');
			sfa_toolbox_log_form();
			break;

		case 'environment':
			include_once (SF_PLUGIN_DIR.'/admin/panel-toolbox/forms/sfa-toolbox-environment-form.php');
			sfa_toolbox_environment_form();
			break;

		case 'uninstall':
			include_once (SF_PLUGIN_DIR.'/admin/panel-toolbox/forms/sfa-toolbox-uninstall-form.php');
			sfa_toolbox_uninstall_form();
			break;
		case 'database':
			include_once (SF_PLUGIN_DIR.'/admin/panel-toolbox/forms/sfa-toolbox-filter-form.php');
			sfa_toolbox_filter_form();
			break;
		case 'prune':
			$topicdata = sfa_prepare_filter_topics();
			include_once (SF_PLUGIN_DIR.'/admin/panel-toolbox/forms/sfa-toolbox-prune-form.php');
			sfa_toolbox_prune_form($topicdata);
			break;
	}
	return;
}

?>