Пример #1
0
function joooid_getController()
{
    if (version_compare(JVERSION, '3.0', '<')) {
        return JController::getInstance('joooid');
    }
    return JControllerLegacy::getInstance('joooid');
}
Пример #2
0
 public static function getController()
 {
     if (version_compare(JVERSION, '3.0', 'ge')) {
         return JControllerLegacy::getInstance('Bt_Socialconnect');
     } else {
         return JController::getInstance('Bt_Socialconnect');
     }
 }
Пример #3
0
	/**
	 * Render the application
	 *
	 * @return	void
	 */
	public function render()
	{
		$document = JFactory::getDocument();
		$config = JFactory::getConfig();
		$user = JFactory::getUser();

		switch($document->getType())
		{
			case 'html' :
				// Set metadata
				$document->setTitle(JText::_('INSTL_PAGE_TITLE'));
				break;
			default :
				break;
		}

		// Define component path
		define('JPATH_COMPONENT', JPATH_BASE);
		define('JPATH_COMPONENT_SITE', JPATH_SITE);
		define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR);

		// Start the output buffer.
		ob_start();

		// Import the controller.
		require_once JPATH_COMPONENT.'/controller.php';

		// Execute the task.
		$controller	= JController::getInstance('JInstallation');
		$controller->execute(JRequest::getVar('task'));
		$controller->redirect();

		// Get output from the buffer and clean it.
		$contents = ob_get_contents();
		ob_end_clean();

		$file = JRequest::getCmd('tmpl', 'index');

		$params = array(
			'template'	=> 'template',
			'file'		=> $file.'.php',
			'directory' => JPATH_THEMES,
			'params'	=> '{}'
		);

		$document->setBuffer($contents, 'installation');
		$document->setTitle(JText::_('INSTL_PAGE_TITLE'));

		$data = $document->render(false, $params);
		JResponse::setBody($data);
		if (JFactory::getConfig()->get('debug_lang')) {
			$this->debugLanguage();
		}
	}
Пример #4
0
    public function updateCertificatesTable($passed) {

        $testid = JRequest::getVar('testid');
        $user =& JFactory::getUser();

        require_once( JPATH_SITE.DS. DS . 'components' . DS . 'com_flexpaper' . DS . 'controller.php');
        $flexpaper_controller = JController::getInstance('flexpaper');

        $flexpaper_controller->CreateCertificate($testid,$user->id, $passed);

    }
Пример #5
0
 * required controller class
 */
if (strpos(JRequest::getCmd('task'), '.') !== false) {
    $controller = explode('.', JRequest::getCmd('task'));
    $controller = array_shift($controller);
    $classname = 'FabrikController' . JString::ucfirst($controller);
    $path = JPATH_COMPONENT . '/controllers/' . $controller . '.php';
    if (JFile::exists($path)) {
        require_once $path;
        // Needed to process J content plugin (form)
        JRequest::setVar('view', $controller);
        $task = explode('.', JRequest::getCmd('task'));
        $task = array_pop($task);
        $controller = new $classname();
    } else {
        $controller = JController::getInstance('Fabrik');
    }
} else {
    $classname = 'FabrikController' . JString::ucfirst($controller);
    $controller = new $classname();
    $task = JRequest::getCmd('task');
}
if ($isplugin) {
    // Add in plugin view
    $controller->addViewPath(JPATH_SITE . '/plugins/fabrik_' . $type . '/' . $name . '/views');
    // Add the model path
    $modelpaths = JModel::addIncludePath(JPATH_SITE . '/plugins/fabrik_' . $type . '/' . $name . '/models');
}
$app = JFactory::getApplication();
$package = JRequest::getVar('package', 'fabrik');
$app->setUserState('com_fabrik.package', $package);
Пример #6
0
<?php

/**
 * @version		$Id$
 * @copyright   	Copyright (C) 2007 - 2009 Joomla! Vargas. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @author		Guillermo Vargas (guille@vargas.co.cr)
 */
