Your IP : 216.73.217.95


Current Path : /proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/
Upload File :
Current File : //proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/acymailing.php.tar

home/digilove/public_html/components/com_acymailing/acymailing.php000064400000004500152346404760021600 0ustar00<?php
/**
 * @package	AcyMailing for Joomla!
 * @version	5.5.0
 * @author	acyba.com
 * @copyright	(C) 2009-2016 ACYBA S.A.R.L. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
jimport('joomla.application.component.controller');
jimport('joomla.application.component.view');

include_once(rtrim(JPATH_ADMINISTRATOR, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_acymailing'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php');

if(defined('JDEBUG') AND JDEBUG) acymailing_displayErrors();

$view = JRequest::getCmd('view');
if(!empty($view) AND !JRequest::getCmd('ctrl')){
	JRequest::setVar('ctrl', $view);
	$layout = JRequest::getCmd('layout');
	if(!empty($layout)){
		JRequest::setVar('task', $layout);
	}
}
$taskGroup = JRequest::getCmd('ctrl', JRequest::getCmd('gtask', 'lists'));

global $Itemid;
if(empty($Itemid)){
	$urlItemid = JRequest::getInt('Itemid');
	if(!empty($urlItemid)) $Itemid = $urlItemid;
}


$config =& acymailing_config();

$doc = JFactory::getDocument();
$doc->addScript(ACYMAILING_JS.'acymailing.js?v='.str_replace('.', '', $config->get('version')));
$doc->addScript(ACYMAILING_JS.'acymailing_compat.js?v='.str_replace('.', '', $config->get('version')));


$cssFrontend = $config->get('css_frontend', 'default');
if(!empty($cssFrontend)){
	$doc->addStyleSheet(ACYMAILING_CSS.'component_'.$cssFrontend.'.css?v='.filemtime(ACYMAILING_MEDIA.'css'.DS.'component_'.$cssFrontend.'.css'));
}

if($taskGroup == 'newsletter') $taskGroup = 'frontnewsletter';

if(!file_exists(ACYMAILING_CONTROLLER_FRONT.$taskGroup.'.php') || !include(ACYMAILING_CONTROLLER_FRONT.$taskGroup.'.php')){
	return JError::raiseError(404, 'Page not found : '.$taskGroup);
}

$className = ucfirst($taskGroup).'Controller';
$classGroup = new $className();
JRequest::setVar('view', $classGroup->getName());

$action = JRequest::getCmd('task');
if(empty($action)){
	$action = JRequest::getCmd('defaulttask');
	JRequest::setVar('task', $action);
}

$classGroup->execute($action);
$classGroup->redirect();
if(JRequest::getString('tmpl') !== 'component' && !in_array(JRequest::getCmd('task'), array('unsub', 'saveunsub', 'optout', 'out', 'view'))){
	echo acymailing_footer();
}
home/digilove/public_html/plugins/system/nrframework/fields/acymailing.php000064400000005147152412632050023245 0ustar00<?php

/**
 * @author          Tassos Marinos <info@tassos.gr>
 * @link            https://www.tassos.gr
 * @copyright       Copyright © 2024 Tassos All Rights Reserved
 * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/

// No direct access to this file
defined('_JEXEC') or die;

use Joomla\CMS\Form\Field\GroupedlistField;
use Joomla\CMS\HTML\HTMLHelper;
use NRFramework\Extension;

class JFormFieldAcymailing extends GroupedlistField
{
	/**
	 * Method to get the field option groups.
	 *
	 * @return  array  The field option objects as a nested array in groups.
	 *
	 * @since   1.6
	 */
    public function getGroups()
    {
        $groups = [];
        $lists  = [];

        if ($acymailing_5_is_installed = Extension::isInstalled('com_acymailing'))
        {
            $lists['5'] = $this->getAcym5Lists();
        }

        if ($acymailing_6_is_installed = Extension::isInstalled('com_acym'))
        {
            $lists['6'] = $this->getAcym6Lists();
        }

        foreach ($lists as $group_key => $group)
        {
            if (!is_array($group))
            {
                continue;
            }

            foreach ($group as $list)
            {
                $groupLabel = 'AcyMailing ' . ($group_key == '5' ? $group_key : '');
                $groups[$groupLabel][] = HTMLHelper::_('select.option', $list->id, $list->name);
            }
        }

        return $groups;
    }

    /**
     *  Get AcyMailing 6 lists
     *
     *  @return  mixed   Array on success, null on failure
     */
    private function getAcym6Lists()
    {
        if (!@include_once(JPATH_ADMINISTRATOR . '/components/com_acym/helpers/helper.php'))
        {
            return;
        }

        $lists = acym_get('class.list')->getAll();

        if (!is_array($lists))
        {
            return;
        }

        // Add 6: prefix to each list id.
        foreach ($lists as $key => &$list)
        {
            $list->id = '6:' . $list->id;
        }

        return $lists;
    }

    /**
     *  Get AcyMailing 5 lists
     *
     *  @return  mixed   Array on success, null on failure
     */
    private function getAcym5Lists()
    {
        if (!@include_once(JPATH_ADMINISTRATOR . '/components/com_acymailing/helpers/helper.php'))
        {
            return;
        }
         
        $lists = acymailing_get('class.list')->getLists();

        if (!is_array($lists))
        {
            return;
        }

        // The getGroups method expects the id property
        foreach ($lists as $key => $list)
        {
            $list->id = $list->listid;
        }

        return $lists;
    }
}