<?php
if(!defined("BASE_DIR")) exit;
if(!perm('contact_forms'))
{
	no_perm();
} else {
	
	include_once(BASE_DIR . 'admin/class/class.contactforms.php');
	$contact = new Contactform;
	
	$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'overview';
	switch($_REQUEST['sub'])
	{
		case 'overview':
			$contact->Overview();
		break;
		
		case 'new':
			$contact->NewForm();
		break;
		
		case 'edit':
			$contact->Edit($_REQUEST['id']);
		break;
		
		case 'delete':
			$contact->DeleteForm($_REQUEST['id']);
		break;
		
		case 'copy':
			$contact->CopyForm($_REQUEST['id']);
		break;
	}
}
?>
		