<?php

/**
* @version 2.6.3
* @package Joomla 1.5
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

jimport( 'joomla.application.helper' );

require_once( JApplicationHelper::getPath( 'toolbar_html', 'com_dtregister' ) );

$act=JRequest::getWord('act');

switch ($act) {

	case "settings":

		$task = "settings";

		break;

	case "registrations":

		$task = "listregistrations";

		break;

		//Custom Fields

	case "custom_fields":

		$task="custom_fields";

		break;

	case "full_event":

		$task="show_event_waiting";

		break;

	case "event_email":

		$task="show_event_email_form";

		break;

  case "categories":

		$task = "manage_categories";

		break;

 case "groups" :

  $task = "groups";

  break ;

case "locations" :

  $task = "locations";

  break ;

}

switch ($task) {

  case "new":

    menugroups::NEW_MENU();

    break;

	case "registrations":

    menugroups::NO_MENU();

    break;

	case "editmember":

	case "editmemberA":

    menugroups::_EDIT_MEMBER();

    break;

	case "deletemember":

    menugroups::NO_MENU();

    break;

  case "edit":

    menugroups::EDIT_MENU();

    break;

  case "settings":

    menugroups::SETTINGS_MENU();

    break;

   //Custom fields here

  case "copyField":
  case  'new_customfield':

	case  'edit_customfield':

	case  'editA_customfield':

		  menugroups::_EDIT_CUSTOMFIELD();

		break;

	case 'custom_fields':

		  menugroups::CUSTOM_FIELD_MENU();

		break;

	//End custom fields

	case 'listregistrations':

		menugroups::_LIST_REGISTRATION_MENU();

		break;

	//List registration

	case 'showmembers':

		menugroups::_LIST_MEMBER_MENU();

		break;

	case 'show_event_waiting':

		menugroups::_VIEW_WAITING();

		break;

	case 'detail_event_waiting':

		menugroups::_VIEW_WAITING_DETAIL();

		break;

	case 'show_event_email_form':

		menugroups::_SEND_EMAIL();

		break;

	case 'newmember':

		menugroups::_NEW_MEMBER();

		break;

	case 'new_group_registration':

		menugroups::_NEW_GROUP_REGISTRATION();

		break;

	case 'members_detail':

		menugroups::_MEMBERS_DETAIL();

		break;

	case 'group_registration_form':

		menugroups::_REGISTRATION_FORM();

		break;

    case "manage_categories":

        menugroups::CATEGORIES_MENU();

		break;

    case  'editcategory':

        menugroups::_EDIT_CATEGORY();

		break;

    case  'newcategory':

        menugroups::_SAVENEW_CATEGORY();

		break;

    case  'export_event_settings':

        menugroups::_EXPORT_EVENT_CSV();

	break;

	case 'save_event_export_setting':

		menugroups::_EXPORT_FIELD_CSV();

	break;

 case 'discount_codes':

		menugroups::DISCOUNT_CODE();

    break;

  case 'new_discount_code':

		menugroups::NEW_DISCOUNT_CODE();

   break;

    case 'edit_discount_code':

		menugroups::NEW_DISCOUNT_CODE();

   break;
   case 'addgroupmember' :
   case 'editgroupmember':

   		menugroups::_EDIT_GROUP_MEMBER();

   break;

  case 'sync':

  		menugroups::NO_MENU();

  break ;

  case 'locations':

    menugroups::LOCATION_MENU();

  break ;

   case 'cancelLocation':

    menugroups::LOCATION_MENU();

  break ;

  case 'editlocation':

    menugroups::EDIT_LOCATION_MENU() ;

  break ;

  case 'newlocation':

    menugroups::NEW_LOCATION_MENU();

  break ;

  case "groups" :

       menugroups::EVENT_MENU();

  break ;

  default:

    menugroups::EVENT_MENU();

    break;

}

?>