// no direct access
defined('_JEXEC') or die;
JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables');
jimport('joomla.form.form');
JForm::addFieldPath(JPATH_COMPONENT . DS . 'models' . DS . 'fields');
//JForm::addFieldPath( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_menus'.DS.'models'.DS.'fields' );
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Xmap');
$controller->execute(JRequest::getVar('task'));
$controller->redirect();
Пример #7
0
<?php

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
//JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
JTable::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_mailup' . DS . 'tables');
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_mailup')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// require helper file
JLoader::register('MailUPHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'mailup.php');
// import joomla controller library
jimport('joomla.application.component.controller');
// Get an instance of the controller prefixed by MailUP
$controller = JController::getInstance('MailUP');
// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
Пример #8
0
<?php

/**
 * @version		$Id$
 * @package		Joomla.Administrator
 * @subpackage	com_search
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_search')) {
    return JError::raiseWarning(404, JText::_('ALERTNOTAUTH'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Search');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #9
0
<?php

/**
 * @version		$Id$
 * @package		Joomla.Administrator
 * @subpackage	com_languages
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_languages')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Languages');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #10
0
<?php

/**
 * @version		$Id: banners.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Administrator
 * @subpackage	com_banners
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_banners')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
// Helper
require_once JPATH_COMPONENT . '/helpers/jnt_hanhphuc.php';
// Execute the task.
$controller = JController::getInstance('Jnt_HanhPhuc');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #11
0
<?php

/**
 * @package     H5P
 * @subpackage  com_h5p
 * @copyright   Copyright (C) 2013 Joubel AS. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import joomla controller library
jimport('joomla.application.component.controller');
// Get an instance of the controller prefixed by H5P
$controller = JController::getInstance('H5P');
// Get the task
$jinput = JFactory::getApplication()->input;
$task = $jinput->get('task', "", 'STR');
// Perform the Request task
$controller->execute($task);
// Redirect if set by the controller
$controller->redirect();
Пример #12
0
<?php

defined('_JEXEC') or die;
define('_HELPDESK_VERSION', '1.1');

// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_helpdesk')) {
	return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}

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

require_once(JPATH_COMPONENT.'/helpers/helpdesk.php');

$controller	= JController::getInstance('Helpdesk');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #13
0
/**
 * @package   	SocialLogin Component
 * @copyright 	Copyright 2012 http://www.oneall.com - All rights reserved.
 * @license   	GNU/GPL 2 or later
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *
 */
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
jimport('joomla.application.component.controller');
// Get an instance of the controller
$controller = JController::getInstance('SocialLogin');
// Perform the requested task
$controller->execute(JRequest::getCmd('task', 'display'));
// Redirect if set by the controller
$controller->redirect();
Пример #14
0
 /**
  * @todo Implement testGetInstance().
  */
 public function testGetInstance()
 {
     // Remove the following lines when you implement this test.
     $this->markTestIncomplete();
     JController::getInstance('not-found');
 }
Пример #15
0
<?php

/*
*
*	Quip Forum for Joomla!
*	(c) 2010-2012 Robert Gerald Porter
*
*	Author: 	Robert Gerald Porter <*****@*****.**>
*	Version: 	0.3
*   License: 	GPL v3.0
*
*   This extension is free software: you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation, either version 3 of the License, or
*   (at your option) any later version.
*
*   This extension is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details <http://www.gnu.org/licenses/>.
*	
*/
defined('_JEXEC') or die;
require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'helper' . '.php';
jimport('joomla.application.component.controller');
$controller = JController::getInstance('QuipForum');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #16
0
<?php

/**
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Include dependancies
jimport('joomla.application.component.controller');
require_once JPATH_COMPONENT . '/helpers/route.php';
require_once JPATH_COMPONENT . '/helpers/query.php';
$controller = JController::getInstance('Content');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #17
0
 * @package			[%%com_architectcomp%%]
 * @subpackage		[%%com_architectcomp%%].site
 * @copyright		[%%COMPONENTCOPYRIGHT%%]
 * @license			GNU General Public License version 3 or later; See http://www.gnu.org/copyleft/gpl.html 
 * 
 * The following Component Architect header section must remain in any distribution of this file
 * 
 * @version			$Id: architectcomp.php 452 2015-03-23 18:19:40Z BrianWade $
 * @CAauthor		Component Architect (www.componentarchitect.com)
 * @CApackage		architectcomp
 * @CAsubpackage	architectcomp.site
 * @CAtemplate		joomla_2_5_standard (Release 1.0.5)
 * @CAcopyright		Copyright (c)2013 - 2015 Simply Open Source Ltd. (trading as Component Architect). All Rights Reserved
 * @Joomlacopyright Copyright (c)2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @CAlicense		GNU General Public License version 3 or later; See http://www.gnu.org/copyleft/gpl.html
 * 
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 */
defined('_JEXEC') or die;
// Include dependancies
jimport('joomla.application.component.controller');
require_once JPATH_COMPONENT . '/helpers/route.php';
require_once JPATH_COMPONENT . '/helpers/query.php';
require_once JPATH_COMPONENT . '/helpers/[%%architectcomp%%].php';
$controller = JController::getInstance('[%%ArchitectComp%%]');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #18
0
<?php

/**
 * @package   	SocialLogin
 * @copyright 	Copyright 2012 http://www.loginradius.com - All rights reserved.
 * @license   	GNU/GPL 2 or later
 */
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
jimport('joomla.application.component.controller');
// Get an instance of the controller
$controller = JController::getInstance('SocialLoginAndSocialShare');
// Perform the requested task
$controller->execute(JRequest::getCmd('task', 'display'));
// Redirect if set by the controller
$controller->redirect();
Пример #19
0
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
// Execute the task.
$controller = JController::getInstance('Finder');
$controller->execute(JFactory::getApplication()->input->get('task', '', 'cmd'));
$controller->redirect();
Пример #20
0
<?php

/**
 * @package		Joomla.Administrator
 * @subpackage	com_users
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_users')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Register helper class
JLoader::register('UsersHelper', dirname(__FILE__) . '/helpers/users.php');
// Include dependancies
jimport('joomla.application.component.controller');
// Execute the task.
$controller = JController::getInstance('Users');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #21
0
 * @package		Joomla.Administrator
 * @subpackage	com_media
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Access check.
$user = JFactory::getUser();
$asset = JRequest::getCmd('asset');
$author = JRequest::getCmd('author');
if (!$user->authorise('core.manage', 'com_media') && (!$asset or !$user->authorise('core.edit', $asset) && !$user->authorise('core.create', $asset) && count($user->getAuthorisedCategories($asset, 'core.create')) == 0 && !($user->id == $author && $user->authorise('core.edit.own', $asset)))) {
    return JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));
}
$params = JComponentHelper::getParams('com_media');
// Load the admin HTML view
require_once JPATH_COMPONENT . '/helpers/media.php';
// Set the path definitions
$popup_upload = JRequest::getCmd('pop_up', null);
$path = "file_path";
$view = JRequest::getCmd('view');
if (substr(strtolower($view), 0, 6) == "images" || $popup_upload == 1) {
    $path = "image_path";
}
define('COM_MEDIA_BASE', JPATH_ROOT . '/' . $params->get($path, 'images'));
define('COM_MEDIA_BASEURL', JURI::root() . $params->get($path, 'images'));
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Media');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #22
0
<?php

/**
 * @version		$Id$
 * @package		Joomla.Administrator
 * @subpackage	com_messages
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access.
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_messages')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Messages');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #23
0
<?php

/**
*  version 1.1
* @package		VEL Notice
* @copyright	Copyright (C) 2011 Tom Fuller, Inc. All rights reserved.
* @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* Technical Support: http://joomlacode.org/gf/project/extensionsecure/
*/
// no direct access
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_velnotice')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// require helper file
JLoader::register('VelNoticeHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'velnotice.php');
// Require the com_content helper library
jimport('joomla.application.component.controller');
//JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
$controller = JController::getInstance('velnotice');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #24
0
<?php

/**
 * @version		$Id: banners.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Site
 * @subpackage	com_banners
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
// Include dependancies
jimport('joomla.application.component.controller');
// Execute the task.
$controller = JController::getInstance('Banners');
$controller->execute(JRequest::getVar('task', 'click'));
$controller->redirect();
Пример #25
0
<?php

/**
 * @package		Joomla.Administrator
 * @subpackage	com_newsfeeds
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access.
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_newsfeeds')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Newsfeeds');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #26
0
<?php

/**
 * @package		Joomla.Site
 * @subpackage	com_wrapper
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Wrapper');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #27
0
$plugins = JPluginHelper::getPlugin('system');
//wipe them out
foreach ($plugins as $plugin) {
    $plugin->type = 'notToBeUsed';
    //change type from system
}
$mainframe->initialise();
$mainframe->route();
/**
 * DISPATCH THE APPLICATION
 *
 * NOTE :
 */
$component_path = dirname(__FILE__);
require_once $component_path . DS . 'controller.php';
if (class_exists('JControllerLegacy')) {
    $controller = JControllerLegacy::getInstance('Install', array('base_path' => $component_path));
} else {
    $controller = JController::getInstance('Install', array('base_path' => $component_path));
}
$task = JRequest::getCmd('task', '');
ob_start();
$controller->execute($task);
$controller->redirect();
$contents = ob_get_contents();
ob_end_clean();
ob_start();
$document = JFactory::getDocument();
$head = $document->getBuffer('head');
$head = '<html><head>' . $head . '</head>';
echo $head . '<body>' . $contents . '</body></html>';
Пример #28
0
<?php

defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
JLoader::register("SroHelper", JPATH_COMPONENT_ADMINISTRATOR . "/helpers/general.php");
if (version_compare(JVERSION, "2.5", "ge")) {
    $task = JFactory::getApplication()->input->get("task");
} else {
    $task = JRequest::getCmd("task");
}
if (version_compare(JVERSION, "1.6", "ge")) {
    $controller = JController::getInstance("Sro");
    JHtml::Stylesheet("com_sro/site.css", null, true);
} else {
    require_once JPATH_SITE . "/components/com_sro/controller.php";
    $controller = new SroController();
    JHtml::Stylesheet("site.css", JURI::root() . "media/com_sro/css/");
    $lang =& JFactory::getLanguage();
    $lang->load("com_sro", JPATH_SITE, null, true);
    $lang->load("com_sro", JPATH_COMPONENT, null, true);
}
$controller->execute($task);
$controller->redirect();
Пример #29
0
<?php

/**
 * @package		Joomla.Administrator
 * @subpackage	com_weblinks
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_weblinks')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Weblinks');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Пример #30
0
<?php

/**
 * @package Component cedTag for Joomla! 2.5
 * @author waltercedric.com
 * @copyright (C) 2012 http://www.waltercedric.com
 * @license GNU/GPL v3.0 http://www.gnu.org/copyleft/gpl.html
 **/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controller');
jimport('joomla.application.input');
// Create the controller
$controller = JController::getInstance('CedTag');
$task = JFactory::getApplication()->input->get('task', 'default', 'string');
// Perform the Request task
$controller->execute($task);
// Redirect if set by the controller
$controller->redirect();