Esempio n. 1
0
<?php

/*-------------------------------------------------------------------------
# mod_improved_ajax_login - Improved AJAX Login and Register
# -------------------------------------------------------------------------
# @ author    Balint Polgarfi
# @ copyright Copyright (C) 2014 Offlajn.com  All Rights Reserved.
# @ license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @ website   http://www.offlajn.com
-------------------------------------------------------------------------*/
defined('_JEXEC') or die('Restricted access');
@JOfflajnParams::load('offlajnonoff');
class JElementOfflajnGradient extends JOfflajnFakeElementBase
{
    var $_moduleName = '';
    var $_name = 'Gradient';
    function universalfetchElement($name, $value, &$node)
    {
        $size = $node->attributes('size') ? 'size="' . $node->attributes('size') . '"' : '';
        $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES), ENT_QUOTES);
        $attrs = $node->attributes();
        $oo = @$attrs['onoff'] === '0' ? 0 : 1;
        $document =& JFactory::getDocument();
        DojoLoader::addScriptFile('/modules/' . $this->_moduleName . '/params/offlajnonoff/offlajnonoff/offlajnonoff.js');
        DojoLoader::addScriptFile('/modules/' . $this->_moduleName . '/params/offlajngradient/offlajngradient/offlajngradient.js');
        $document->addStyleSheet(JURI::base() . '../modules/' . $this->_moduleName . '/params/offlajngradient/offlajngradient/offlajngradient.css');
        $document->addStyleSheet(JURI::base() . '../modules/' . $this->_moduleName . '/params/offlajncolor/offlajncolor/offlajncolor.css');
        DojoLoader::addScript('jQuery.fn.jPicker.defaults.images.clientPath="' . JURI::base() . '../modules/' . $this->_moduleName . '/params/offlajncolor/offlajncolor/jpicker/images/";');
        $id = $this->generateId($name);
        $v = explode('-', $value);
        $f = "";
Esempio n. 2
0
<?php

/*-------------------------------------------------------------------------
# mod_improved_ajax_login - Improved AJAX Login and Register
# -------------------------------------------------------------------------
# @ author    Balint Polgarfi
# @ copyright Copyright (C) 2014 Offlajn.com  All Rights Reserved.
# @ license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @ website   http://www.offlajn.com
-------------------------------------------------------------------------*/
defined('_JEXEC') or die('Restricted access');
@JOfflajnParams::load('offlajnlist');
class JElementOfflajnMenuItem extends JElementOfflajnList
{
    function universalfetchElement($name, $value, &$node)
    {
        if (version_compare(JVERSION, '1.6.0', 'ge')) {
            require_once JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php';
            $menus = MenusHelper::getMenuLinks();
            foreach ($menus as $menu) {
                $node->addChild('option', array('value' => 'optgroup'))->setData($menu->title);
                foreach ($menu->links as $link) {
                    $node->addChild('option', array('value' => $link->value))->setData('&nbsp;&nbsp;&nbsp;' . $link->text);
                }
            }
        } else {
            require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_menus' . DS . 'helpers' . DS . 'helper.php';
            $db =& JFactory::getDBO();
            $query = 'SELECT id, parent, name, menutype, type' . ' FROM #__menu WHERE published = 1' . ' ORDER BY menutype, parent, ordering';
            $db->setQuery($query);
            $menuItems = $db->loadObjectList();