/**
  * Load the file for a class
  *
  * @access  public
  * @param   string  $class  The class that will be loaded
  * @return  boolean True on success
  * @since   1.5
  */
 public static function load($class)
 {
     $class = strtolower($class);
     //force to lower case
     if (class_exists($class)) {
         return;
     }
     $classes = JCKLoader::register();
     if (array_key_exists(strtolower($class), $classes)) {
         include $classes[$class];
         return true;
     }
     return false;
 }
Example #2
0
/*------------------------------------------------------------------------
# Copyright (C) 2005-2012 WebxSolution Ltd. All Rights Reserved.
# @license - GPLv2.0
# Author: WebxSolution Ltd
# Websites:  http://www.webxsolution.com
# Terms of Use: An extension that is derived from the JoomlaCK editor will only be allowed under the following conditions: http://joomlackeditor.com/terms-of-use
# ------------------------------------------------------------------------*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die;
/**
 * Install Model
 *
 * @package    JCK Editor
 * @subpackage JCK.install Wizard
 */
JCKLoader::loadExtendClass('model');
class InstallModelFont extends JCKModel
{
    private $_editor;
    public function __construct($config = array())
    {
        if (defined('JLEGACY_CMS')) {
            $sql = "SELECT id,params FROM #__plugins WHERE element = 'jckeditor' AND folder ='editors'";
        } else {
            $sql = "SELECT extension_id as id, params FROM #__extensions WHERE element = 'jckeditor' AND folder ='editors'";
        }
        //end if
        $database = JFactory::getDBO();
        $database->setQuery($sql);
        $result = $database->loadObject();
        $this->_editor = $result;
Example #3
0
<?php

/*------------------------------------------------------------------------
# Copyright (C) 2005-2012 WebxSolution Ltd. All Rights Reserved.
# @license - GPLv2.0
# Author: WebxSolution Ltd
# Websites:  http://www.webxsolution.com
# Terms of Use: An extension that is derived from the JoomlaCK editor will only be allowed under the following conditions: http://joomlackeditor.com/terms-of-use
# ------------------------------------------------------------------------*/
defined('JPATH_BASE') or die;
JCKLoader::loadExtendClass('view');
class InstallViewInstall extends JCKView
{
    public $nonExecutableFilesTotal = null;
    public $incorrectChmodFilesTotal = null;
    public $incorrectChmodFoldersTotal = null;
    public $nonWritableImageFolderTotal = null;
    public $permission = null;
    public $folderPermission = null;
    public function __construct($config = array())
    {
        parent::__construct($config);
        $document = JFactory::getDocument();
        $document->addStyleSheet($this->baseurl . '/css/style.css');
        jimport('joomla.environment.browser');
        $browser = JBrowser::getInstance();
        $browserType = $browser->getBrowser();
        $browserVersion = $browser->getMajor();
        if ($browserType == 'msie' && $browserVersion == 7) {
            $document->addStyleSheet($this->baseurl . '/css/style_ie7.css');
        } elseif ($browserType == 'msie' && $browserVersion == 8) {
Example #4
0
    public static function loadExtendClass($type)
    {
        $classname = 'JCK' . ucfirst($type);
        if (class_exists($classname)) {
            return;
        }
        $legacyClass = 'J' . ucfirst($type) . 'Legacy';
        $alias = 'JCK' . ucfirst($type);
        if (!class_exists($legacyClass)) {
            class_alias('J' . $type, $alias);
        } else {
            class_alias($legacyClass, $alias);
        }
    }
}
JCKLoader::loadExtendClass('controller');
class InstallController extends JCKController
{
    private $_overwrite = true;
    public static function isWinOS()
    {
        $os = strtoupper(substr(PHP_OS, 0, 3));
        $isWin = $os === 'WIN';
        return $isWin;
    }
    public function __construct($config = array())
    {
        if (defined('JLEGACY_CMS')) {
            $user =& JFactory::getUser();
            if (!$user->authorize('com_installer', 'installer')) {
                echo JError::raiseError(404, JText::_('ALERTNOTAUTH'));