<?php
/*
 * @package		Joomla.Framework
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 *
 * @component Phoca Component
 * @copyright Copyright (C) Jan Pavelka www.phoca.cz
 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
 */

jimport('joomla.application.component.controller');

$l['cp']	= 'COM_PHOCADOWNLOAD_CONTROL_PANEL';
$l['f']		= 'COM_PHOCADOWNLOAD_FILES';
$l['c']		= 'COM_PHOCADOWNLOAD_CATEGORIES';
$l['l']		= 'COM_PHOCADOWNLOAD_LICENSES';
$l['st']	= 'COM_PHOCADOWNLOAD_STATISTICS';
$l['u']		= 'COM_PHOCADOWNLOAD_USERS';
$l['fr']		= 'COM_PHOCADOWNLOAD_FILE_RATING';
$l['in']	= 'COM_PHOCADOWNLOAD_INFO';

// Submenu view
$view	= JRequest::getVar( 'view', '', '', 'string', JREQUEST_ALLOWRAW );

if ($view == 'phocadownloadcats') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats', true );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
} else if ($view == 'phocadownloadstat') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat', true );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
} else if ($view == 'phocadownloadinfo') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo',true );
} else if ($view == 'phocadownloadfiles') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles', true);
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
} else if ($view == 'phocadownloadlics') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics',true );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
} else if ($view == 'phocadownloadusers') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers', true );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
} else if ($view == 'phocadownloadrafile') {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload');
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile', true );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
} else {
	JSubMenuHelper::addEntry(JText::_($l['cp']), 'index.php?option=com_phocadownload', true);
	JSubMenuHelper::addEntry(JText::_($l['f']), 'index.php?option=com_phocadownload&view=phocadownloadfiles');
	JSubMenuHelper::addEntry(JText::_($l['c']), 'index.php?option=com_phocadownload&view=phocadownloadcats' );
	JSubMenuHelper::addEntry(JText::_($l['l']), 'index.php?option=com_phocadownload&view=phocadownloadlics' );
	JSubMenuHelper::addEntry(JText::_($l['st']), 'index.php?option=com_phocadownload&view=phocadownloadstat' );
	JSubMenuHelper::addEntry(JText::_($l['u']), 'index.php?option=com_phocadownload&view=phocadownloadusers' );
	JSubMenuHelper::addEntry(JText::_($l['fr']), 'index.php?option=com_phocadownload&view=phocadownloadrafile' );
	JSubMenuHelper::addEntry(JText::_($l['in']), 'index.php?option=com_phocadownload&view=phocadownloadinfo' );
}

class PhocadownloadCpController extends JController {
	function display() {
		parent::display();
	}
}
?>
