<?php

/**
* @version 2.8.9
* @package Joomla 2.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( 'Restricted access' );

class DtregisterControllerTransaction extends DtrController { 

    var $name ='transaction';
	
	 function __construct($config = array()){

		 parent::__construct($config);

		 $this->view = & $this->getView( 'transaction', 'html' );  

		 $this->view->setModel($this->getModel('transaction'),true);
		
		 $this->registerDefaultTask("index");

		 JToolBarHelper::title(  JText::_( 'DT_TRANSACTION_MANAGEMENT'), 'dtregister' );
		 
		  $user	=& JFactory::getUser();
		  global $mainframe;
		  if($user->gid !=25){
			 // $mainframe->redirect("index.php?option=com_dtregister&controller=authorize&task=auth");
		  }
		  //pr($user);

      }
	  function checkpermission(){ return true;}
	  function index(){

		// $acl	=& JFactory::getACL();

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

		$mtransaction = $this->getModel('transaction');

		$transactions = $mtransaction->table->find();

		$this->view->assign('transactions',$transactions);
        $this->view->setLayout('index');
		$this->view->display();
	    //$this->display();

   }	  
	  
}
?>