<?php
if(!defined("BASE_DIR")) exit;
	
if(!file_exists(BASE_DIR . 'class/Class.Faq.php'))
{
	module_not_installed('Gaming');
} else {
	if(!perm('faq'))
	{
		no_perm();
	} else {
		include_once(BASE_DIR . 'admin/class/class.faq.php');
		$faq = new Faq;
		
		$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'overview';
		switch($_REQUEST['sub'])
		{
			case 'overview':
				$faq->Show();
			break;
			
			case 'delete':
				$faq->deleteFaqRecursive(@$_REQUEST['id']);
			break;
			
			case 'edit':
				$faq->editFaq($_REQUEST['id']);
			break;
			case 'new':
				$faq->newFaq(@$_REQUEST['id']);
			break;
		}
	}
}
?>