<?php

/**
* @version 2.6.8
* @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.' );

class menugroups {

  function NEW_MENU() {

    JToolBarHelper::back();

    JToolBarHelper::divider();

    JToolBarHelper::editList();

    JToolBarHelper::divider();

    JToolBarHelper::addNew();

    JToolBarHelper::divider();

    JToolBarHelper::save();

    JToolBarHelper::divider();

    JToolBarHelper::deleteList();

  }

  function EDELETE_MENU(){

    JToolBarHelper::editList();

    JToolBarHelper::divider();

    JToolBarHelper::deleteList();

  }

  function NO_MENU(){

  }

  function SETTINGS_MENU(){

    JToolBarHelper::title(  JText::_( 'DT_CONFIGURATION'), 'dtregister' );

      JToolBarHelper::save( 'savesettings', JText::_( 'DT_SAVE_SETTINGS') );
		 
  }

  function SAVE_CANCEL_MENUE(){

    JToolBarHelper::save();

    JToolBarHelper::divider();

    JToolBarHelper::cancel();

    JToolBarHelper::divider();

  }

  function EDIT_MENU() {

    JToolBarHelper::title(  JText::_( 'DT_EVENT_MANAGEMENT'), 'dtregister' );

    JToolBarHelper::save();

    JToolBarHelper::divider();

    JToolBarHelper::cancel();

    JToolBarHelper::divider();

  }

  function CONFIG_MENU() {

	  JToolBarHelper::title(  JText::_( 'DT_EVENT_MANAGEMENT'), 'dtregister' );

    JToolBarHelper::back();

    JToolBarHelper::divider();

    JToolBarHelper::editList();

	  JToolBarHelper::divider();

    JToolBarHelper::addNew();

	  JToolBarHelper::divider();

  	JToolBarHelper::save();

	  JToolBarHelper::divider();

    JToolBarHelper::deleteList();

  }

  function EVENT_MENU(){

	  JToolBarHelper::title(  JText::_( 'DT_EVENT_MANAGEMENT'), 'dtregister' );

    JToolBarHelper::back();
   
    $archive = JRequest::getVar('archive',-1) ;
	
   if($archive==1){
       JToolBarHelper::unarchiveList('unarchive_event');
   }else{
      JToolBarHelper::archiveList('archive_event');
   }
   
   JToolBarHelper::divider();

    JToolBarHelper::publishList('publish_event');

    	JToolBarHelper::divider();

		  JToolBarHelper::unpublishList('unpublish_event');

    JToolBarHelper::divider();

    JToolBarHelper::editList();

	  JToolBarHelper::divider();

    JToolBarHelper::addNew();

    JToolBarHelper::divider();

	 JToolBarHelper::editList('copyEvent', JText::_( 'DT_COPY_EVENT') );

	  JToolBarHelper::divider();

    JToolBarHelper::apply('applyevent');
	
	JToolBarHelper::divider();

  	JToolBarHelper::save();

	  JToolBarHelper::divider();

    JToolBarHelper::deleteList();

  }

  //For custom fields purpose

  function CUSTOM_FIELD_MENU()

  {

      JToolBarHelper::title(  JText::_( 'DT_CUSTOM_FIELDS_MANAGEMENT'), 'dtregister' );

    	JToolBarHelper::divider();

	  	JToolBarHelper::publishList('publish_customfield');

    	JToolBarHelper::divider();

		  JToolBarHelper::unpublishList('unpublish_customfield');

    	JToolBarHelper::divider();

		  JToolBarHelper::editListX('edit_customfield');

    	JToolBarHelper::divider();

		  JToolBarHelper::deleteList('Are you sure want to delete selected customfield','remove_customfield');
 
	    JToolBarHelper::divider();
	  
		  JToolBarHelper::editList('copyField', JText::_( 'DT_COPY_FIELD'));
 
    	JToolBarHelper::divider();

		  JToolBarHelper::addNewX('new_customfield');

  }

  function _EDIT_CUSTOMFIELD() {

		global $id;

		  JToolBarHelper::title(  JText::_( 'DT_CUSTOM_FIELDS_MANAGEMENT'), 'dtregister' );

      JToolBarHelper::save('save_customfield',JText::_( 'DT_SAVE'));

    	JToolBarHelper::divider();

		if ( $id ) {

			// for existing content items the button is renamed `close`

			JToolBarHelper::cancel( 'cancel_customfield', JText::_( 'DT_CLOSE') );

		} else {

			JToolBarHelper::cancel('cancel_customfield');

		}

	}

	//List registrations menu

	function _LIST_REGISTRATION_MENU()

	{

		  JToolBarHelper::title(  JText::_( 'DT_REGISTRATION_RECORDS'), 'dtregister' );

      JToolBarHelper::addNew('new_group_registration',JText::_( 'DT_GROUP_REGISTRATION'));

    	JToolBarHelper::divider();

		  JToolBarHelper::addNew('newmember',JText::_( 'DT_INDIVIDUAL_REGISTRATION'));

    	JToolBarHelper::divider();

		  JToolBarHelper::editList('editmember');

    	JToolBarHelper::divider();

		  JToolBarHelper::deleteList('Delete members','deletemember');
		  JToolBarHelper::divider();
		 JToolBarHelper::assign('resendthkemail',JText::_('DT_RESEND_THANKS_EMAIL'));

	}

	//List member menu

	function _LIST_MEMBER_MENU()

	{

		  JToolBarHelper::title(  JText::_( 'DT_REGISTRATION_RECORDS'), 'dtregister' );

         JToolBarHelper::back();

    	 JToolBarHelper::divider();
		 JToolBarHelper::deleteList(JText::_( 'DT_DELETE_GROUP_MEMBER'),'deletegrpmember');
         JToolBarHelper::divider();
		 JToolBarHelper::editList('editgroupmember');
		 JToolBarHelper::divider();
		  JToolBarHelper::addNew('addgroupmember',JText::_( 'DT_ADD_MEMBER'));
		 
	}

	//Edit member

	function _EDIT_MEMBER()

	{

	  JToolBarHelper::title(  JText::_( 'DT_REGISTRATION_RECORDS'), 'dtregister' );

        JToolBarHelper :: custom( 'listregistrations', 'back.png', 'back.png', 'back', false, false );

		JToolBarHelper::divider();

        JToolBarHelper::apply('savememberapply');

        JToolBarHelper::divider();

		JToolBarHelper::save('savemember');

	}

	function _VIEW_WAITING()

	{

		JToolBarHelper::title(  JText::_( 'DT_WAITING_LIST_MANAGER'), 'dtregister' );

    JToolBarHelper::editList('detail_event_waiting',JText::_( 'DT_VIEW_DETAILS'));

		JToolBarHelper::divider();

		JToolBarHelper::deleteList('Are you sure want to delete these items','remove_event_waiting');

		JToolBarHelper::divider();

	}

	function _VIEW_WAITING_DETAIL()

	{

		JToolBarHelper::title(  JText::_( 'DT_WAITING_LIST_MANAGER'), 'dtregister' );

    JToolBarHelper::back();

	}

	function _SEND_EMAIL()

	{

		JToolBarHelper::title(  JText::_( 'DT_EMAIL_REGISTRANTS'), 'dtregister' );

    JToolBarHelper::back();

		JToolBarHelper::divider();

		JToolBarHelper::addNew('send_mail',JText::_( 'DT_SEND_EMAIL'));

	}

	function _NEW_MEMBER()

	{

		JToolBarHelper::title(  JText::_( 'DT_REGISTRATION_RECORDS'), 'dtregister' );

    	JToolBarHelper::save('save_new_member');

		JToolBarHelper::divider();

		JToolBarHelper::cancel('cancel_new_member');

	}

	function _EDIT_GROUP_MEMBER()

	{

		JToolBarHelper::save('save_group_member');

		 JToolBarHelper::divider();

		 JToolBarHelper::back();

	}

	function _NEW_GROUP_REGISTRATION()

	{

		JToolBarHelper::title(  JText::_( 'DT_REGISTRATION_RECORDS'), 'dtregister' );

    JToolBarHelper::save('members_detail',JText::_( 'DT_NEXT_STEP'));

		JToolBarHelper::divider();

		JToolBarHelper::cancel('cancel_registration');

	}

	function _MEMBERS_DETAIL()

	{

		$memtot=isset($_REQUEST['memtot'])?$_REQUEST['memtot']:0;

		$currentMembet=isset($_REQUEST['current_member'])?$_REQUEST['current_member']:1;

		if($currentMembet <$memtot )

			JToolBarHelper::save('members_detail',JText::_( 'DT_NEXT_STEP'));

		else

			JToolBarHelper::save('group_registration_form',JText::_( 'DT_NEXT_STEP'));

		  JToolBarHelper::divider();

		  JToolBarHelper::cancel('cancel_registration');

	}

	function _REGISTRATION_FORM()

	{

		JToolBarHelper::save('save_group_registration');

		JToolBarHelper::divider();

		JToolBarHelper::cancel('cancel_registration');

	}

function LOCATION_MENU(){

   JToolBarHelper::title(  JText::_( 'DT_LOCATION_MANAGEMENT'), 'dtregister' );

   JToolBarHelper::deleteList('Are you sure want to delete selected location','deletelocation');

   JToolBarHelper::divider();

    JToolBarHelper::editList('editlocation', JText::_( 'DT_EDIT') );

	JToolBarHelper::divider();

   JToolBarHelper::addNew('newlocation',JText::_( 'DT_NEW_LOCATION'));

}

 function NEW_LOCATION_MENU()

	{

        JToolBarHelper::cancel('cancelLocation');

		JToolBarHelper::title(  JText::_( 'DT_LOCATION_MANAGEMENT'), 'dtregister' );

        JToolBarHelper::save('savelocation');

	}

 function EDIT_LOCATION_MENU()

	{

        JToolBarHelper::cancel('cancelLocation');

		JToolBarHelper::title(  JText::_( 'DT_LOCATION_MANAGEMENT'), 'dtregister' );

        JToolBarHelper::save('savelocation');

	}

function CATEGORIES_MENU()

  {
    
	JToolBarHelper::title(  JText::_( 'DT_CATEGORY_MANAGEMENT'), 'dtregister' );
    JToolBarHelper::divider();
    JToolBarHelper::deleteList('Are you sure want to delete selected category','deletecategories');
    JToolBarHelper::divider();

    JToolBarHelper::addNewX('newcategory');

  }

  function _EDIT_CATEGORY()

	{

		JToolBarHelper::title(  JText::_( 'DT_CATEGORY_MANAGEMENT'), 'dtregister' );

    JToolBarHelper::back();

		JToolBarHelper::divider();

		JToolBarHelper::save('savecategory');

    JToolBarHelper::divider();

    JToolBarHelper::cancel('cancelnewcategory');

	}

  function _SAVENEW_CATEGORY()

	{

		JToolBarHelper::title(  JText::_( 'DT_CATEGORY_MANAGEMENT'), 'dtregister' );

        JToolBarHelper::back();
        JToolBarHelper::divider();
        JToolBarHelper::save('savenewcategory');

	}

	function _EXPORT_EVENT_CSV()

	{

		JToolBarHelper::title(  JText::_( 'DT_CSV_EXPORT_UTILITY'), 'dtregister' );

    JToolBarHelper::addNew('save_event_export_setting',JText::_( 'DT_NEXT'));

	}

	 function _EXPORT_FIELD_CSV()

	{

		JToolBarHelper::title(  JText::_( 'DT_CSV_EXPORT_UTILITY'), 'dtregister' );

    JToolBarHelper::addNew('export_event_settings',JText::_( 'DT_BACK'));

		JToolBarHelper::spacer();

		JToolBarHelper::addNew('save_field_export_setting',JText::_( 'DT_CREATE_EXPORT'));

	}

	function DISCOUNT_CODE(){

		JToolBarHelper::title(  JText::_( 'DT_DISCOUNT_CODE_MANAGEMENT'), 'dtregister' );

    JToolBarHelper::deleteList('Delete disount code','delete_discountcode');

    JToolBarHelper::addNew('new_discount_code',JText::_( 'DT_NEW_DISCOUNT_CODE'));

	}

	function NEW_DISCOUNT_CODE(){

		JToolBarHelper::title(  JText::_( 'DT_DISCOUNT_CODE_MANAGEMENT'), 'dtregister' );

    JToolBarHelper::back();

    JToolBarHelper::save('save_discount_code',JText::_( 'DT_SAVE'));

	}

}

?>