Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/controllers.zip
Назад
PK ��!]���� � article.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_content * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * The article controller * * @since 1.6 */ class ContentControllerArticle extends JControllerForm { /** * Class constructor. * * @param array $config A named array of configuration variables. * * @since 1.6 */ public function __construct($config = array()) { parent::__construct($config); // An article edit form can come from the articles or featured view. // Adjust the redirect view on the value of 'return' in the request. if ($this->input->get('return') == 'featured') { $this->view_list = 'featured'; $this->view_item = 'article&return=featured'; } } /** * Method override to check if you can add a new record. * * @param array $data An array of input data. * * @return boolean * * @since 1.6 */ protected function allowAdd($data = array()) { $categoryId = ArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int'); $allow = null; if ($categoryId) { // If the category has been passed in the data or URL check it. $allow = JFactory::getUser()->authorise('core.create', 'com_content.category.' . $categoryId); } if ($allow === null) { // In the absence of better information, revert to the component permissions. return parent::allowAdd(); } return $allow; } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 1.6 */ protected function allowEdit($data = array(), $key = 'id') { $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $user = JFactory::getUser(); // Zero record (id:0), return component edit permission by calling parent controller method if (!$recordId) { return parent::allowEdit($data, $key); } // Check edit on the record asset (explicit or inherited) if ($user->authorise('core.edit', 'com_content.article.' . $recordId)) { return true; } // Check edit own on the record asset (explicit or inherited) if ($user->authorise('core.edit.own', 'com_content.article.' . $recordId)) { // Existing record already has an owner, get it $record = $this->getModel()->getItem($recordId); if (empty($record)) { return false; } // Grant if current user is owner of the record return $user->id == $record->created_by; } return false; } /** * Method to run batch operations. * * @param object $model The model. * * @return boolean True if successful, false otherwise and internal error is set. * * @since 1.6 */ public function batch($model = null) { $this->checkToken(); // Set the model /** @var ContentModelArticle $model */ $model = $this->getModel('Article', '', array()); // Preset the redirect $this->setRedirect(JRoute::_('index.php?option=com_content&view=articles' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } } PK ��!]�ǽ�d d ajax.json.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_menus * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\LanguageHelper; /** * The menu controller for ajax requests * * @since 3.9.0 */ class MenusControllerAjax extends JControllerLegacy { /** * Method to fetch associations of a menu item * * The method assumes that the following http parameters are passed in an Ajax Get request: * token: the form token * assocId: the id of the menu item whose associations are to be returned * excludeLang: the association for this language is to be excluded * * @return null * * @since 3.9.0 */ public function fetchAssociations() { if (!JSession::checkToken('get')) { echo new JResponseJson(null, JText::_('JINVALID_TOKEN'), true); } else { $input = JFactory::getApplication()->input; $extension = $input->get('extension'); $assocId = $input->getInt('assocId', 0); if ($assocId == 0) { echo new JResponseJson(null, JText::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID', 'assocId'), true); return; } $excludeLang = $input->get('excludeLang', '', 'STRING'); $associations = JLanguageAssociations::getAssociations('com_menus', '#__menu', 'com_menus.item', (int) $assocId, 'id', '', ''); unset($associations[$excludeLang]); // Add the title to each of the associated records JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_menus/tables'); $menuTable = JTable::getInstance('Menu', 'JTable', array()); foreach ($associations as $lang => $association) { $menuTable->load($association->id); $associations[$lang]->title = $menuTable->title; } $countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1))); if (count($associations) == 0) { $message = JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_NONE'); } elseif ($countContentLanguages > count($associations) + 2) { $tags = implode(', ', array_keys($associations)); $message = JText::sprintf('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_SOME', $tags); } else { $message = JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_ALL'); } echo new JResponseJson($associations, $message); } } } PK ��!]���J� � featured.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_content * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::register('ContentControllerArticles', __DIR__ . '/articles.php'); /** * Featured content controller class. * * @since 1.6 */ class ContentControllerFeatured extends ContentControllerArticles { /** * Removes an item. * * @return void * * @since 1.6 */ public function delete() { // Check for request forgeries $this->checkToken(); $user = JFactory::getUser(); $ids = (array) $this->input->get('cid', array(), 'int'); // Access checks. foreach ($ids as $i => $id) { // Remove zero value resulting from input filter if ($id === 0) { unset($ids[$i]); continue; } if (!$user->authorise('core.delete', 'com_content.article.' . (int) $id)) { // Prune items that you can't delete. unset($ids[$i]); JError::raiseNotice(403, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED')); } } if (empty($ids)) { JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); } else { // Get the model. /** @var ContentModelFeature $model */ $model = $this->getModel(); // Remove the items. if (!$model->featured($ids, 0)) { JError::raiseWarning(500, $model->getError()); } } $this->setRedirect('index.php?option=com_content&view=featured'); } /** * Method to publish a list of articles. * * @return void * * @since 1.0 */ public function publish() { parent::publish(); $this->setRedirect('index.php?option=com_content&view=featured'); } /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 1.6 */ public function getModel($name = 'Feature', $prefix = 'ContentModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK ��!]�f��3 3 articles.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_content * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Articles list controller class. * * @since 1.6 */ class ContentControllerArticles extends JControllerAdmin { /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @see JControllerLegacy * @since 1.6 */ public function __construct($config = array()) { parent::__construct($config); // Articles default form can come from the articles or featured view. // Adjust the redirect view on the value of 'view' in the request. if ($this->input->get('view') == 'featured') { $this->view_list = 'featured'; } $this->registerTask('unfeatured', 'featured'); } /** * Method to toggle the featured setting of a list of articles. * * @return void * * @since 1.6 */ public function featured() { // Check for request forgeries $this->checkToken(); $user = JFactory::getUser(); $ids = (array) $this->input->get('cid', array(), 'int'); $values = array('featured' => 1, 'unfeatured' => 0); $task = $this->getTask(); $value = ArrayHelper::getValue($values, $task, 0, 'int'); // Access checks. foreach ($ids as $i => $id) { // Remove zero value resulting from input filter if ($id === 0) { unset($ids[$i]); continue; } if (!$user->authorise('core.edit.state', 'com_content.article.' . (int) $id)) { // Prune items that you can't change. unset($ids[$i]); JError::raiseNotice(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); } } if (empty($ids)) { $message = null; JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); } else { // Get the model. /** @var ContentModelArticle $model */ $model = $this->getModel(); // Publish the items. if (!$model->featured($ids, $value)) { JError::raiseWarning(500, $model->getError()); } if ($value == 1) { $message = JText::plural('COM_CONTENT_N_ITEMS_FEATURED', count($ids)); } else { $message = JText::plural('COM_CONTENT_N_ITEMS_UNFEATURED', count($ids)); } } $view = $this->input->get('view', ''); if ($view == 'featured') { $this->setRedirect(JRoute::_('index.php?option=com_content&view=featured', false), $message); } else { $this->setRedirect(JRoute::_('index.php?option=com_content&view=articles', false), $message); } } /** * Proxy for getModel. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config The array of possible config values. Optional. * * @return JModelLegacy * * @since 1.6 */ public function getModel($name = 'Article', $prefix = 'ContentModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK S|!](dJ�� � filter.phpnu &1i� <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 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 class FilterController extends acymailingController{ var $pkey = 'filid'; var $table = 'filter'; function listing(){ return $this->add(); } function countresults(){ $num = acymailing_getVar('int', 'num'); $filters = acymailing_getVar('none', 'filter'); foreach($filters['type'] as $block => $oneType){ if(!empty($oneType[$num])){ $currentType = $oneType[$num]; break; } } if(empty($currentType)) die('No filter type found for the num '.intval($num)); if(empty($filters[$num][$currentType])) die('No filter parameters found for the num '.intval($num)); $filterClass = acymailing_get('class.filter'); // Keep it, it loads the acyQuery class $query = new acyQuery(); $currentFilterData = $filters[$num][$currentType]; acymailing_importPlugin('acymailing'); $messages = acymailing_trigger('onAcyProcessFilterCount_'.$currentType, array(&$query,$currentFilterData,$num)); echo implode(' | ',$messages); exit; } function displayCondFilter(){ acymailing_importPlugin('acymailing'); $fct = acymailing_getVar('none', 'fct'); $message = acymailing_trigger('onAcyTriggerFct_'.$fct); echo implode(' | ',$message); exit; } function process(){ if(!$this->isAllowed('lists','filter')) return; acymailing_checkToken(); $filid = acymailing_getVar('int', 'filid'); if(!empty($filid)){ $this->store(); } $filterClass = acymailing_get('class.filter'); $filterClass->subid = acymailing_getVar('string', 'subid'); $filterClass->execute(acymailing_getVar('none', 'filter'),acymailing_getVar('none', 'action'), 100000); if(!empty($filterClass->report)){ if(acymailing_isNoTemplate()){ acymailing_display($filterClass->report,'info'); return; }else{ foreach($filterClass->report as $oneReport){ acymailing_enqueueMessage($oneReport); } } } return $this->edit(); } function filterDisplayUsers(){ if(!$this->isAllowed('lists','filter')) return; acymailing_checkToken(); return $this->edit(); } function store(){ if(!$this->isAllowed('lists','filter')) return; acymailing_checkToken(); $class = acymailing_get('class.filter'); $status = $class->saveForm(); if($status){ acymailing_enqueueMessage(acymailing_translation( 'JOOMEXT_SUCC_SAVED' ), 'message'); }else{ acymailing_enqueueMessage(acymailing_translation( 'ERROR_SAVING' ), 'error'); if(!empty($class->errors)){ foreach($class->errors as $oneError){ acymailing_enqueueMessage($oneError, 'error'); } } } } } PK S|!],V��o o filters.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Filters controller class for Finder. * * @since 2.5 */ class FinderControllerFilters extends JControllerAdmin { /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 2.5 */ public function getModel($name = 'Filter', $prefix = 'FinderModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK S|!]�ʼn�g g maps.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Maps controller class for Finder. * * @since 2.5 */ class FinderControllerMaps extends JControllerAdmin { /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 1.6 */ public function getModel($name = 'Maps', $prefix = 'FinderModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK S|!]�nͿ) �) indexer.json.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Register dependent classes. JLoader::register('FinderIndexer', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer/indexer.php'); /** * Indexer controller class for Finder. * * @since 2.5 */ class FinderControllerIndexer extends JControllerLegacy { /** * Method to start the indexer. * * @return void * * @since 2.5 */ public function start() { $params = JComponentHelper::getParams('com_finder'); if ($params->get('enable_logging', '0')) { $options['format'] = '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}'; $options['text_file'] = 'indexer.php'; JLog::addLogger($options); } // Log the start try { JLog::add('Starting the indexer', JLog::INFO); } catch (RuntimeException $exception) { // Informational log only } // We don't want this form to be cached. $app = JFactory::getApplication(); $app->setHeader('Expires', 'Mon, 1 Jan 2001 00:00:00 GMT', true); $app->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT', true); $app->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false); $app->setHeader('Pragma', 'no-cache'); // Check for a valid token. If invalid, send a 403 with the error message. JSession::checkToken('request') or static::sendResponse(new Exception(JText::_('JINVALID_TOKEN_NOTICE'), 403)); // Put in a buffer to silence noise. ob_start(); // Reset the indexer state. FinderIndexer::resetState(); // Import the finder plugins. JPluginHelper::importPlugin('finder'); // Add the indexer language to JS JText::script('COM_FINDER_AN_ERROR_HAS_OCCURRED'); JText::script('COM_FINDER_NO_ERROR_RETURNED'); // Start the indexer. try { // Trigger the onStartIndex event. JEventDispatcher::getInstance()->trigger('onStartIndex'); // Get the indexer state. $state = FinderIndexer::getState(); $state->start = 1; // Send the response. static::sendResponse($state); } // Catch an exception and return the response. catch (Exception $e) { static::sendResponse($e); } } /** * Method to run the next batch of content through the indexer. * * @return void * * @since 2.5 */ public function batch() { $params = JComponentHelper::getParams('com_finder'); if ($params->get('enable_logging', '0')) { $options['format'] = '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}'; $options['text_file'] = 'indexer.php'; JLog::addLogger($options); } // Log the start try { JLog::add('Starting the indexer batch process', JLog::INFO); } catch (RuntimeException $exception) { // Informational log only } // We don't want this form to be cached. $app = JFactory::getApplication(); $app->setHeader('Expires', 'Mon, 1 Jan 2001 00:00:00 GMT', true); $app->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT', true); $app->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false); $app->setHeader('Pragma', 'no-cache'); // Check for a valid token. If invalid, send a 403 with the error message. JSession::checkToken('request') or static::sendResponse(new Exception(JText::_('JINVALID_TOKEN_NOTICE'), 403)); // Put in a buffer to silence noise. ob_start(); // Remove the script time limit. @set_time_limit(0); // Get the indexer state. $state = FinderIndexer::getState(); // Reset the batch offset. $state->batchOffset = 0; // Update the indexer state. FinderIndexer::setState($state); // Import the finder plugins. JPluginHelper::importPlugin('finder'); /* * We are going to swap out the raw document object with an HTML document * in order to work around some plugins that don't do proper environment * checks before trying to use HTML document functions. */ $raw = clone JFactory::getDocument(); $lang = JFactory::getLanguage(); // Get the document properties. $attributes = array ( 'charset' => 'utf-8', 'lineend' => 'unix', 'tab' => ' ', 'language' => $lang->getTag(), 'direction' => $lang->isRtl() ? 'rtl' : 'ltr' ); // Get the HTML document. $html = JDocument::getInstance('html', $attributes); // Todo: Why is this document fetched and immediately overwritten? $doc = JFactory::getDocument(); // Swap the documents. $doc = $html; // Get the admin application. $admin = clone JFactory::getApplication(); // Get the site app. $site = JApplicationCms::getInstance('site'); // Swap the app. $app = JFactory::getApplication(); // Todo: Why is the app fetched and immediately overwritten? $app = $site; // Start the indexer. try { // Trigger the onBeforeIndex event. JEventDispatcher::getInstance()->trigger('onBeforeIndex'); // Trigger the onBuildIndex event. JEventDispatcher::getInstance()->trigger('onBuildIndex'); // Get the indexer state. $state = FinderIndexer::getState(); $state->start = 0; $state->complete = 0; // Swap the documents back. $doc = $raw; // Swap the applications back. $app = $admin; // Log batch completion and memory high-water mark. try { JLog::add('Batch completed, peak memory usage: ' . number_format(memory_get_peak_usage(true)) . ' bytes', JLog::INFO); } catch (RuntimeException $exception) { // Informational log only } // Send the response. static::sendResponse($state); } // Catch an exception and return the response. catch (Exception $e) { // Swap the documents back. $doc = $raw; // Send the response. static::sendResponse($e); } } /** * Method to optimize the index and perform any necessary cleanup. * * @return void * * @since 2.5 */ public function optimize() { // We don't want this form to be cached. $app = JFactory::getApplication(); $app->setHeader('Expires', 'Mon, 1 Jan 2001 00:00:00 GMT', true); $app->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT', true); $app->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false); $app->setHeader('Pragma', 'no-cache'); // Check for a valid token. If invalid, send a 403 with the error message. JSession::checkToken('request') or static::sendResponse(new Exception(JText::_('JINVALID_TOKEN_NOTICE'), 403)); // Put in a buffer to silence noise. ob_start(); // Import the finder plugins. JPluginHelper::importPlugin('finder'); try { // Optimize the index FinderIndexer::getInstance()->optimize(); // Get the indexer state. $state = FinderIndexer::getState(); $state->start = 0; $state->complete = 1; // Send the response. static::sendResponse($state); } // Catch an exception and return the response. catch (Exception $e) { static::sendResponse($e); } } /** * Method to handle a send a JSON response. The body parameter * can be an Exception object for when an error has occurred or * a JObject for a good response. * * @param mixed $data JObject on success, Exception on error. [optional] * * @return void * * @since 2.5 */ public static function sendResponse($data = null) { // This method always sends a JSON response $app = JFactory::getApplication(); $app->mimeType = 'application/json'; $params = JComponentHelper::getParams('com_finder'); if ($params->get('enable_logging', '0')) { $options['format'] = '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}'; $options['text_file'] = 'indexer.php'; JLog::addLogger($options); } // Send the assigned error code if we are catching an exception. if ($data instanceof Exception) { try { JLog::add($data->getMessage(), JLog::ERROR); } catch (RuntimeException $exception) { // Informational log only } $app->setHeader('status', $data->getCode()); } // Create the response object. $response = new FinderIndexerResponse($data); // Add the buffer. $response->buffer = JDEBUG ? ob_get_contents() : ob_end_clean(); // Send the JSON response. $app->setHeader('Content-Type', $app->mimeType . '; charset=' . $app->charSet); $app->sendHeaders(); echo json_encode($response); // Close the application. $app->close(); } } /** * Finder Indexer JSON Response Class * * @since 2.5 */ class FinderIndexerResponse { /** * Class Constructor * * @param mixed $state The processing state for the indexer * * @since 2.5 */ public function __construct($state) { $params = JComponentHelper::getParams('com_finder'); if ($params->get('enable_logging', '0')) { $options['format'] = '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}'; $options['text_file'] = 'indexer.php'; JLog::addLogger($options); } // The old token is invalid so send a new one. $this->token = JFactory::getSession()->getFormToken(); // Check if we are dealing with an error. if ($state instanceof Exception) { // Log the error try { JLog::add($state->getMessage(), JLog::ERROR); } catch (RuntimeException $exception) { // Informational log only } // Prepare the error response. $this->error = true; $this->header = JText::_('COM_FINDER_INDEXER_HEADER_ERROR'); $this->message = $state->getMessage(); } else { // Prepare the response data. $this->batchSize = (int) $state->batchSize; $this->batchOffset = (int) $state->batchOffset; $this->totalItems = (int) $state->totalItems; $this->startTime = $state->startTime; $this->endTime = JFactory::getDate()->toSql(); $this->start = !empty($state->start) ? (int) $state->start : 0; $this->complete = !empty($state->complete) ? (int) $state->complete : 0; // Set the appropriate messages. if ($this->totalItems <= 0 && $this->complete) { $this->header = JText::_('COM_FINDER_INDEXER_HEADER_COMPLETE'); $this->message = JText::_('COM_FINDER_INDEXER_MESSAGE_COMPLETE'); } elseif ($this->totalItems <= 0) { $this->header = JText::_('COM_FINDER_INDEXER_HEADER_OPTIMIZE'); $this->message = JText::_('COM_FINDER_INDEXER_MESSAGE_OPTIMIZE'); } else { $this->header = JText::_('COM_FINDER_INDEXER_HEADER_RUNNING'); $this->message = JText::_('COM_FINDER_INDEXER_MESSAGE_RUNNING'); } } } } // Register the error handler. JError::setErrorHandling(E_ALL, 'callback', array('FinderControllerIndexer', 'sendResponse')); PK S|!]�E��: : index.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Index controller class for Finder. * * @since 2.5 */ class FinderControllerIndex extends JControllerAdmin { /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 2.5 */ public function getModel($name = 'Index', $prefix = 'FinderModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Method to purge all indexed links from the database. * * @return boolean True on success. * * @since 2.5 */ public function purge() { $this->checkToken(); // Remove the script time limit. @set_time_limit(0); $model = $this->getModel('Index', 'FinderModel'); // Attempt to purge the index. $return = $model->purge(); if (!$return) { $message = JText::_('COM_FINDER_INDEX_PURGE_FAILED', $model->getError()); $this->setRedirect('index.php?option=com_finder&view=index', $message); return false; } else { $message = JText::_('COM_FINDER_INDEX_PURGE_SUCCESS'); $this->setRedirect('index.php?option=com_finder&view=index', $message); return true; } } } PK W|!]�tx�D D tags.phpnu &1i� <?php /** * @package Joomla.Site * @subpackage com_tags * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * The Tags List Controller * * @since 3.1 */ class TagsControllerTags extends JControllerLegacy { /** * Method to search tags with AJAX * * @return void */ public function searchAjax() { // Required objects $app = JFactory::getApplication(); $user = JFactory::getUser(); // Receive request data $filters = array( 'like' => trim($app->input->get('like', null, 'string')), 'title' => trim($app->input->get('title', null, 'string')), 'flanguage' => $app->input->get('flanguage', null, 'word'), 'published' => $app->input->get('published', 1, 'int'), 'parent_id' => $app->input->get('parent_id', 0, 'int'), 'access' => $user->getAuthorisedViewLevels(), ); if ((!$user->authorise('core.edit.state', 'com_tags')) && (!$user->authorise('core.edit', 'com_tags'))) { // Filter on published for those who do not have edit or edit.state rights. $filters['published'] = 1; } $results = JHelperTags::searchTags($filters); if ($results) { // Output a JSON object echo json_encode($results); } $app->close(); } } PK W|!]�X��� � tag.phpnu &1i� <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 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 class TagController extends acymailingController { var $aclCat = 'tags'; function __construct($config = array()){ parent::__construct($config); acymailing_setNoTemplate(); $this->registerDefaultTask('tag'); } function tag(){ if(!$this->isAllowed($this->aclCat,'view')) return; acymailing_setVar( 'layout', 'tag' ); return parent::display(); } function plgtrigger(){ if(!require_once(ACYMAILING_BACK.DS.'controllers'.DS.'cpanel.php')) return; $cPanelController = acymailing_get('controller.cpanel'); $cPanelController->plgtrigger(); return; } function customtemplate(){ acymailing_setVar('layout', 'form'); return parent::display(); } function store(){ acymailing_checkToken(); $plugin = acymailing_getVar('string', 'plugin'); $plugin = preg_replace('#[^a-zA-Z0-9]#Uis', '', $plugin); $body = acymailing_getVar('string', 'templatebody', '', '', ACY_ALLOWRAW); if(empty($body)){ acymailing_enqueueMessage(acymailing_translation('FILL_ALL'),'error'); return; } $pluginsFolder = ACYMAILING_MEDIA.'plugins'; if(!file_exists($pluginsFolder)) acymailing_createDir($pluginsFolder); try{ $status = acymailing_writeFile($pluginsFolder.DS.$plugin.'.php',$body); }catch(Exception $e){ $status = false; } if($status) acymailing_enqueueMessage(acymailing_translation('JOOMEXT_SUCC_SAVED'),'success'); else acymailing_enqueueMessage(acymailing_translation_sprintf('FAIL_SAVE', $pluginsFolder.DS.$plugin.'.php'),'error'); } } PK Y|!]!i=� � contact.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_contact * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Controller for a single contact * * @since 1.6 */ class ContactControllerContact extends JControllerForm { /** * Method override to check if you can add a new record. * * @param array $data An array of input data. * * @return boolean * * @since 1.6 */ protected function allowAdd($data = array()) { $categoryId = ArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int'); $allow = null; if ($categoryId) { // If the category has been passed in the URL check it. $allow = JFactory::getUser()->authorise('core.create', $this->option . '.category.' . $categoryId); } if ($allow === null) { // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } return $allow; } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 1.6 */ protected function allowEdit($data = array(), $key = 'id') { $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Since there is no asset tracking, fallback to the component permissions. if (!$recordId) { return parent::allowEdit($data, $key); } // Get the item. $item = $this->getModel()->getItem($recordId); // Since there is no item, return false. if (empty($item)) { return false; } $user = JFactory::getUser(); // Check if can edit own core.edit.own. $canEditOwn = $user->authorise('core.edit.own', $this->option . '.category.' . (int) $item->catid) && $item->created_by == $user->id; // Check the category core.edit permissions. return $canEditOwn || $user->authorise('core.edit', $this->option . '.category.' . (int) $item->catid); } /** * Method to run batch operations. * * @param object $model The model. * * @return boolean True if successful, false otherwise and internal error is set. * * @since 2.5 */ public function batch($model = null) { $this->checkToken(); // Set the model /** @var ContactModelContact $model */ $model = $this->getModel('Contact', '', array()); // Preset the redirect $this->setRedirect(JRoute::_('index.php?option=com_contact&view=contacts' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } } PK Y|!]��T� � contacts.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_contact * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Contacts list controller class. * * @since 1.6 */ class ContactControllerContacts extends JControllerAdmin { /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @see JControllerLegacy * @since 1.6 */ public function __construct($config = array()) { parent::__construct($config); $this->registerTask('unfeatured', 'featured'); } /** * Method to toggle the featured setting of a list of contacts. * * @return void * * @since 1.6 */ public function featured() { // Check for request forgeries $this->checkToken(); $ids = (array) $this->input->get('cid', array(), 'int'); $values = array('featured' => 1, 'unfeatured' => 0); $task = $this->getTask(); $value = ArrayHelper::getValue($values, $task, 0, 'int'); // Get the model. /** @var ContactModelContact $model */ $model = $this->getModel(); // Access checks. foreach ($ids as $i => $id) { // Remove zero value resulting from input filter if ($id === 0) { unset($ids[$i]); continue; } $item = $model->getItem($id); if (!JFactory::getUser()->authorise('core.edit.state', 'com_contact.category.' . (int) $item->catid)) { // Prune items that you can't change. unset($ids[$i]); JError::raiseNotice(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); } } if (empty($ids)) { $message = null; JError::raiseWarning(500, JText::_('COM_CONTACT_NO_ITEM_SELECTED')); } else { // Publish the items. if (!$model->featured($ids, $value)) { JError::raiseWarning(500, $model->getError()); } if ($value == 1) { $message = JText::plural('COM_CONTACT_N_ITEMS_FEATURED', count($ids)); } else { $message = JText::plural('COM_CONTACT_N_ITEMS_UNFEATURED', count($ids)); } } $this->setRedirect('index.php?option=com_contact&view=contacts', $message); } /** * Proxy for getModel. * * @param string $name The name of the model. * @param string $prefix The prefix for the PHP class name. * @param array $config Array of configuration parameters. * * @return JModelLegacy * * @since 1.6 */ public function getModel($name = 'Contact', $prefix = 'ContactModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK Z|!]>^ٟ� � update.phpnu &1i� <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 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 class UpdateController extends acymailingController{ function __construct($config = array()){ parent::__construct($config); $this->registerDefaultTask('update'); } function listing(){ return $this->update(); } function install(){ acymailing_increasePerf(); $newConfig = new stdClass(); $newConfig->installcomplete = 1; $config = acymailing_config(); $updateHelper = acymailing_get('helper.update'); if(!$config->save($newConfig)){ $updateHelper->installTables(); return; } $updateHelper->installLanguages(); $updateHelper->initList(); $updateHelper->installTemplates(); $updateHelper->installNotifications(); $updateHelper->installFields(); $updateHelper->installMenu(); $updateHelper->installExtensions(); $updateHelper->installBounceRules(); $updateHelper->fixDoubleExtension(); $updateHelper->addUpdateSite(); $updateHelper->fixMenu(); if(ACYMAILING_J30) acymailing_moveFile(ACYMAILING_BACK.'acymailing_j3.xml', ACYMAILING_BACK.'acymailing.xml'); $acyToolbar = acymailing_get('helper.toolbar'); $acyToolbar->setTitle('AcyMailing', 'dashboard'); $acyToolbar->display(); $this->_iframe(ACYMAILING_UPDATEURL.'install&fromversion='.acymailing_getVar('cmd', 'fromversion').'&fromlevel='.acymailing_getVar('cmd', 'fromlevel')); } function update(){ $config = acymailing_config(); if(!acymailing_isAllowed($config->get('acl_config_manage', 'all'))){ acymailing_display(acymailing_translation('ACY_NOTALLOWED'), 'error'); return false; } $acyToolbar = acymailing_get('helper.toolbar'); $acyToolbar->setTitle(acymailing_translation('UPDATE_ABOUT'), 'update'); $acyToolbar->link(acymailing_completeLink('dashboard'), acymailing_translation('ACY_CLOSE'), 'cancel'); $acyToolbar->display(); return $this->_iframe(ACYMAILING_UPDATEURL.'update'); } function _iframe($url){ $config = acymailing_config(); $url .= '&version='.$config->get('version').'&level='.$config->get('level').'&component=acymailing'; ?> <div id="acymailing_div"> <iframe allowtransparency="true" scrolling="auto" height="700px" frameborder="0" width="100%" name="acymailing_frame" id="acymailing_frame" src="<?php echo $url; ?>"> </iframe> </div> <?php } function checkForNewVersion(){ $config = acymailing_config(); ob_start(); $url = ACYMAILING_UPDATEURL.'loadUserInformation&component=acymailing&level='.strtolower($config->get('level', 'starter')); $userInformation = acymailing_fileGetContent($url, 30); $warnings = ob_get_clean(); $result = (!empty($warnings) && acymailing_isDebug()) ? $warnings : ''; if(empty($userInformation) || $userInformation === false){ echo json_encode(array('content' => '<br/><span style="color:#C10000;">Could not load your information from our server</span><br/>'.$result)); exit; } $decodedInformation = json_decode($userInformation, true); $newConfig = new stdClass(); $listPluginNeedToUpDate = array(); if(!ACYMAILING_J16) { $query = "SELECT element, id, folder FROM `#__plugins` WHERE `folder` = 'acymailing' OR `element` LIKE '%acymailing%' OR `name` LIKE '%acymailing%'"; }else{ $query = "SELECT element, folder, manifest_cache AS mc, extension_id AS id FROM `#__extensions` WHERE `state` <> -1 AND `type`= 'plugin' AND (`folder` = 'acymailing' OR `element` LIKE '%acymailing%' OR `name` LIKE '%acymailing%')"; } $plugins = acymailing_loadObjectList($query); if(!empty($plugins)){ foreach($plugins as $plugin){ if(ACYMAILING_J16) { $manifest = json_decode($plugin->mc); if(empty($manifest->version)) $manifest = simplexml_load_file(JURI::root().'/plugins/'.$plugin->folder.'/'.$plugin->element.'/'.$plugin->element.'.xml'); }else{ $manifest = simplexml_load_file(JURI::root().'/plugins/'.$plugin->folder.'/'.$plugin->element.'.xml'); } $actualVersion = (string)$manifest->version; $pluginOnServer = @simplexml_load_file(ACYMAILING_PLUGINURL.$plugin->element.'.xml'); if(empty($pluginOnServer) || $actualVersion >= (string)$pluginOnServer->update[0]->version) continue; $listPluginNeedToUpDate[] = $plugin->id; } } $newConfig->pluginNeedUpdate = empty($listPluginNeedToUpDate) ? '' : json_encode($listPluginNeedToUpDate); $newConfig->latestversion = $decodedInformation['latestversion']; $newConfig->expirationdate = $decodedInformation['expiration']; $newConfig->lastlicensecheck = time(); $config->save($newConfig); $menuHelper = acymailing_get('helper.acymenu'); $myAcyArea = $menuHelper->myacymailingarea(); echo json_encode(array('content' => $myAcyArea)); exit; } function acysms(){ $config = acymailing_config(); if(!acymailing_isAllowed($config->get('acl_configuration_manage', 'all'))){ acymailing_display(acymailing_translation('ACY_NOTALLOWED'), 'error'); return false; } if(file_exists(ACYMAILING_ROOT.'components'.DS.'com_acysms')) { if(!JComponentHelper::isEnabled('com_acysms')){ acymailing_query('UPDATE #__extensions SET `enabled` = 1 WHERE `element` = "com_acysms" AND `type` = "component"'); } acymailing_redirect('index.php?option=com_acysms'); }else{ acymailing_setVar('layout', 'acysms'); return parent::display(); } } } PK Z|!]�y/� � searches.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_search * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Methods supporting a list of search terms. * * @since 1.6 */ class SearchControllerSearches extends JControllerLegacy { /** * Method to reset the search log table. * * @return boolean */ public function reset() { // Check for request forgeries. $this->checkToken(); $model = $this->getModel('Searches'); if (!$model->reset()) { JError::raiseWarning(500, $model->getError()); } $this->setRedirect('index.php?option=com_search&view=searches'); } /** * Method to toggle the view of results. * * @return boolean */ public function toggleResults() { // Check for request forgeries. $this->checkToken(); if ($this->getModel('Searches')->getState('show_results', 1, 'int') === 0) { $this->setRedirect('index.php?option=com_search&view=searches&show_results=1'); } else { $this->setRedirect('index.php?option=com_search&view=searches&show_results=0'); } } } PK ]|!]O��� client.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_banners * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Client controller class. * * @since 1.6 */ class BannersControllerClient extends JControllerForm { /** * The prefix to use with controller messages. * * @var string * @since 1.6 */ protected $text_prefix = 'COM_BANNERS_CLIENT'; } PK ]|!]c� � banner.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_banners * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Banner controller class. * * @since 1.6 */ class BannersControllerBanner extends JControllerForm { /** * The prefix to use with controller messages. * * @var string * @since 1.6 */ protected $text_prefix = 'COM_BANNERS_BANNER'; /** * Method override to check if you can add a new record. * * @param array $data An array of input data. * * @return boolean * * @since 1.6 */ protected function allowAdd($data = array()) { $filter = $this->input->getInt('filter_category_id'); $categoryId = ArrayHelper::getValue($data, 'catid', $filter, 'int'); $allow = null; if ($categoryId) { // If the category has been passed in the URL check it. $allow = JFactory::getUser()->authorise('core.create', $this->option . '.category.' . $categoryId); } if ($allow !== null) { return $allow; } // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 1.6 */ protected function allowEdit($data = array(), $key = 'id') { $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $categoryId = 0; if ($recordId) { $categoryId = (int) $this->getModel()->getItem($recordId)->catid; } if ($categoryId) { // The category has been set. Check the category permissions. return JFactory::getUser()->authorise('core.edit', $this->option . '.category.' . $categoryId); } // Since there is no asset tracking, revert to the component permissions. return parent::allowEdit($data, $key); } /** * Method to run batch operations. * * @param string $model The model * * @return boolean True on success. * * @since 2.5 */ public function batch($model = null) { $this->checkToken(); // Set the model $model = $this->getModel('Banner', '', array()); // Preset the redirect $this->setRedirect(JRoute::_('index.php?option=com_banners&view=banners' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } } PK ]|!]2��Ʒ � banners.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_banners * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Banners list controller class. * * @since 1.6 */ class BannersControllerBanners extends JControllerAdmin { /** * The prefix to use with controller messages. * * @var string * @since 1.6 */ protected $text_prefix = 'COM_BANNERS_BANNERS'; /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @see JControllerLegacy * @since 1.6 */ public function __construct($config = array()) { parent::__construct($config); $this->registerTask('sticky_unpublish', 'sticky_publish'); } /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 1.6 */ public function getModel($name = 'Banner', $prefix = 'BannersModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Stick items * * @return void * * @since 1.6 */ public function sticky_publish() { // Check for request forgeries. $this->checkToken(); $ids = (array) $this->input->get('cid', array(), 'int'); $values = array('sticky_publish' => 1, 'sticky_unpublish' => 0); $task = $this->getTask(); $value = ArrayHelper::getValue($values, $task, 0, 'int'); // Remove zero values resulting from input filter $ids = array_filter($ids); if (empty($ids)) { JError::raiseWarning(500, JText::_('COM_BANNERS_NO_BANNERS_SELECTED')); } else { // Get the model. /** @var BannersModelBanner $model */ $model = $this->getModel(); // Change the state of the records. if (!$model->stick($ids, $value)) { JError::raiseWarning(500, $model->getError()); } else { if ($value == 1) { $ntext = 'COM_BANNERS_N_BANNERS_STUCK'; } else { $ntext = 'COM_BANNERS_N_BANNERS_UNSTUCK'; } $this->setMessage(JText::plural($ntext, count($ids))); } } $this->setRedirect('index.php?option=com_banners&view=banners'); } } PK ]|!]��F� � tracks.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_banners * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Tracks list controller class. * * @since 1.6 */ class BannersControllerTracks extends JControllerLegacy { /** * The prefix to use with controller messages. * * @var string * @since 1.6 */ protected $context = 'com_banners.tracks'; /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 1.6 */ public function getModel($name = 'Tracks', $prefix = 'BannersModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Method to remove a record. * * @return void * * @since 1.6 */ public function delete() { // Check for request forgeries. $this->checkToken(); // Get the model. /** @var BannersModelTracks $model */ $model = $this->getModel(); // Load the filter state. $app = JFactory::getApplication(); $model->setState('filter.type', $app->getUserState($this->context . '.filter.type')); $model->setState('filter.begin', $app->getUserState($this->context . '.filter.begin')); $model->setState('filter.end', $app->getUserState($this->context . '.filter.end')); $model->setState('filter.category_id', $app->getUserState($this->context . '.filter.category_id')); $model->setState('filter.client_id', $app->getUserState($this->context . '.filter.client_id')); $model->setState('list.limit', 0); $model->setState('list.start', 0); $count = $model->getTotal(); // Remove the items. if (!$model->delete()) { JError::raiseWarning(500, $model->getError()); } elseif ($count > 0) { $this->setMessage(JText::plural('COM_BANNERS_TRACKS_N_ITEMS_DELETED', $count)); } else { $this->setMessage(JText::_('COM_BANNERS_TRACKS_NO_ITEMS_DELETED')); } $this->setRedirect('index.php?option=com_banners&view=tracks'); } } PK ]|!]�(�U� � clients.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_banners * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Clients list controller class. * * @since 1.6 */ class BannersControllerClients extends JControllerAdmin { /** * The prefix to use with controller messages. * * @var string * @since 1.6 */ protected $text_prefix = 'COM_BANNERS_CLIENTS'; /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy The model. * * @since 1.6 */ public function getModel($name = 'Client', $prefix = 'BannersModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK ]|!]�@�v v tracks.raw.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_banners * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Tracks list controller class. * * @since 1.6 */ class BannersControllerTracks extends JControllerLegacy { /** * The context for persistent state. * * @var string * @since 1.6 */ protected $context = 'com_banners.tracks'; /** * Method to get a model object, loading it if required. * * @param string $name The name of the model. * @param string $prefix The prefix for the model class name. * @param array $config Configuration array for model. Optional. * * @return JModelLegacy * * @since 1.6 */ public function getModel($name = 'Tracks', $prefix = 'BannersModel', $config = array()) { return parent::getModel($name, $prefix, array('ignore_request' => true)); } /** * Display method for the raw track data. * * @param boolean $cachable If true, the view output will be cached * @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * * @return BannersControllerTracks This object to support chaining. * * @since 1.5 * @todo This should be done as a view, not here! */ public function display($cachable = false, $urlparams = array()) { // Check for request forgeries. $this->checkToken('GET'); // Get the document object. $vName = 'tracks'; // Get and render the view. if ($view = $this->getView($vName, 'raw')) { // Get the model for the view. /** @var BannersModelTracks $model */ $model = $this->getModel($vName); // Load the filter state. $app = JFactory::getApplication(); $model->setState('filter.type', $app->getUserState($this->context . '.filter.type')); $model->setState('filter.begin', $app->getUserState($this->context . '.filter.begin')); $model->setState('filter.end', $app->getUserState($this->context . '.filter.end')); $model->setState('filter.category_id', $app->getUserState($this->context . '.filter.category_id')); $model->setState('filter.client_id', $app->getUserState($this->context . '.filter.client_id')); $model->setState('list.limit', 0); $model->setState('list.start', 0); $form = $this->input->get('jform', array(), 'array'); $model->setState('basename', $form['basename']); $model->setState('compressed', $form['compressed']); // Create one year cookies. $cookieLifeTime = time() + 365 * 86400; $cookieDomain = $app->get('cookie_domain', ''); $cookiePath = $app->get('cookie_path', '/'); $isHttpsForced = $app->isHttpsForced(); $app->input->cookie->set( JApplicationHelper::getHash($this->context . '.basename'), $form['basename'], $cookieLifeTime, $cookiePath, $cookieDomain, $isHttpsForced, true ); $app->input->cookie->set( JApplicationHelper::getHash($this->context . '.compressed'), $form['compressed'], $cookieLifeTime, $cookiePath, $cookieDomain, $isHttpsForced, true ); // Push the model into the view (as default). $view->setModel($model, true); // Push document object into the view. $view->document = JFactory::getDocument(); $view->display(); } return $this; } } PK `|!]�8�:Y Y message.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_postinstall * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Postinstall message controller. * * @since 3.2 */ class PostinstallControllerMessage extends FOFController { /** * Resets all post-installation messages of the specified extension. * * @return void * * @since 3.2 */ public function reset() { // CSRF prevention. $this->_csrfProtection(); /** @var PostinstallModelMessages $model */ $model = $this->getThisModel(); $eid = (int) $model->getState('eid', '700', 'int'); if (empty($eid)) { $eid = 700; } $model->resetMessages($eid); $this->setRedirect('index.php?option=com_postinstall&eid=' . $eid); } /** * Hides all post-installation messages of the specified extension. * * @return void * * @since 3.8.7 */ public function hideAll() { // CSRF prevention. $this->_csrfProtection(); /** @var PostinstallModelMessages $model */ $model = $this->getThisModel(); $eid = (int) $model->getState('eid', '700', 'int'); if (empty($eid)) { $eid = 700; } $model->hideMessages($eid); $this->setRedirect('index.php?option=com_postinstall&eid=' . $eid); } /** * Executes the action associated with an item. * * @return void * * @since 3.2 */ public function action() { // CSRF prevention. $this->_csrfProtection(); $model = $this->getThisModel(); if (!$model->getId()) { $model->setIDsFromRequest(); } $item = $model->getItem(); switch ($item->type) { case 'link': $this->setRedirect($item->action); return; break; case 'action': jimport('joomla.filesystem.file'); $file = FOFTemplateUtils::parsePath($item->action_file, true); if (JFile::exists($file)) { require_once $file; call_user_func($item->action); } break; case 'message': default: break; } $this->setRedirect('index.php?option=com_postinstall'); } } PK `|!]���Yl l messages.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_messages * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Messages list controller class. * * @since 1.6 */ class MessagesControllerMessages extends JControllerAdmin { /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 1.6 */ public function getModel($name = 'Message', $prefix = 'MessagesModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK `|!]�n|F� � config.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_messages * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Messages Component Message Model * * @since 1.6 */ class MessagesControllerConfig extends JControllerLegacy { /** * Method to save a record. * * @return boolean * * @since 1.6 */ public function save() { // Check for request forgeries. $this->checkToken(); $app = JFactory::getApplication(); $model = $this->getModel('Config', 'MessagesModel'); $data = $this->input->post->get('jform', array(), 'array'); // Validate the posted data. $form = $model->getForm(); if (!$form) { JError::raiseError(500, $model->getError()); return false; } $data = $model->validate($form, $data); // Check for validation errors. if ($data === false) { // Get the validation messages. $errors = $model->getErrors(); // Push up to three validation messages out to the user. for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) { if ($errors[$i] instanceof Exception) { $app->enqueueMessage($errors[$i]->getMessage(), 'warning'); } else { $app->enqueueMessage($errors[$i], 'warning'); } } // Redirect back to the main list. $this->setRedirect(JRoute::_('index.php?option=com_messages&view=messages', false)); return false; } // Attempt to save the data. if (!$model->save($data)) { // Redirect back to the main list. $this->setMessage(JText::sprintf('JERROR_SAVE_FAILED', $model->getError()), 'warning'); $this->setRedirect(JRoute::_('index.php?option=com_messages&view=messages', false)); return false; } // Redirect to the list screen. $this->setMessage(JText::_('COM_MESSAGES_CONFIG_SAVED')); $this->setRedirect(JRoute::_('index.php?option=com_messages&view=messages', false)); return true; } } PK �|!]�I�D� � newsfeed.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_newsfeeds * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Newsfeed controller class. * * @since 1.6 */ class NewsfeedsControllerNewsfeed extends JControllerForm { /** * Method override to check if you can add a new record. * * @param array $data An array of input data. * * @return boolean * * @since 1.6 */ protected function allowAdd($data = array()) { $categoryId = ArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int'); $allow = null; if ($categoryId) { // If the category has been passed in the URL check it. $allow = JFactory::getUser()->authorise('core.create', $this->option . '.category.' . $categoryId); } if ($allow === null) { // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } else { return $allow; } } /** * Method to check if you can edit a record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 1.6 */ protected function allowEdit($data = array(), $key = 'id') { $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Since there is no asset tracking, fallback to the component permissions. if (!$recordId) { return parent::allowEdit($data, $key); } // Get the item. $item = $this->getModel()->getItem($recordId); // Since there is no item, return false. if (empty($item)) { return false; } $user = JFactory::getUser(); // Check if can edit own core.edit.own. $canEditOwn = $user->authorise('core.edit.own', $this->option . '.category.' . (int) $item->catid) && $item->created_by == $user->id; // Check the category core.edit permissions. return $canEditOwn || $user->authorise('core.edit', $this->option . '.category.' . (int) $item->catid); } /** * Method to run batch operations. * * @param object $model The model. * * @return boolean True if successful, false otherwise and internal error is set. * * @since 2.5 */ public function batch($model = null) { $this->checkToken(); // Set the model $model = $this->getModel('Newsfeed', '', array()); // Preset the redirect $this->setRedirect(JRoute::_('index.php?option=com_newsfeeds&view=newsfeeds' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } /** * Function that allows child controller access to model data after the data has been saved. * * @param JModelLegacy $model The data model object. * @param array $validData The validated data. * * @return void * * @since 3.1 */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { } } PK �|!]�g�� � newsfeeds.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_newsfeeds * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Newsfeeds list controller class. * * @since 1.6 */ class NewsfeedsControllerNewsfeeds extends JControllerAdmin { /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 1.6 */ public function getModel($name = 'Newsfeed', $prefix = 'NewsfeedsModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Function that allows child controller access to model data * after the item has been deleted. * * @param JModelLegacy $model The data model object. * @param integer $ids The validated data. * * @return void * * @since 3.1 */ protected function postDeleteHook(JModelLegacy $model, $ids = null) { } } PK �|!]Ϟ�Z Z categories.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.3.3 2014-04-12 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controlleradmin'); /** * Categories list controller class. */ class iCagendaControllerCategories extends JControllerAdmin { /** * Proxy for getModel. * @since 1.0 */ public function getModel($name = 'category', $prefix = 'iCagendaModel') { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } } PK �|!]t~Q� � customfield.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rez�, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rez� (Lyr!C) * @link http://www.joomlic.com * * @version 3.4.0 2014-05-01 * @since 3.4.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controllerform'); /** * Category controller class. */ class iCagendaControllerCustomfield extends JControllerForm { function __construct() { $this->view_list = 'customfields'; parent::__construct(); } } PK �|!]�� @� � events.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.1.10 2013-09-12 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controlleradmin'); /** * Events list controller class. */ class iCagendaControllerEvents extends JControllerAdmin { /** * Proxy for getModel. * @since 1.6 */ public function getModel($name = 'event', $prefix = 'iCagendaModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Method to save the submitted ordering values for records via AJAX. * * @return void * * @since 3.0 */ public function saveOrderAjax() { // Get the input $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); $order = $input->post->get('order', array(), 'array'); // Sanitize the input JArrayHelper::toInteger($pks); JArrayHelper::toInteger($order); // Get the model $model = $this->getModel(); // Save the ordering $return = $model->saveorder($pks, $order); if ($return) { echo "1"; } // Close the application JFactory::getApplication()->close(); } public function __construct($config = array()) { parent::__construct($config); $this->registerTask('unapprove', 'approve'); } /** * Method to approve an event. * * @return void * * @since 3.2 */ public function approve() { // Check for request forgeries. JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); $input = JFactory::getApplication()->input; $ids = $input->post->get('cid', array(), 'array'); if (empty($ids)) { JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); } else { // Get the model. $model = $this->getModel(); // Change the state of the records. if (!$model->approve($ids)) { JError::raiseWarning(500, $model->getError()); } else { $this->setMessage(JText::plural('COM_ICAGENDA_N_EVENTS_APPROVED', count($ids))); } } $this->setRedirect('index.php?option=com_icagenda&view=events'); } } PK �|!]��S� � category.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rez�, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rez� (Lyr!C) * @link http://www.joomlic.com * * @version 3.2.13 2014-01-26 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controllerform'); /** * Category controller class. */ class iCagendaControllerCategory extends JControllerForm { function __construct() { $this->view_list = 'categories'; parent::__construct(); } } PK �|!]���H registration.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.5.9 2015-07-22 * @since 3.3.3 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controllerform'); /** * Registration controller class. */ class iCagendaControllerRegistration extends JControllerForm { function __construct() { $this->view_list = 'registrations'; parent::__construct(); } /** * Return Ajax to load date select options * * @since 3.5.9 */ function dates() { icagendaAjax::getOptionsEventDates('registration'); // Cut the execution short // JFactory::getApplication()->close(); } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 3.3.3 */ protected function allowEdit($data = array(), $key = 'id') { // Initialise variables. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $user = JFactory::getUser(); $userId = $user->get('id'); // Check general edit permission first. if ($user->authorise('core.edit', 'com_icagenda.registration.' . $recordId)) { return true; } // Fallback on edit.own. // First test if the permission is available. if ($user->authorise('core.edit.own', 'com_icagenda.registration.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; if (empty($ownerId) && $recordId) { // Need to do a lookup from the model. $record = $this->getModel()->getItem($recordId); if (empty($record)) { return false; } $ownerId = $record->created_by; } // If the owner matches 'me' then do the test. if ($ownerId == $userId) { return true; } } // Since there is no asset tracking, revert to the component permissions. return parent::allowEdit($data, $key); } } PK �|!]{��%[ [ features.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author doorknob & Cyril Rezé * @link http://www.joomlic.com * * @version 3.4.0 2014-07-02 * @since 3.4.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controlleradmin'); /** * Features list controller class. */ class iCagendaControllerFeatures extends JControllerAdmin { /** * Proxy for getModel. * @since 3.4.0 */ public function getModel($name = 'feature', $prefix = 'iCagendaModel') { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } } PK �|!]�X� mail.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_users * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Users mail controller. * * @since 1.6 */ class UsersControllerMail extends JControllerLegacy { /** * Send the mail * * @return void * * @since 1.6 */ public function send() { // Redirect to admin index if mass mailer disabled in conf if (JFactory::getApplication()->get('massmailoff', 0) == 1) { JFactory::getApplication()->redirect(JRoute::_('index.php', false)); } // Check for request forgeries. $this->checkToken('request'); $model = $this->getModel('Mail'); if ($model->send()) { $type = 'message'; } else { $type = 'error'; } $msg = $model->getError(); $this->setRedirect('index.php?option=com_users&view=mail', $msg, $type); } /** * Cancel the mail * * @return void * * @since 1.6 */ public function cancel() { // Check for request forgeries. $this->checkToken('request'); // Clear data from session. \JFactory::getApplication()->setUserState('com_users.display.mail.data', null); $this->setRedirect('index.php'); } } PK �|!]����` ` customfields.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.4.0 2014-05-01 * @since 3.4.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controlleradmin'); /** * Categories list controller class. */ class iCagendaControllerCustomfields extends JControllerAdmin { /** * Proxy for getModel. * @since 1.0 */ public function getModel($name = 'customfield', $prefix = 'iCagendaModel') { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } } PK �|!]�� �u u registrations.raw.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.5.9 2015-07-23 * @since 3.5.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); /** * Registrations list controller class. * * @since 3.5.0 */ class icagendaControllerRegistrations extends JControllerLegacy { /** * @var string The context for persistent state. * * @since 3.5.0 */ protected $context = 'com_icagenda.registrations'; /** * Proxy for getModel. * * @param string $name The name of the model. * @param string $prefix The prefix for the model class name. * @param array $config Configuration array for model. Optional. * * @return JModel * * @since 3.5.0 */ public function getModel($name = 'Registrations', $prefix = 'iCagendaModel', $config = array()) { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } /** * Display method for the raw track data. * * @param boolean $cachable If true, the view output will be cached * @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * * @return JController This object to support chaining. * * @since 3.5.0 * @todo This should be done as a view, not here! */ public function display($cachable = false, $urlparams = false) { // Get the document object. $document = JFactory::getDocument(); $vName = 'registrations'; $vFormat = 'raw'; // Get and render the view. if ($view = $this->getView($vName, $vFormat)) { // Get the model for the view. $model = $this->getModel($vName); // Load the filter state. $app = JFactory::getApplication(); $published = $app->getUserState($this->context . '.filter.state'); $model->setState('filter.state', $published); $eventId = $app->getUserState($this->context . '.filter.events'); $model->setState('filter.events', $eventId); $date = $app->getUserState($this->context . '.filter.dates'); $model->setState('filter.dates', $date); $model->setState('list.limit', 0); $model->setState('list.start', 0); $input = JFactory::getApplication()->input; $form = $input->get('jform', array(), 'array'); $model->setState('event_title', $form['event_title']); $model->setState('date', $form['date']); $model->setState('tickets', $form['tickets']); $model->setState('name', $form['name']); $model->setState('email', $form['email']); $model->setState('phone', $form['phone']); $model->setState('customfields', $form['customfields']); $model->setState('notes', $form['notes']); $model->setState('status', $form['status']); $model->setState('basename', $form['basename']); $model->setState('separator', $form['separator']); $model->setState('compressed', $form['compressed']); $config = JFactory::getConfig(); $cookie_domain = $config->get('cookie_domain', ''); $cookie_path = $config->get('cookie_path', '/'); // Joomla 3 if (version_compare(JVERSION, '3.0', 'ge')) { setcookie(JApplicationHelper::getHash($this->context . '.event_title'), $form['event_title'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.date'), $form['date'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.tickets'), $form['tickets'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.name'), $form['name'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.email'), $form['email'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.phone'), $form['phone'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.customfields'), $form['customfields'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.notes'), $form['notes'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.status'), $form['status'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.basename'), $form['basename'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.separator'), $form['separator'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplicationHelper::getHash($this->context . '.compressed'), $form['compressed'], time() + 365 * 86400, $cookie_path, $cookie_domain); } // Joomla 2.5 else { setcookie(JApplication::getHash($this->context.'.basename'), $form['basename'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplication::getHash($this->context.'.separator'), $form['separator'], time() + 365 * 86400, $cookie_path, $cookie_domain); setcookie(JApplication::getHash($this->context.'.compressed'), $form['compressed'], time() + 365 * 86400, $cookie_path, $cookie_domain); } // Push the model into the view (as default). $view->setModel($model, true); // Push document object into the view. $view->document = $document; $view->display(); } } } PK �|!]�r��� � themes.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.0 2013-06-03 * @since 2.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controllerform'); jimport('joomla.client.helper'); class iCagendaControllerthemes extends JControllerForm { protected $option = 'com_icagenda'; function __construct() { parent::__construct(); $this->registerTask( 'themeinstall' , 'themeinstall' ); } function themeinstall() { JRequest::checkToken() or die( 'Invalid Token' ); $post = JRequest::get('post'); $theme = array(); if (isset($post['theme_component'])) { $theme['component'] = 1; } if (empty($theme)) { $ftp =& JClientHelper::setCredentialsFromRequest('ftp'); $model = &$this->getModel( 'themes' ); if ($model->install($theme)) { $cache = &JFactory::getCache('mod_menu'); $cache->clean(); $msg = JText::_('COM_ICAGENDA_SUCCESS_THEME_INSTALLED'); } } else { $msg = JText::_('COM_ICAGENDA_ERROR_THEME_APPLICATION_AREA'); } $this->setRedirect( 'index.php?option=com_icagenda&view=themes', $msg ); } function cancel() { $this->setRedirect( 'index.php?option=com_icagenda' ); } } ?> PK �|!]vu$$ $ event.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 2.1 2013-02-17 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controllerform'); /** * Event controller class. */ class iCagendaControllerEvent extends JControllerForm { function __construct() { $this->view_list = 'events'; parent::__construct(); } /** * Method override to check if you can add a new record. * * @param array $data An array of input data. * * @return boolean * * @since 1.6 */ protected function allowAdd($data = array()) { // Initialise variables. $user = JFactory::getUser(); $categoryId = JArrayHelper::getValue($data, 'catid', JRequest::getInt('filter_category_id'), 'int'); $allow = null; if ($categoryId) { // If the category has been passed in the data or URL check it. $allow = $user->authorise('core.create', 'com_icagenda.category.' . $categoryId); } if ($allow === null) { // In the absense of better information, revert to the component permissions. return parent::allowAdd(); } else { return $allow; } } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 1.6 */ protected function allowEdit($data = array(), $key = 'id') { // Initialise variables. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $user = JFactory::getUser(); $userId = $user->get('id'); // Check general edit permission first. if ($user->authorise('core.edit', 'com_icagenda.event.' . $recordId)) { return true; } // Fallback on edit.own. // First test if the permission is available. if ($user->authorise('core.edit.own', 'com_icagenda.event.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; if (empty($ownerId) && $recordId) { // Need to do a lookup from the model. $record = $this->getModel()->getItem($recordId); if (empty($record)) { return false; } $ownerId = $record->created_by; } // If the owner matches 'me' then do the test. if ($ownerId == $userId) { return true; } } // Since there is no asset tracking, revert to the component permissions. return parent::allowEdit($data, $key); } /** * Method to run batch operations. * * @param object $model The model. * * @return boolean True if successful, false otherwise and internal error is set. * * @since 1.6 */ public function batch($model = null) { JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN')); // Set the model $model = $this->getModel('Event', '', array()); // Preset the redirect $this->setRedirect(JRoute::_('index.php?option=com_icagenda&view=events' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } } PK �|!]�� �� � icagenda.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rez�, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rez� (Lyr!C) * @link http://www.joomlic.com * * @version 3.0 2013-05-05 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controlleradmin'); /** * Categories list controller class. */ // J2.5 : class iCagendaControlleriCagenda extends JControllerAdmin class iCagendaControlleriCagenda extends JControllerLegacyAdmin { /** * Proxy for getModel. * @since 1.6 */ public function &getModel($name = 'icagenda', $prefix = 'iCagendaModel') { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } } PK �|!]�")_d d registrations.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rez�, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rez� (Lyr!C) * @link http://www.joomlic.com * * @version 3.5.9 2015-07-22 * @since 2.0.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controlleradmin'); /** * Registrations list controller class. */ class iCagendaControllerRegistrations extends JControllerAdmin { /** * Proxy for getModel. * @since 2.0.0 */ public function getModel($name = 'registration', $prefix = 'iCagendaModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK �|!]J�ۄ� � feature.phpnu &1i� <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author doorknob * @link http://www.joomlic.com * * @version 3.4.0 2014-07-02 * @since 3.4.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.controllerform'); /** * Feature controller class. */ class iCagendaControllerFeature extends JControllerForm { function __construct() { $this->view_list = 'features'; parent::__construct(); } } PK �|!]�6� index.htmlnu &1i� <!DOCTYPE html><title></title>PK �}!]"��Kg g file.json.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); /** * File Media Controller * * @since 1.6 */ class MediaControllerFile extends JControllerLegacy { /** * Upload a file * * @return void * * @since 1.5 */ public function upload() { $params = JComponentHelper::getParams('com_media'); // Check for request forgeries if (!JSession::checkToken('request')) { $response = array( 'status' => '0', 'message' => JText::_('JINVALID_TOKEN'), 'error' => JText::_('JINVALID_TOKEN') ); echo json_encode($response); return; } // Get the user $user = JFactory::getUser(); JLog::addLogger(array('text_file' => 'upload.error.php'), JLog::ALL, array('upload')); // Get some data from the request $file = $this->input->files->get('Filedata', '', 'array'); $folder = $this->input->get('folder', '', 'path'); // Instantiate the media helper $mediaHelper = new JHelperMedia; if ($_SERVER['CONTENT_LENGTH'] > ($params->get('upload_maxsize', 0) * 1024 * 1024) || $_SERVER['CONTENT_LENGTH'] > $mediaHelper->toBytes(ini_get('upload_max_filesize')) || $_SERVER['CONTENT_LENGTH'] > $mediaHelper->toBytes(ini_get('post_max_size')) || $_SERVER['CONTENT_LENGTH'] > $mediaHelper->toBytes(ini_get('memory_limit'))) { $response = array( 'status' => '0', 'message' => JText::_('COM_MEDIA_ERROR_WARNFILETOOLARGE'), 'error' => JText::_('COM_MEDIA_ERROR_WARNFILETOOLARGE') ); echo json_encode($response); return; } // Set FTP credentials, if given JClientHelper::setCredentialsFromRequest('ftp'); if (isset($file['name'])) { // Make the filename safe $file['name'] = JFile::makeSafe($file['name']); // We need a URL safe name $fileparts = pathinfo(COM_MEDIA_BASE . '/' . $folder . '/' . $file['name']); // Transform filename to punycode $fileparts['filename'] = JStringPunycode::toPunycode($fileparts['filename']); $tempExt = !empty($fileparts['extension']) ? strtolower($fileparts['extension']) : ''; // Transform filename to punycode, then neglect other than non-alphanumeric characters & underscores. Also transform extension to lowercase $safeFileName = preg_replace(array("/[\\s]/", '/[^a-zA-Z0-9_\-]/'), array('_', ''), $fileparts['filename']) . '.' . $tempExt; // Create filepath with safe-filename $files['final'] = $fileparts['dirname'] . DIRECTORY_SEPARATOR . $safeFileName; $file['name'] = $safeFileName; $filepath = JPath::clean($files['final']); if (!$mediaHelper->canUpload($file, 'com_media') || strpos(realpath($fileparts['dirname']), JPath::clean(realpath(COM_MEDIA_BASE))) !== 0) { try { JLog::add('Invalid: ' . $filepath, JLog::INFO, 'upload'); } catch (RuntimeException $exception) { // Informational log only } $response = array( 'status' => '0', 'message' => JText::_('COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE'), 'error' => JText::_('COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE') ); echo json_encode($response); return; } // Trigger the onContentBeforeSave event. JPluginHelper::importPlugin('content'); $dispatcher = JEventDispatcher::getInstance(); $object_file = new JObject($file); $object_file->filepath = $filepath; $result = $dispatcher->trigger('onContentBeforeSave', array('com_media.file', &$object_file, true)); if (in_array(false, $result, true)) { // There are some errors in the plugins try { JLog::add( 'Errors before save: ' . $object_file->filepath . ' : ' . implode(', ', $object_file->getErrors()), JLog::INFO, 'upload' ); } catch (RuntimeException $exception) { // Informational log only } $response = array( 'status' => '0', 'message' => JText::plural('COM_MEDIA_ERROR_BEFORE_SAVE', count($errors = $object_file->getErrors()), implode('<br />', $errors)), 'error' => JText::plural('COM_MEDIA_ERROR_BEFORE_SAVE', count($errors = $object_file->getErrors()), implode('<br />', $errors)) ); echo json_encode($response); return; } if (JFile::exists($object_file->filepath)) { // File exists try { JLog::add('File exists: ' . $object_file->filepath . ' by user_id ' . $user->id, JLog::INFO, 'upload'); } catch (RuntimeException $exception) { // Informational log only } $response = array( 'status' => '0', 'message' => JText::_('COM_MEDIA_ERROR_FILE_EXISTS'), 'error' => JText::_('COM_MEDIA_ERROR_FILE_EXISTS'), 'location' => str_replace(JPATH_ROOT, '', $filepath) ); echo json_encode($response); return; } elseif (!$user->authorise('core.create', 'com_media')) { // File does not exist and user is not authorised to create try { JLog::add('Create not permitted: ' . $object_file->filepath . ' by user_id ' . $user->id, JLog::INFO, 'upload'); } catch (RuntimeException $exception) { // Informational log only } $response = array( 'status' => '0', 'error' => JText::_('COM_MEDIA_ERROR_CREATE_NOT_PERMITTED'), 'message' => JText::_('COM_MEDIA_ERROR_CREATE_NOT_PERMITTED') ); echo json_encode($response); return; } if (!JFile::upload($object_file->tmp_name, $object_file->filepath)) { // Error in upload try { JLog::add('Error on upload: ' . $object_file->filepath, JLog::INFO, 'upload'); } catch (RuntimeException $exception) { // Informational log only } $response = array( 'status' => '0', 'message' => JText::_('COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE'), 'error' => JText::_('COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE') ); echo json_encode($response); return; } else { // Trigger the onContentAfterSave event. $dispatcher->trigger('onContentAfterSave', array('com_media.file', &$object_file, true)); try { JLog::add($folder, JLog::INFO, 'upload'); } catch (RuntimeException $exception) { // Informational log only } $returnUrl = str_replace(JPATH_ROOT, '', $object_file->filepath); $response = array( 'status' => '1', 'message' => JText::sprintf('COM_MEDIA_UPLOAD_COMPLETE', $returnUrl), 'error' => JText::sprintf('COM_MEDIA_UPLOAD_COMPLETE', $returnUrl), 'location' => str_replace('\\', '/', $returnUrl) ); echo json_encode($response); return; } } else { $response = array( 'status' => '0', 'error' => JText::_('COM_MEDIA_ERROR_BAD_REQUEST'), 'message' => JText::_('COM_MEDIA_ERROR_BAD_REQUEST') ); echo json_encode($response); return; } } } PK �}!]x��r� � file.phpnu &1i� <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 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 class FileController extends acymailingController{ function language(){ acymailing_setVar('layout', 'language'); return parent::display(); } function save(){ acymailing_checkToken(); $this->_savelanguage(); return $this->language(); } function savecss(){ if(!$this->isAllowed('configuration', 'manage')) return; acymailing_checkToken(); $file = acymailing_getVar('cmd', 'file'); if(!preg_match('#^([-a-z0-9]*)_([-_a-z0-9]*)$#i', $file, $result)){ acymailing_display('Could not load the file '.$file.' properly'); exit; } $type = $result[1]; $fileName = $result[2]; $path = ACYMAILING_MEDIA.'css'.DS.$type.'_'.$fileName.'.css'; $csscontent = acymailing_getVar('string', 'csscontent'); $alreadyExists = file_exists($path); if(acymailing_writeFile($path, $csscontent)){ acymailing_enqueueMessage(acymailing_translation('JOOMEXT_SUCC_SAVED'), 'success'); $varName = acymailing_getVar('cmd', 'var'); if(!$alreadyExists){ $js = "var optn = document.createElement(\"OPTION\"); optn.text = '$fileName'; optn.value = '$fileName'; mydrop = window.top.document.getElementById('".$varName."_choice'); mydrop.options.add(optn); lastid = 0; while(mydrop.options[lastid+1]){lastid = lastid+1;} mydrop.selectedIndex = lastid; window.top.updateCSSLink('".$varName."','$type','$fileName');"; acymailing_addScript(true, $js); } $config = acymailing_config(); $newConfig = new stdClass(); $newConfig->$varName = $fileName; $config->save($newConfig); }else{ acymailing_enqueueMessage(acymailing_translation_sprintf('FAIL_SAVE', $path), 'error'); } return $this->css(); } function css(){ acymailing_setVar('layout', 'css'); return parent::display(); } function latest(){ return $this->language(); } function send(){ if(!$this->isAllowed('configuration', 'manage')) return; acymailing_checkToken(); $bodyEmail = acymailing_getVar('string', 'mailbody'); $code = acymailing_getVar('cmd', 'code'); acymailing_setVar('code', $code); if(empty($code)) return; $config = acymailing_config(); $mailer = acymailing_get('helper.mailer'); $mailer->Subject = '[ACYMAILING LANGUAGE FILE] '.$code; $mailer->Body = 'The website '.ACYMAILING_LIVE.' using AcyMailing '.$config->get('level').' '.$config->get('version').' sent a language file : '.$code; $mailer->Body .= "\n"."\n"."\n".$bodyEmail; $extrafile = acymailing_getLanguagePath(ACYMAILING_ROOT, $code).DS.$code.'.com_acymailing_custom.ini'; if(file_exists($extrafile)){ $mailer->Body .= "\n"."\n"."\n".'Custom content:'."\n".file_get_contents($extrafile); } $mailer->AddAddress(acymailing_currentUserEmail(), acymailing_currentUserName()); $mailer->AddAddress('translate@acyba.com', 'Acyba Translation Team'); $mailer->report = false; $path = acymailing_cleanPath(acymailing_getLanguagePath(ACYMAILING_ROOT, $code).DS.$code.'.com_acymailing.ini'); $mailer->AddAttachment($path); $result = $mailer->Send(); if($result){ acymailing_display(acymailing_translation('THANK_YOU_SHARING'), 'success'); acymailing_display($mailer->reportMessage, 'success'); }else{ acymailing_display($mailer->reportMessage, 'error'); } } function share(){ if(!$this->isAllowed('configuration', 'manage')) return; acymailing_checkToken(); if($this->_savelanguage()){ acymailing_setVar('layout', 'share'); return parent::display(); }else{ return $this->language(); } } function _savelanguage(){ if(!$this->isAllowed('configuration', 'manage')) return; acymailing_checkToken(); $code = acymailing_getVar('cmd', 'code'); acymailing_setVar('code', $code); $content = acymailing_getVar('string', 'content', '', '', ACY_ALLOWHTML); $content = str_replace('</textarea>', '', $content); if(empty($code) || empty($content)) return; $path = acymailing_getLanguagePath(ACYMAILING_ROOT, $code).DS.$code.'.com_acymailing.ini'; $result = acymailing_writeFile($path, $content); if($result){ acymailing_enqueueMessage(acymailing_translation('JOOMEXT_SUCC_SAVED'), 'success'); $js = "window.top.document.getElementById('image$code').className = 'acyicon-edit'"; acymailing_addScript(true, $js); $updateHelper = acymailing_get('helper.update'); $updateHelper->installMenu($code); }else{ acymailing_enqueueMessage(acymailing_translation_sprintf('FAIL_SAVE', $path), 'error'); } $customcontent = acymailing_getVar('string', 'customcontent', '', '', ACY_ALLOWHTML); $customcontent = str_replace('</textarea>', '', $customcontent); $custompath = acymailing_getLanguagePath(ACYMAILING_ROOT, $code).DS.$code.'.com_acymailing_custom.ini'; $customresult = acymailing_writeFile($custompath, $customcontent); if(!$customresult) acymailing_enqueueMessage(acymailing_translation_sprintf('FAIL_SAVE', $custompath), 'error'); if($code == acymailing_getLanguageTag()) acymailing_loadLanguage(); return $result; } function installLanguages($ajax = true){ $messagesMethod = $ajax ? 'acymailing_display' : 'acymailing_enqueueMessage'; $languages = acymailing_getVar('string', 'languages'); ob_start(); $languagesContent = acymailing_fileGetContent(ACYMAILING_UPDATEURL.'loadLanguages&json=1&codes='.$languages); $warnings = ob_get_clean(); if(!empty($warnings) && acymailing_isDebug()) echo $warnings; if(empty($languagesContent)){ $messagesMethod('Could not load the language files from our server, you can update them in the AcyMailing configuration page, tab "Languages" or start your own translation and share it', 'error'); if($ajax) exit; else return; } $decodedLanguages = json_decode($languagesContent, true); $updateHelper = acymailing_get('helper.update'); $success = array(); $error = array(); foreach($decodedLanguages as $code => $content){ if(empty($content)){ $error[] = 'The language '.$code.' was not found on our server, you can start your own translation in the AcyMailing configuration page, tab "Languages" then share it'; continue; } if(acymailing_writeFile(acymailing_getLanguagePath(ACYMAILING_ROOT, $code).DS.$code.'.com_acymailing.ini', $content)){ $updateHelper->installMenu($code); $success[] = 'Successfully installed language: '.$code; }else{ $error[] = acymailing_translation_sprintf('FAIL_SAVE', $code.'.com_acymailing.ini'); } } if(!empty($success)) $messagesMethod($success, 'success'); if(!empty($error)) $messagesMethod($error, 'error'); if($ajax) exit; } function select(){ acymailing_setVar('layout', 'select'); return parent::display(); } function downloadAcySMS(){ $headers = get_headers('https://www.acyba.com/download-area/download/component-acysms/level-express.html',1); $package = acymailing_fileGetContent('https://www.acyba.com/download-area/download/component-acysms/level-express.html'); if(empty($headers['Content-Disposition']) || empty($package)) exit; $fileName = strpos($headers['Content-Disposition'], '.zip') === false ? 'com_acysms.tar.gz' : 'com_acysms.zip'; if(acymailing_writeFile(ACYMAILING_ROOT.'tmp'.DS.'acysms'.DS.$fileName, $package) && acymailing_extractArchive(ACYMAILING_ROOT.'tmp'.DS.'acysms'.DS.$fileName, ACYMAILING_ROOT.'tmp'.DS.'acysms')) echo 'success'; exit; } function installPackage(){ if(!ACYMAILING_J16) include_once(ACYMAILING_ROOT.'libraries'.DS.'joomla'.DS.'installer'.DS.'installer.php'); $installer = JInstaller::getInstance(); if($installer->install(ACYMAILING_ROOT.'tmp'.DS.'acysms')){ acymailing_deleteFolder(ACYMAILING_ROOT.'tmp'.DS.'acysms'); echo 'success'; } exit; } } PK �}!]��N� � folder.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); /** * Folder Media Controller * * @since 1.5 */ class MediaControllerFolder extends JControllerLegacy { /** * Deletes paths from the current path * * @return boolean * * @since 1.5 */ public function delete() { $this->checkToken('request'); $user = JFactory::getUser(); // Get some data from the request $tmpl = $this->input->get('tmpl'); $paths = $this->input->get('rm', array(), 'array'); $folder = $this->input->get('folder', '', 'path'); $redirect = 'index.php?option=com_media&folder=' . $folder; if ($tmpl == 'component') { // We are inside the iframe $redirect .= '&view=mediaList&tmpl=component'; } $this->setRedirect($redirect); // Just return if there's nothing to do if (empty($paths)) { $this->setMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'error'); return true; } if (!$user->authorise('core.delete', 'com_media')) { // User is not authorised to delete JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED')); return false; } // Need this to enqueue messages. $app = JFactory::getApplication(); // Set FTP credentials, if given JClientHelper::setCredentialsFromRequest('ftp'); JPluginHelper::importPlugin('content'); $dispatcher = JEventDispatcher::getInstance(); $ret = true; $safePaths = array_intersect($paths, array_map(array('JFile', 'makeSafe'), $paths)); $unsafePaths = array_diff($paths, $safePaths); foreach ($unsafePaths as $path) { $path = JPath::clean(implode(DIRECTORY_SEPARATOR, array($folder, $path))); $path = htmlspecialchars($path, ENT_COMPAT, 'UTF-8'); $app->enqueueMessage(JText::sprintf('COM_MEDIA_ERROR_UNABLE_TO_DELETE_FILE_WARNFILENAME', $path), 'error'); } foreach ($safePaths as $path) { $fullPath = JPath::clean(implode(DIRECTORY_SEPARATOR, array(COM_MEDIA_BASE, $folder, $path))); if (strpos(realpath($fullPath), JPath::clean(realpath(COM_MEDIA_BASE))) !== 0) { JError::raiseWarning(100, JText::_('COM_MEDIA_ERROR_WARNINVALID_FOLDER')); continue; } $object_file = new JObject(array('filepath' => $fullPath)); if (is_file($object_file->filepath)) { // Trigger the onContentBeforeDelete event. $result = $dispatcher->trigger('onContentBeforeDelete', array('com_media.file', &$object_file)); if (in_array(false, $result, true)) { // There are some errors in the plugins $errors = $object_file->getErrors(); JError::raiseWarning(100, JText::plural('COM_MEDIA_ERROR_BEFORE_DELETE', count($errors), implode('<br />', $errors))); continue; } $ret &= JFile::delete($object_file->filepath); // Trigger the onContentAfterDelete event. $dispatcher->trigger('onContentAfterDelete', array('com_media.file', &$object_file)); $app->enqueueMessage(JText::sprintf('COM_MEDIA_DELETE_COMPLETE', substr($object_file->filepath, strlen(COM_MEDIA_BASE)))); } elseif (is_dir($object_file->filepath)) { $contents = JFolder::files($object_file->filepath, '.', true, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html')); if (!empty($contents)) { // This makes no sense... $folderPath = substr($object_file->filepath, strlen(COM_MEDIA_BASE)); JError::raiseWarning(100, JText::sprintf('COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_NOT_EMPTY', $folderPath)); continue; } // Trigger the onContentBeforeDelete event. $result = $dispatcher->trigger('onContentBeforeDelete', array('com_media.folder', &$object_file)); if (in_array(false, $result, true)) { // There are some errors in the plugins $errors = $object_file->getErrors(); JError::raiseWarning(100, JText::plural('COM_MEDIA_ERROR_BEFORE_DELETE', count($errors), implode('<br />', $errors))); continue; } $ret &= !JFolder::delete($object_file->filepath); // Trigger the onContentAfterDelete event. $dispatcher->trigger('onContentAfterDelete', array('com_media.folder', &$object_file)); $app->enqueueMessage(JText::sprintf('COM_MEDIA_DELETE_COMPLETE', substr($object_file->filepath, strlen(COM_MEDIA_BASE)))); } } return $ret; } /** * Create a folder * * @return boolean * * @since 1.5 */ public function create() { // Check for request forgeries $this->checkToken(); $user = JFactory::getUser(); $folder = $this->input->get('foldername', ''); $folderCheck = (string) $this->input->get('foldername', null, 'raw'); $parent = $this->input->get('folderbase', '', 'path'); $this->setRedirect('index.php?option=com_media&folder=' . $parent . '&tmpl=' . $this->input->get('tmpl', 'index')); if (strlen($folder) > 0) { if (!$user->authorise('core.create', 'com_media')) { // User is not authorised to create JError::raiseWarning(403, JText::_('COM_MEDIA_ERROR_CREATE_NOT_PERMITTED')); return false; } // Set FTP credentials, if given JClientHelper::setCredentialsFromRequest('ftp'); $this->input->set('folder', $parent); if (($folderCheck !== null) && ($folder !== $folderCheck)) { $app = JFactory::getApplication(); $app->enqueueMessage(JText::_('COM_MEDIA_ERROR_UNABLE_TO_CREATE_FOLDER_WARNDIRNAME'), 'warning'); return false; } $path = JPath::clean(COM_MEDIA_BASE . '/' . $parent . '/' . $folder); if (strpos(realpath(COM_MEDIA_BASE . '/' . $parent), JPath::clean(realpath(COM_MEDIA_BASE))) !== 0) { $app = JFactory::getApplication(); $app->enqueueMessage(JText::_('COM_MEDIA_ERROR_WARNINVALID_FOLDER'), 'error'); return false; } if (!is_dir($path) && !is_file($path)) { // Trigger the onContentBeforeSave event. $object_file = new JObject(array('filepath' => $path)); JPluginHelper::importPlugin('content'); $dispatcher = JEventDispatcher::getInstance(); $result = $dispatcher->trigger('onContentBeforeSave', array('com_media.folder', &$object_file, true)); if (in_array(false, $result, true)) { // There are some errors in the plugins JError::raiseWarning(100, JText::plural('COM_MEDIA_ERROR_BEFORE_SAVE', count($errors = $object_file->getErrors()), implode('<br />', $errors))); return false; } if (JFolder::create($object_file->filepath)) { $data = "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>"; JFile::write($object_file->filepath . '/index.html', $data); // Trigger the onContentAfterSave event. $dispatcher->trigger('onContentAfterSave', array('com_media.folder', &$object_file, true)); $this->setMessage(JText::sprintf('COM_MEDIA_CREATE_COMPLETE', substr($object_file->filepath, strlen(COM_MEDIA_BASE)))); } } $this->input->set('folder', ($parent) ? $parent . '/' . $folder : $folder); } else { // File name is of zero length (null). JError::raiseWarning(100, JText::_('COM_MEDIA_ERROR_UNABLE_TO_CREATE_FOLDER_WARNDIRNAME')); return false; } return true; } } PK D�!]�d:� � menus.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_menus * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * The Menu List Controller * * @since 1.6 */ class MenusControllerMenus extends JControllerLegacy { /** * Display the view * * @param boolean $cachable If true, the view output will be cached. * @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * * @return JController This object to support chaining. * * @since 1.6 */ public function display($cachable = false, $urlparams = false) { } /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 1.6 */ public function getModel($name = 'Menu', $prefix = 'MenusModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Remove an item. * * @return void * * @since 1.6 */ public function delete() { // Check for request forgeries $this->checkToken(); $user = JFactory::getUser(); $app = JFactory::getApplication(); $cids = (array) $this->input->get('cid', array(), 'int'); // Remove zero values resulting from input filter $cids = array_filter($cids); if (empty($cids)) { $app->enqueueMessage(JText::_('COM_MENUS_NO_MENUS_SELECTED'), 'notice'); } else { // Access checks. foreach ($cids as $i => $id) { if (!$user->authorise('core.delete', 'com_menus.menu.' . (int) $id)) { // Prune items that you can't change. unset($cids[$i]); $app->enqueueMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error'); } } if (count($cids) > 0) { // Get the model. $model = $this->getModel(); // Remove the items. if (!$model->delete($cids)) { $this->setMessage($model->getError(), 'error'); } else { $this->setMessage(JText::plural('COM_MENUS_N_MENUS_DELETED', count($cids))); } } } $this->setRedirect('index.php?option=com_menus&view=menus'); } /** * Rebuild the menu tree. * * @return boolean False on failure or error, true on success. * * @since 1.6 */ public function rebuild() { $this->checkToken(); $this->setRedirect('index.php?option=com_menus&view=menus'); $model = $this->getModel('Item'); if ($model->rebuild()) { // Reorder succeeded. $this->setMessage(JText::_('JTOOLBAR_REBUILD_SUCCESS')); return true; } else { // Rebuild failed. $this->setMessage(JText::sprintf('JTOOLBAR_REBUILD_FAILED', $model->getError()), 'error'); return false; } } /** * Temporary method. This should go into the 1.5 to 1.6 upgrade routines. * * @return JException|void JException instance on error * * @since 1.6 */ public function resync() { $db = JFactory::getDbo(); $query = $db->getQuery(true); $parts = null; try { $query->select('element, extension_id') ->from('#__extensions') ->where('type = ' . $db->quote('component')); $db->setQuery($query); $components = $db->loadAssocList('element', 'extension_id'); } catch (RuntimeException $e) { return JError::raiseWarning(500, $e->getMessage()); } // Load all the component menu links $query->select($db->quoteName('id')) ->select($db->quoteName('link')) ->select($db->quoteName('component_id')) ->from('#__menu') ->where($db->quoteName('type') . ' = ' . $db->quote('component.item')); $db->setQuery($query); try { $items = $db->loadObjectList(); } catch (RuntimeException $e) { return JError::raiseWarning(500, $e->getMessage()); } foreach ($items as $item) { // Parse the link. parse_str(parse_url($item->link, PHP_URL_QUERY), $parts); // Tease out the option. if (isset($parts['option'])) { $option = $parts['option']; // Lookup the component ID if (isset($components[$option])) { $componentId = $components[$option]; } else { // Mismatch. Needs human intervention. $componentId = -1; } // Check for mis-matched component id's in the menu link. if ($item->component_id != $componentId) { // Update the menu table. $log = "Link $item->id refers to $item->component_id, converting to $componentId ($item->link)"; echo "<br />$log"; $query->clear(); $query->update('#__menu') ->set('component_id = ' . $componentId) ->where('id = ' . $item->id); try { $db->setQuery($query)->execute(); } catch (RuntimeException $e) { return JError::raiseWarning(500, $e->getMessage()); } } } } } } PK D�!]m�6�v v ajax.phpnu &1i� <?php /** * @name Slideshow CK * @package com_slideshowck * @copyright Copyright (C) 2019. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr */ // No direct access defined('CK_LOADED') or die; use \Slideshowck\CKController; use \Slideshowck\CKFof; use \Slideshowck\CKText; class SlideshowckControllerAjax extends CKController { function __construct() { // security check if (! CKFof::checkAjaxToken()) exit; parent::__construct(); $plugin = $this->input->get('plugin', '', 'cmd'); $task = $this->input->get('task', '', 'cmd'); if ($plugin) { if (file_exists(SLIDESHOWCK_PLUGINS_PATH . '/' . $plugin . '/helper/helper_' . $plugin . '.php')) { require_once(SLIDESHOWCK_PLUGINS_PATH . '/' . $plugin . '/helper/helper_' . $plugin . '.php'); $className = 'SlideshowckHelpersource' . ucfirst($plugin); //SlideshowckHelpersourceArticles $class = new $className(); if (method_exists($class, $task)) { $class::$task(); exit; } } } die; } } PK ��!]�t��5 5 level.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_users * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * User view level controller class. * * @since 1.6 */ class UsersControllerLevel extends JControllerForm { /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_USERS_LEVEL'; /** * Method to check if you can save a new or existing record. * * Overrides JControllerForm::allowSave to check the core.admin permission. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 1.6 */ protected function allowSave($data, $key = 'id') { return (JFactory::getUser()->authorise('core.admin', $this->option) && parent::allowSave($data, $key)); } /** * Overrides JControllerForm::allowEdit * * Checks that non-Super Admins are not editing Super Admins. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 3.8.8 */ protected function allowEdit($data = array(), $key = 'id') { // Get user instance $user = JFactory::getUser(); // Check for if Super Admin can edit $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('*') ->from($db->quoteName('#__viewlevels')) ->where($db->quoteName('id') . ' = ' . (int) $data['id']); $db->setQuery($query); $viewlevel = $db->loadAssoc(); // Decode level groups $groups = json_decode($viewlevel['rules']); // If this group is super admin and this user is not super admin, canEdit is false if (!$user->authorise('core.admin') && JAccess::checkGroup($groups[0], 'core.admin')) { $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED')); return false; } return parent::allowEdit($data, $key); } /** * Removes an item. * * Overrides JControllerAdmin::delete to check the core.admin permission. * * @return boolean Returns true on success, false on failure. * * @since 1.6 */ public function delete() { // Check for request forgeries. $this->checkToken(); $ids = (array) $this->input->get('cid', array(), 'int'); // Remove zero values resulting from input filter $ids = array_filter($ids); if (!JFactory::getUser()->authorise('core.admin', $this->option)) { JError::raiseError(500, JText::_('JERROR_ALERTNOAUTHOR')); jexit(); } elseif (empty($ids)) { JError::raiseWarning(500, JText::_('COM_USERS_NO_LEVELS_SELECTED')); } else { // Get the model. $model = $this->getModel(); // Remove the items. if (!$model->delete($ids)) { JError::raiseWarning(500, $model->getError()); } else { $this->setMessage(JText::plural('COM_USERS_N_LEVELS_DELETED', count($ids))); } } $this->setRedirect('index.php?option=com_users&view=levels'); } } PK ��!]��&�8 �8 user.phpnu &1i� <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 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 class UserController extends acymailingController{ function __construct($config = array()){ parent::__construct($config); $this->registerDefaultTask('subscribe'); $this->registerTask('optout', 'unsub'); $this->registerTask('out', 'unsub'); } function confirm(){ if(acymailing_isRobot()) return false; $config = acymailing_config(); $userClass = acymailing_get('class.subscriber'); $userClass->geolocRight = true; $user = $userClass->identify(); if(empty($user)) return false; $redirectUrl = $config->get('confirm_redirect'); $listRedirection = ''; $subscription = $userClass->getSubscriptionStatus($user->subid); foreach($subscription as $i => $onelist){ if(!in_array($onelist->status, array(1, 2)) || acymailing_translation('REDIRECTION_CONFIRMATION_'.$i) == 'REDIRECTION_CONFIRMATION_'.$i) continue; $listRedirection = acymailing_translation('REDIRECTION_CONFIRMATION_'.$i); break; } if(!empty($listRedirection)) $redirectUrl = $listRedirection; if($config->get('confirmation_message', 1)){ if($user->confirmed && strlen(acymailing_translation('ALREADY_CONFIRMED')) > 0){ acymailing_enqueueMessage(acymailing_translation('ALREADY_CONFIRMED')); }elseif(!$user->confirmed && strlen(acymailing_translation('SUBSCRIPTION_CONFIRMED')) > 0) acymailing_enqueueMessage(acymailing_translation('SUBSCRIPTION_CONFIRMED')); } if(!$user->confirmed) $userClass->confirmSubscription($user->subid); $notifConfirm = $config->get('notification_confirm'); if(!empty($notifConfirm)){ $listsubClass = acymailing_get('class.listsub'); $userHelper = acymailing_get('helper.user'); $mailer = acymailing_get('helper.mailer'); $mailer->autoAddUser = true; $mailer->checkConfirmField = false; $mailer->report = false; foreach($user as $field => $value) $mailer->addParam('user:'.$field, $value); $mailer->addParam('user:subscription', $listsubClass->getSubscriptionString($user->subid)); $mailer->addParam('user:subscriptiondates', $listsubClass->getSubscriptionString($user->subid, true)); $mailer->addParam('user:ip', $userHelper->getIP()); if(!empty($userClass->geolocData)){ foreach($userClass->geolocData as $map => $value){ $mailer->addParam('geoloc:notif_'.$map, $value); } } $mailer->addParamInfo(); $allUsers = explode(' ', trim(str_replace(array(';', ','), ' ', $notifConfirm))); foreach($allUsers as $oneUser){ if(empty($oneUser)) continue; $mailer->sendOne('notification_confirm', $oneUser); } } if(!empty($redirectUrl)){ $replace = array(); foreach($user as $key => $val){ $replace['{'.$key.'}'] = $val; $replace['{user:'.$key.'}'] = $val; } if($config->get('redirect_tags', 0) == 1) $redirectUrl = str_replace(array_keys($replace), $replace, $redirectUrl); acymailing_redirect($redirectUrl); } if('joomla' == 'wordpress') acymailing_redirect(acymailing_rootURI()); acymailing_setVar('layout', 'confirm'); return parent::display(); }//endfct function modify(){ $userClass = acymailing_get('class.subscriber'); $userClass->geolocRight = true; $user = $userClass->identify(true); if(empty($user)) return $this->subscribe(); acymailing_setVar('layout', 'modify'); return parent::display(); } function subscribe(){ $userClass = acymailing_get('class.subscriber'); $userClass->geolocRight = true; $currentUserid = acymailing_currentUserId(); if(!empty($currentUserid) AND $userClass->identify(true)){ return $this->modify(); } $config = acymailing_config(); $allowvisitor = $config->get('allow_visitor', 1); if(empty($allowvisitor)){ acymailing_askLog(true, 'ONLY_LOGGED', 'message'); return false; } acymailing_setVar('layout', 'modify'); return parent::display(); } function unsub(){ $userClass = acymailing_get('class.subscriber'); $user = $userClass->identify(); if(empty($user)) return false; $statsClass = acymailing_get('class.stats'); $statsClass->countReturn = false; $statsClass->saveStats(); acymailing_setVar('layout', 'unsub'); return parent::display(); } function saveunsub(){ acymailing_checkRobots(); $subscriberClass = acymailing_get('class.subscriber'); $subscriberClass->sendConf = false; $listsubClass = acymailing_get('class.listsub'); $userHelper = acymailing_get('helper.user'); $config = acymailing_config(); $subscriber = new stdClass(); $subscriber->subid = acymailing_getVar('int', 'subid'); $user = $subscriberClass->identify(); if(!$user || empty($subscriber->subid) || $user->subid != $subscriber->subid){ echo "<script>alert('ERROR : You are not allowed to modify this user'); window.history.go(-1);</script>"; exit; } $refusemails = acymailing_getVar('int', 'refuse'); $unsuball = acymailing_getVar('int', 'unsuball'); $mailid = acymailing_getVar('int', 'mailid'); $oldUser = $subscriberClass->get($subscriber->subid); $survey = acymailing_getVar('array', 'survey', array(), ''); $tagSurvey = ''; $data = array(); if(!empty($survey)){ foreach($survey as $oneResult){ if(empty($oneResult)) continue; $data[] = "REASON::".str_replace(array("\n", "\r"), array('<br />', ''), strip_tags($oneResult)); } $tagSurvey = implode('<br />', $data); } $replace = array(); $replace['REASON::'] = '<br />'.acymailing_translation('REASON').' : '; $reasons = unserialize($config->get('unsub_reasons')); foreach($reasons as $i => $oneReason){ if(preg_match('#^[A-Z_]*$#', $oneReason)){ $replace[$oneReason] = acymailing_translation($oneReason); } } $tagSurvey = str_replace(array_keys($replace), $replace, $tagSurvey); $historyClass = acymailing_get('class.acyhistory'); $historyClass->insert($subscriber->subid, 'unsubscribed', $data, $mailid); $notifToSend = ''; $incrementUnsub = false; if($refusemails OR $unsuball){ if($refusemails){ $subscriber->accept = 0; if($config->get('unsubscription_message', 1) && strlen(acymailing_translation('CONFIRM_UNSUB_FULL')) > 0) acymailing_enqueueMessage(acymailing_translation('CONFIRM_UNSUB_FULL')); $notifToSend = 'notification_refuse'; }elseif($unsuball){ $notifToSend = 'notification_unsuball'; } $subscription = $subscriberClass->getSubscriptionStatus($subscriber->subid); $updatelists = array(); foreach($subscription as $listid => $oneList){ if($oneList->status != -1){ $updatelists[-1][] = $listid; } } $listsubClass->sendNotif = false; if(!empty($updatelists)){ $status = $listsubClass->updateSubscription($subscriber->subid, $updatelists); if($config->get('unsubscription_message', 1) && strlen(acymailing_translation('CONFIRM_UNSUB_ALL')) > 0) acymailing_enqueueMessage(acymailing_translation('CONFIRM_UNSUB_ALL')); $incrementUnsub = true; }else{ if($config->get('unsubscription_message', 1) && strlen(acymailing_translation('ERROR_NOT_SUBSCRIBED')) > 0) acymailing_enqueueMessage(acymailing_translation('ERROR_NOT_SUBSCRIBED')); } $subscriber->confirmed = 0; $subscriberClass->save($subscriber); }else{ $subscription = $subscriberClass->getSubscriptionStatus($subscriber->subid); $allLists = acymailing_loadObjectList('SELECT b.listid, b.name, b.type FROM '.acymailing_table('listmail').' as a JOIN '.acymailing_table('list').' as b on a.listid = b.listid WHERE a.mailid = '.$mailid); if(empty($allLists)){ $allLists = acymailing_loadObjectList('SELECT b.listid, b.name, b.type FROM '.acymailing_table('list').' as b WHERE b.welmailid = '.$mailid.' OR b.unsubmailid = '.$mailid); } if(empty($allLists)){ $allLists = acymailing_loadObjectList('SELECT b.listid, b.name, b.type FROM #__acymailing_listsub as a JOIN #__acymailing_list as b on a.listid = b.listid WHERE a.subid = '.$subscriber->subid); } $otherSubscriptionsBoxes = acymailing_getVar('array', 'unsubotherlists', array(), 'post'); $otherSubscriptionsId = acymailing_getVar('array', 'unsubotherlistsid', array(), 'post'); $othersubscriptionsToRemove = array(); if(!empty($otherSubscriptionsBoxes)){ $i = 0; foreach($otherSubscriptionsBoxes as $anotherSubscriptionsBox => $value){ if($value == 1) $othersubscriptionsToRemove[] = intval($otherSubscriptionsId[$i]); $i++; } $otherSubscriptions = acymailing_loadObjectList('SELECT listid, name, type FROM #__acymailing_list WHERE listid IN ('.implode(',', $othersubscriptionsToRemove).')'); foreach($otherSubscriptions as $anotherSubscription){ array_push($allLists, $anotherSubscription); } } if(empty($allLists)){ echo "<script>alert('ERROR : Could not get the list for the mailing $mailid'); window.history.go(-1);</script>"; exit; } $campaignList = array(); $unsubList = array(); foreach($allLists as $oneList){ if(isset($subscription[$oneList->listid]) AND $subscription[$oneList->listid]->status != -1){ if($oneList->type == 'campaign'){ $campaignList[] = $oneList->listid; }else{ $unsubList[$oneList->listid] = $oneList; } } } if(!empty($campaignList)){ $otherLists = acymailing_loadObjectList('SELECT b.listid, b.name, b.type FROM '.acymailing_table('listcampaign').' as a LEFT JOIN '.acymailing_table('list').' as b on a.listid = b.listid WHERE a.campaignid IN ('.implode(',', $campaignList).')'); if(!empty($otherLists)){ foreach($otherLists as $oneList){ if(isset($subscription[$oneList->listid]) AND $subscription[$oneList->listid]->status != -1){ $unsubList[$oneList->listid] = $oneList; } } } } if(!empty($unsubList)){ $updatelists = array(); $updatelists[-1] = array_keys($unsubList); $listsubClass->survey = $tagSurvey; $status = $listsubClass->updateSubscription($subscriber->subid, $updatelists); if($config->get('unsubscription_message', 1) && strlen(acymailing_translation('CONFIRM_UNSUB_CURRENT')) > 0) acymailing_enqueueMessage(acymailing_translation('CONFIRM_UNSUB_CURRENT')); $incrementUnsub = true; }else{ if($config->get('unsubscription_message', 1) && strlen(acymailing_translation('ERROR_NOT_SUBSCRIBED_CURRENT')) > 0) acymailing_enqueueMessage(acymailing_translation('ERROR_NOT_SUBSCRIBED_CURRENT')); } } if($incrementUnsub){ $alreadythere = acymailing_loadResult('SELECT subid FROM #__acymailing_history WHERE `action` = "unsubscribed" AND `subid` = '.intval($subscriber->subid).' AND `mailid` = '.intval($mailid).' LIMIT 1,1'); if(empty($alreadythere)){ acymailing_query('UPDATE '.acymailing_table('stats').' SET `unsub` = `unsub` +1 WHERE `mailid` = '.(int)$mailid); } } $classGeoloc = acymailing_get('class.geolocation'); $classGeoloc->saveGeolocation('unsubscription', $subscriber->subid); if(!empty($notifToSend)){ $notifyUsers = $config->get($notifToSend); if(!empty($notifyUsers)){ $mailer = acymailing_get('helper.mailer'); $mailer->autoAddUser = true; $mailer->checkConfirmField = false; $mailer->report = false; foreach($oldUser as $field => $value) $mailer->addParam('user:'.$field, $value); $mailer->addParam('user:subscription', $listsubClass->getSubscriptionString($oldUser->subid)); $mailer->addParam('user:subscriptiondates', $listsubClass->getSubscriptionString($oldUser->subid, true)); $mailer->addParam('user:ip', $userHelper->getIP()); $mailer->addParam('survey', $tagSurvey); $mailer->addParamInfo(); $allUsers = explode(' ', trim(str_replace(array(';', ','), ' ', $notifyUsers))); foreach($allUsers as $oneUser){ if(empty($oneUser)) continue; $mailer->sendOne('notification_unsuball', $oneUser); } } } $redirectUnsub = $config->get('unsub_redirect'); if(!empty($redirectUnsub)){ $replace = array(); foreach($oldUser as $key => $val){ $replace['{'.$key.'}'] = $val; $replace['{user:'.$key.'}'] = $val; } if($config->get('redirect_tags', 0) == 1) $redirectUnsub = str_replace(array_keys($replace), $replace, $redirectUnsub); acymailing_redirect($redirectUnsub); return; }elseif('joomla' == 'wordpress'){ acymailing_redirect(acymailing_rootURI()); return; } acymailing_setVar('layout', 'saveunsub'); return parent::display(); } function savechanges(){ acymailing_checkToken(); acymailing_checkRobots(); $config = acymailing_config(); $subscriberClass = acymailing_get('class.subscriber'); $subscriberClass->geolocRight = true; $subscriberClass->extendedEmailVerif = true; $status = $subscriberClass->saveForm(); $subscriberClass->sendNotification(); if($status){ if($subscriberClass->confirmationSent){ if($config->get('subscription_message', 1) && strlen(acymailing_translation('CONFIRMATION_SENT')) > 0) acymailing_enqueueMessage(acymailing_translation('CONFIRMATION_SENT'), 'message'); $redirectlink = $config->get('sub_redirect'); }elseif($subscriberClass->newUser){ if($config->get('subscription_message', 1) && strlen(acymailing_translation('SUBSCRIPTION_OK')) > 0) acymailing_enqueueMessage(acymailing_translation('SUBSCRIPTION_OK'), 'message'); $redirectlink = $config->get('sub_redirect'); }else{ if(strlen(acymailing_translation('SUBSCRIPTION_UPDATE_OK')) > 0) acymailing_enqueueMessage(acymailing_translation('SUBSCRIPTION_UPDATED_OK'), 'message'); $redirectlink = $config->get('modif_redirect'); } }elseif($subscriberClass->requireId){ if(strlen(acymailing_translation('IDENTIFICATION_SENT')) > 0) acymailing_enqueueMessage(acymailing_translation('IDENTIFICATION_SENT'), 'notice'); }else{ if(strlen(acymailing_translation('ERROR_SAVING')) > 0) acymailing_enqueueMessage(acymailing_translation('ERROR_SAVING'), 'error'); } if(!empty($redirectlink)){ if($config->get('redirect_tags', false)) { $user = $subscriberClass->identify(true); if(!empty($user->subid)) { $replace = array(); foreach ($user as $key => $val) { if(!is_array($val) && !is_object($val)) $replace['{' . $key . '}'] = $val; } $redirectlink = str_replace(array_keys($replace), $replace, $redirectlink); } } acymailing_redirect($redirectlink); return; } if($subscriberClass->identify(true)) return $this->modify(); return $this->subscribe(); } } PK ��!]bQ�ԧ � users.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_users * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Users list controller class. * * @since 1.6 */ class UsersControllerUsers extends JControllerAdmin { /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_USERS_USERS'; /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @since 1.6 * @see JController */ public function __construct($config = array()) { parent::__construct($config); $this->registerTask('block', 'changeBlock'); $this->registerTask('unblock', 'changeBlock'); } /** * Proxy for getModel. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 1.6 */ public function getModel($name = 'User', $prefix = 'UsersModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Method to change the block status on a record. * * @return void * * @since 1.6 */ public function changeBlock() { // Check for request forgeries. $this->checkToken(); $ids = (array) $this->input->get('cid', array(), 'int'); $values = array('block' => 1, 'unblock' => 0); $task = $this->getTask(); $value = ArrayHelper::getValue($values, $task, 0, 'int'); // Remove zero values resulting from input filter $ids = array_filter($ids); if (empty($ids)) { JError::raiseWarning(500, JText::_('COM_USERS_USERS_NO_ITEM_SELECTED')); } else { // Get the model. $model = $this->getModel(); // Change the state of the records. if (!$model->block($ids, $value)) { JError::raiseWarning(500, $model->getError()); } else { if ($value == 1) { $this->setMessage(JText::plural('COM_USERS_N_USERS_BLOCKED', count($ids))); } elseif ($value == 0) { $this->setMessage(JText::plural('COM_USERS_N_USERS_UNBLOCKED', count($ids))); } } } $this->setRedirect('index.php?option=com_users&view=users'); } /** * Method to activate a record. * * @return void * * @since 1.6 */ public function activate() { // Check for request forgeries. $this->checkToken(); $ids = (array) $this->input->get('cid', array(), 'int'); // Remove zero values resulting from input filter $ids = array_filter($ids); if (empty($ids)) { JError::raiseWarning(500, JText::_('COM_USERS_USERS_NO_ITEM_SELECTED')); } else { // Get the model. $model = $this->getModel(); // Change the state of the records. if (!$model->activate($ids)) { JError::raiseWarning(500, $model->getError()); } else { $this->setMessage(JText::plural('COM_USERS_N_USERS_ACTIVATED', count($ids))); } } $this->setRedirect('index.php?option=com_users&view=users'); } } PK ��!]�h+�� � levels.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_users * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * User view levels list controller class. * * @since 1.6 */ class UsersControllerLevels extends JControllerAdmin { /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_USERS_LEVELS'; /** * Proxy for getModel. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 1.6 */ public function getModel($name = 'Level', $prefix = 'UsersModel', $config = array()) { return parent::getModel($name, $prefix, array('ignore_request' => true)); } } PK ��!]T�U�� � notes.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_users * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * User notes controller class. * * @since 2.5 */ class UsersControllerNotes extends JControllerAdmin { /** * The prefix to use with controller messages. * * @var string * @since 2.5 */ protected $text_prefix = 'COM_USERS_NOTES'; /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 2.5 */ public function getModel($name = 'Note', $prefix = 'UsersModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK ��!]�$��� � group.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * The Group controller * * @since 3.7.0 */ class FieldsControllerGroup extends JControllerForm { /** * The prefix to use with controller messages. * * @var string * @since 3.7.0 */ protected $text_prefix = 'COM_FIELDS_GROUP'; /** * The component for which the group applies. * * @var string * @since 3.7.0 */ private $component = ''; /** * Class constructor. * * @param array $config A named array of configuration variables. * * @since 3.7.0 */ public function __construct($config = array()) { parent::__construct($config); $parts = FieldsHelper::extract($this->input->getCmd('context')); if ($parts) { $this->component = $parts[0]; } } /** * Method to run batch operations. * * @param object $model The model. * * @return boolean True if successful, false otherwise and internal error is set. * * @since 3.7.0 */ public function batch($model = null) { $this->checkToken(); // Set the model $model = $this->getModel('Group'); // Preset the redirect $this->setRedirect('index.php?option=com_fields&view=groups'); return parent::batch($model); } /** * Method override to check if you can add a new record. * * @param array $data An array of input data. * * @return boolean * * @since 3.7.0 */ protected function allowAdd($data = array()) { return JFactory::getUser()->authorise('core.create', $this->component); } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * * @since 3.7.0 */ protected function allowEdit($data = array(), $key = 'parent_id') { $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $user = JFactory::getUser(); // Zero record (parent_id:0), return component edit permission by calling parent controller method if (!$recordId) { return parent::allowEdit($data, $key); } // Check edit on the record asset (explicit or inherited) if ($user->authorise('core.edit', $this->component . '.fieldgroup.' . $recordId)) { return true; } // Check edit own on the record asset (explicit or inherited) if ($user->authorise('core.edit.own', $this->component . '.fieldgroup.' . $recordId) || $user->authorise('core.edit.own', $this->component)) { // Existing record already has an owner, get it $record = $this->getModel()->getItem($recordId); if (empty($record)) { return false; } // Grant if current user is owner of the record return $user->id == $record->created_by; } return false; } /** * Function that allows child controller access to model data after the data has been saved. * * @param JModelLegacy $model The data model object. * @param array $validData The validated data. * * @return void * * @since 3.7.0 */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { $item = $model->getItem(); if (isset($item->params) && is_array($item->params)) { $registry = new Registry; $registry->loadArray($item->params); $item->params = (string) $registry; } return; } } PK ��!]�A� groups.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Groups list controller class. * * @since 3.7.0 */ class FieldsControllerGroups extends JControllerAdmin { /** * The prefix to use with controller messages. * * @var string * * @since 3.7.0 */ protected $text_prefix = 'COM_FIELDS_GROUP'; /** * Proxy for getModel. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config The array of possible config values. Optional. * * @return JModelLegacy|boolean Model object on success; otherwise false on failure. * * @since 3.7.0 */ public function getModel($name = 'Group', $prefix = 'FieldsModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } } PK ��!]ҋ��S S note.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_users * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * User note controller class. * * @since 2.5 */ class UsersControllerNote extends JControllerForm { /** * The prefix to use with controller messages. * * @var string * @since 2.5 */ protected $text_prefix = 'COM_USERS_NOTE'; /** * Gets the URL arguments to append to an item redirect. * * @param integer $recordId The primary key id for the item. * @param string $key The name of the primary key variable. * * @return string The arguments to append to the redirect URL. * * @since 2.5 */ protected function getRedirectToItemAppend($recordId = null, $key = 'id') { $append = parent::getRedirectToItemAppend($recordId, $key); $userId = JFactory::getApplication()->input->get('u_id', 0, 'int'); if ($userId) { $append .= '&u_id=' . $userId; } return $append; } } PK �!]���� � overrides.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_languages * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Languages Overrides Controller. * * @since 2.5 */ class LanguagesControllerOverrides extends JControllerAdmin { /** * The prefix to use with controller messages. * * @var string * @since 2.5 */ protected $text_prefix = 'COM_LANGUAGES_VIEW_OVERRIDES'; /** * Method for deleting one or more overrides. * * @return void * * @since 2.5 */ public function delete() { // Check for request forgeries. $this->checkToken(); // Get items to delete from the request. $cid = (array) $this->input->get('cid', array(), 'string'); // Remove zero values resulting from input filter $cid = array_filter($cid); if (empty($cid)) { $this->setMessage(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), 'warning'); } else { // Get the model. $model = $this->getModel('overrides'); // Remove the items. if ($model->delete($cid)) { $this->setMessage(JText::plural($this->text_prefix . '_N_ITEMS_DELETED', count($cid))); } else { $this->setMessage($model->getError()); } } $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false)); } /** * Method to purge the overrider table. * * @return void * * @since 3.4.2 */ public function purge() { // Check for request forgeries. $this->checkToken(); $model = $this->getModel('overrides'); $model->purge(); $this->setRedirect(JRoute::_('index.php?option=com_languages&view=overrides', false)); } } PK �!]5���3 3 strings.json.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_languages * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Languages Strings JSON Controller * * @since 2.5 */ class LanguagesControllerStrings extends JControllerAdmin { /** * Method for refreshing the cache in the database with the known language strings * * @return void * * @since 2.5 */ public function refresh() { echo new JResponseJson($this->getModel('strings')->refresh()); } /** * Method for searching language strings * * @return void * * @since 2.5 */ public function search() { echo new JResponseJson($this->getModel('strings')->search()); } } PK �!]d� � � override.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_languages * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Languages Override Controller * * @since 2.5 */ class LanguagesControllerOverride extends JControllerForm { /** * Method to edit an existing override. * * @param string $key The name of the primary key of the URL variable (not used here). * @param string $urlVar The name of the URL variable if different from the primary key (not used here). * * @return void * * @since 2.5 */ public function edit($key = null, $urlVar = null) { // Do not cache the response to this, its a redirect JFactory::getApplication()->allowCache(false); $app = JFactory::getApplication(); $cid = (array) $this->input->post->get('cid', array(), 'string'); $context = "$this->option.edit.$this->context"; // Get the constant name. $recordId = (count($cid) ? $cid[0] : $this->input->get('id')); // Access check. if (!$this->allowEdit()) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED')); $this->setMessage($this->getError(), 'error'); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false)); return; } $app->setUserState($context . '.data', null); $this->setRedirect('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, 'id')); } /** * Method to save an override. * * @param string $key The name of the primary key of the URL variable (not used here). * @param string $urlVar The name of the URL variable if different from the primary key (not used here). * * @return void * * @since 2.5 */ public function save($key = null, $urlVar = null) { // Check for request forgeries. $this->checkToken(); $app = JFactory::getApplication(); $model = $this->getModel(); $data = $this->input->post->get('jform', array(), 'array'); $context = "$this->option.edit.$this->context"; $task = $this->getTask(); $recordId = $this->input->get('id'); $data['id'] = $recordId; // Access check. if (!$this->allowSave($data, 'id')) { $this->setError(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED')); $this->setMessage($this->getError(), 'error'); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false)); return; } // Validate the posted data. $form = $model->getForm($data, false); if (!$form) { $app->enqueueMessage($model->getError(), 'error'); return; } // Require helper for filter functions called by JForm. JLoader::register('LanguagesHelper', JPATH_ADMINISTRATOR . '/components/com_languages/helpers/languages.php'); // Test whether the data is valid. $validData = $model->validate($form, $data); // Check for validation errors. if ($validData === false) { // Get the validation messages. $errors = $model->getErrors(); // Push up to three validation messages out to the user. for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) { if ($errors[$i] instanceof Exception) { $app->enqueueMessage($errors[$i]->getMessage(), 'warning'); } else { $app->enqueueMessage($errors[$i], 'warning'); } } // Save the data in the session. $app->setUserState($context . '.data', $data); // Redirect back to the edit screen. $this->setRedirect( JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, 'id'), false) ); return; } // Attempt to save the data. if (!$model->save($validData)) { // Save the data in the session. $app->setUserState($context . '.data', $validData); // Redirect back to the edit screen. $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError())); $this->setMessage($this->getError(), 'error'); $this->setRedirect( JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, 'id'), false) ); return; } // Add message of success. $this->setMessage(JText::_('COM_LANGUAGES_VIEW_OVERRIDE_SAVE_SUCCESS')); // Redirect the user and adjust session state based on the chosen task. switch ($task) { case 'apply': // Set the record data in the session. $app->setUserState($context . '.data', null); // Redirect back to the edit screen $this->setRedirect( JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($validData['key'], 'id'), false) ); break; case 'save2new': // Clear the record id and data from the session. $app->setUserState($context . '.data', null); // Redirect back to the edit screen $this->setRedirect( JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend(null, 'id'), false) ); break; default: // Clear the record id and data from the session. $app->setUserState($context . '.data', null); // Redirect to the list screen. $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false)); break; } } /** * Method to cancel an edit. * * @param string $key The name of the primary key of the URL variable (not used here). * * @return void * * @since 2.5 */ public function cancel($key = null) { $this->checkToken(); $app = JFactory::getApplication(); $context = "$this->option.edit.$this->context"; $app->setUserState($context . '.data', null); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false)); } } PK �!]�Q<�D D language.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_languages * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Languages list actions controller. * * @since 1.6 */ class LanguagesControllerLanguage extends JControllerForm { /** * Gets the URL arguments to append to an item redirect. * * @param int $recordId The primary key id for the item. * @param string $key The name of the primary key variable. * * @return string The arguments to append to the redirect URL. * * @since 1.6 */ protected function getRedirectToItemAppend($recordId = null, $key = 'lang_id') { return parent::getRedirectToItemAppend($recordId, $key); } } PK �!]u� | | languages.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_languages * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Languages controller Class. * * @since 1.6 */ class LanguagesControllerLanguages extends JControllerAdmin { /** * Method to get a model object, loading it if required. * * @param string $name The model name. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for model. Optional. * * @return object The model. * * @since 1.6 */ public function getModel($name = 'Language', $prefix = 'LanguagesModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } /** * Method to save the submitted ordering values for records via AJAX. * * @return void * * @since 3.1 */ public function saveOrderAjax() { // Check for request forgeries. $this->checkToken(); $pks = (array) $this->input->post->get('cid', array(), 'int'); $order = (array) $this->input->post->get('order', array(), 'int'); // Remove zero PK's and corresponding order values resulting from input filter for PK foreach ($pks as $i => $pk) { if ($pk === 0) { unset($pks[$i]); unset($order[$i]); } } // Get the model. $model = $this->getModel(); // Save the ordering. $return = $model->saveorder($pks, $order); if ($return) { echo '1'; } // Close the application. JFactory::getApplication()->close(); } } PK �!]���% % installed.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_languages * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Languages Controller. * * @since 1.5 */ class LanguagesControllerInstalled extends JControllerLegacy { /** * Task to set the default language. * * @return void */ public function setDefault() { // Check for request forgeries. $this->checkToken(); $cid = (string) $this->input->get('cid', '', 'string'); $model = $this->getModel('installed'); if ($model->publish($cid)) { // Switching to the new administrator language for the message if ($model->getState('client_id') == 1) { $language = JFactory::getLanguage(); $newLang = JLanguage::getInstance($cid); JFactory::$language = $newLang; JFactory::getApplication()->loadLanguage($language = $newLang); $newLang->load('com_languages', JPATH_ADMINISTRATOR); } $msg = JText::_('COM_LANGUAGES_MSG_DEFAULT_LANGUAGE_SAVED'); $type = 'message'; } else { $msg = $this->getError(); $type = 'error'; } $clientId = $model->getState('client_id'); $this->setredirect('index.php?option=com_languages&view=installed&client=' . $clientId, $msg, $type); } /** * Task to switch the administrator language. * * @return void */ public function switchAdminLanguage() { // Check for request forgeries. $this->checkToken(); $cid = (string) $this->input->get('cid', '', 'string'); $model = $this->getModel('installed'); // Fetching the language name from the xx-XX.xml or langmetadata.xml respectively. $file = JPATH_ADMINISTRATOR . '/language/' . $cid . '/' . $cid . '.xml'; if (!is_file($file)) { $file = JPATH_ADMINISTRATOR . '/language/' . $cid . '/langmetadata.xml'; } $info = JInstaller::parseXMLInstallFile($file); if ($model->switchAdminLanguage($cid)) { // Switching to the new language for the message $languageName = $info['name']; $language = JFactory::getLanguage(); $newLang = JLanguage::getInstance($cid); JFactory::$language = $newLang; JFactory::getApplication()->loadLanguage($language = $newLang); $newLang->load('com_languages', JPATH_ADMINISTRATOR); $msg = JText::sprintf('COM_LANGUAGES_MSG_SWITCH_ADMIN_LANGUAGE_SUCCESS', $languageName); $type = 'message'; } else { $msg = $this->getError(); $type = 'error'; } $this->setredirect('index.php?option=com_languages&view=installed', $msg, $type); } } PK �!]���� � application.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_config * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Controller for global configuration * * @since 1.5 * @deprecated 4.0 */ class ConfigControllerApplication extends JControllerLegacy { /** * Class Constructor * * @param array $config An optional associative array of configuration settings. * * @since 1.5 * @deprecated 4.0 */ public function __construct($config = array()) { parent::__construct($config); // Map the apply task to the save method. $this->registerTask('apply', 'save'); } /** * Method to save the configuration. * * @return boolean True on success, false on failure. * * @since 1.5 * @deprecated 4.0 Use ConfigControllerApplicationSave instead. */ public function save() { try { JLog::add( sprintf('%s() is deprecated. Use ConfigControllerApplicationSave instead.', __METHOD__), JLog::WARNING, 'deprecated' ); } catch (RuntimeException $exception) { // Informational log only } $controller = new ConfigControllerApplicationSave; return $controller->execute(); } /** * Cancel operation. * * @return boolean True if successful; false otherwise. * * @deprecated 4.0 Use ConfigControllerApplicationCancel instead. */ public function cancel() { try { JLog::add( sprintf('%s() is deprecated. Use ConfigControllerApplicationCancel instead.', __METHOD__), JLog::WARNING, 'deprecated' ); } catch (RuntimeException $exception) { // Informational log only } $controller = new ConfigControllerApplicationCancel; return $controller->execute(); } /** * Method to remove the root property from the configuration. * * @return boolean True on success, false on failure. * * @since 1.5 * @deprecated 4.0 Use ConfigControllerApplicationRemoveroot instead. */ public function removeroot() { try { JLog::add( sprintf('%s() is deprecated. Use ConfigControllerApplicationRemoveroot instead.', __METHOD__), JLog::WARNING, 'deprecated' ); } catch (RuntimeException $exception) { // Informational log only } $controller = new ConfigControllerApplicationRemoveroot; return $controller->execute(); } } PK �!]���-� � component.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_config * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Note: this view is intended only to be opened in a popup * * @since 1.5 * @deprecated 4.0 */ class ConfigControllerComponent extends JControllerLegacy { /** * Class Constructor * * @param array $config An optional associative array of configuration settings. * * @since 1.5 * @deprecated 4.0 */ public function __construct($config = array()) { parent::__construct($config); // Map the apply task to the save method. $this->registerTask('apply', 'save'); } /** * Cancel operation * * @return void * * @since 3.0 * @deprecated 4.0 Use ConfigControllerComponentCancel instead. */ public function cancel() { try { JLog::add( sprintf('%s() is deprecated. Use ConfigControllerComponentCancel instead.', __METHOD__), JLog::WARNING, 'deprecated' ); } catch (RuntimeException $exception) { // Informational log only } $controller = new ConfigControllerComponentCancel; $controller->execute(); } /** * Save the configuration. * * @return boolean True if successful; false otherwise. * * @deprecated 4.0 Use ConfigControllerComponentSave instead. */ public function save() { try { JLog::add( sprintf('%s() is deprecated. Use ConfigControllerComponentSave instead.', __METHOD__), JLog::WARNING, 'deprecated' ); } catch (RuntimeException $exception) { // Informational log only } $controller = new ConfigControllerComponentSave; return $controller->execute(); } } PK &�!]�Ym m style.phpnu &1i� <?php /** * @copyright Copyright (C) 2019. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ // No direct access defined('_JEXEC') or die; use \Slideshowck\CKController; use \Slideshowck\CKFof; class SlideshowckControllerStyle extends CKController { // public function add() { // $this->edit(0); // Redirect to the edit screen. // CKFof::redirect(SLIDESHOWCK_ADMIN_URL . '&view=style&layout=edit&id=0&tmpl=component&layout=modal'); // } // public function edit($id = null, $appendUrl = '') { // parent::edit($id, '&layout=modal&tmpl=component'); // } // // public function copy() { // parent::edit('&layout=modal&tmpl=component'); // } /* * Generate the CSS styles from the settings */ public function save() { // security check if (! CKFof::checkAjaxToken()) { exit(); } $id = $this->input->get('id', 0, 'int'); $model = $this->getModel(); $row = $model->getItem($id); // get data $fields = $this->input->get('fields', '', 'raw'); $name = $this->input->get('name', '', 'string'); if (! $name) $name = 'style' . $id; $layoutcss = trim($this->input->get('layoutcss', '', 'html')); // set data $row->params = $fields; $row->name = $name; $row->layoutcss = $layoutcss; if (! $id = $model->save($row)) { echo "{'result': '0', 'id': '" . $row->id . "', 'message': 'Error : Can not save the Styles !'}"; echo($this->_db->getErrorMsg()); exit; } echo '{"result": "1", "id": "' . $id . '", "message": "Styles saved successfully"}'; exit; } /** * copy an existing page * @return void */ // function copy() { // $model = $this->getModel(); // $cid = $this->input->get('cid', '', 'array'); // $this->input->set('id', (int) $cid[0]); // if (!$model->copy()) { // $msg = \Joomla\CMS\Language\Text::_('CK_COPY_ERROR'); // $type = 'error'; // } else { // $msg = \Joomla\CMS\Language\Text::_('CK_COPY_SUCCESS'); // $type = 'message'; // } // // $this->setRedirect('index.php?option=com_slideshowck&view=styles', $msg, $type); // } /* * Generate the CSS styles from the settings */ public function ajaxRenderCss() { $fields = $this->input->get('fields', '', 'raw'); $fields = json_decode($fields); $customstyles = stripslashes( $this->input->get('customstyles', '', 'string')); $customstyles = json_decode($customstyles); $customcss = $this->input->get('customcss', '', 'html'); $css = $this->renderCss($fields, $customstyles); echo $css . $customcss; exit(); } /* * Render the CSS from the settings */ public function renderCss($fields, $customstyles) { include_once SLIDESHOWCK_PATH . '/helpers/ckstyles.php'; $ckstyles = new \Slideshowck\CKStyles(); $css = $ckstyles->create($fields, $customstyles); return $css; } /** * Ajax method to save the json data into the .mmck file * * @return boolean - true on success for the file creation * */ public function exportParams() { // security check if (! CKFof::checkAjaxToken()) { exit(); } // create a backup file with all fields stored in it $fields = $this->input->get('jsonfields', '', 'string'); $backupfile_path = SLIDESHOWCK_PATH . '/export/exportParamsSlideshowckStyle'. $this->input->get('styleid',0,'int') .'.mmck'; if (file_put_contents($backupfile_path, $fields)) { echo '1'; } else { echo '0'; } exit(); } /** * Ajax method to import the .mmck file into the interface * * @return boolean - true on success for the file creation * */ public function uploadParamsFile() { // security check if (! CKFof::checkAjaxToken()) { exit(); } $file = $this->input->files->get('file', '', 'array'); if (!is_array($file)) exit(); $filename = \Joomla\CMS\Filesystem\File::makeSafe($file['name']); // check if the file exists if (\Joomla\CMS\Filesystem\File::getExt($filename) != 'mmck') { $msg = \Joomla\CMS\Language\Text::_('CK_NOT_MMCK_FILE', true); echo json_encode(array('error'=> $msg)); exit(); } //Set up the source and destination of the file $src = $file['tmp_name']; // check if the file exists if (!$src || !\Joomla\CMS\Filesystem\File::exists($src)) { $msg = \Joomla\CMS\Language\Text::_('CK_FILE_NOT_EXISTS', true); echo json_encode(array('error'=> $msg)); exit(); } // read the file if (!$filecontent = \Joomla\CMS\Filesystem\File::read($src)) { $msg = \Joomla\CMS\Language\Text::_('CK_UNABLE_READ_FILE', true); echo json_encode(array('error'=> $msg)); exit(); } // replace vars to allow data to be moved from another server $filecontent = str_replace("|URIROOT|", \Joomla\CMS\Uri\Uri::root(true), $filecontent); // $filecontent = str_replace("|qq|", '"', $filecontent); // echo $filecontent; echo json_encode(array('data'=> $filecontent)); exit(); } /** * Ajax method to read the fields values from the selected preset * * @return json - * */ function loadPresetFields() { // security check if (! CKFof::checkAjaxToken()) { exit(); } $preset = $this->input->get('preset', '', 'string'); $folder_path = SLIDESHOWCK_MEDIA_PATH . '/presets/'; // load the fields $fields = '{}'; if ( file_exists($folder_path . $preset. '.mmck') ) { $fields = @file_get_contents($folder_path . $preset. '.mmck'); $fields = str_replace('\n','', $fields); // $fields = str_replace("{", "|ob|", $fields); // $fields = str_replace("}", "|cb|", $fields); } else { echo '{"result" : 0, "message" : "File Not found : '.$folder_path . $preset. '.mmck'.'"}'; exit(); } echo '{"result" : 1, "fields" : "'.$fields.'", "customcss" : ""}'; exit(); } }PK &�!]��I�< < template.phpnu &1i� <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 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 class TemplateController extends acymailingController{ var $pkey = 'tempid'; var $table = 'template'; var $aclCat = 'templates'; function load(){ $class = acymailing_get('class.template'); $tempid = acymailing_getVar('int', 'tempid'); if(empty($tempid)) exit; $template = $class->get($tempid); header("Content-type: text/css"); echo $class->buildCSS($template->styles, $template->stylesheet); exit; } function applyareas(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; $class = acymailing_get('class.template'); $tempid = acymailing_getVar('int', 'tempid'); if(empty($tempid)) exit; $template = $class->get($tempid); $class->applyAreas($template->body); $class->save($template); $class->createTemplateFile($tempid); acymailing_enqueueMessage(acymailing_translation('ACYEDITOR_ADDAREAS_DONE')); if(acymailing_isNoTemplate()){ $js = "setTimeout('redirect()',2000); function redirect(){window.top.location.href = '".acymailing_completeLink('template')."'; }"; acymailing_addScript(true, $js); }else{ return $this->listing(); } } function remove(){ if(!$this->isAllowed($this->aclCat, 'delete')) return; acymailing_checkToken(); acymailing_isAdmin() or die('Only from the back-end'); $cids = acymailing_getVar('array', 'cid', array(), ''); $class = acymailing_get('class.template'); $num = $class->delete($cids); acymailing_enqueueMessage(acymailing_translation_sprintf('SUCC_DELETE_ELEMENTS', $num), 'message'); return $this->listing(); } function copy(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; acymailing_checkToken(); $cids = acymailing_getVar('array', 'cid', array(), ''); $time = time(); acymailing_arrayToInteger($cids); $query = 'INSERT IGNORE INTO `#__acymailing_template` (`name`, `description`, `body`, `altbody`, `created`, `published`, `premium`, `ordering`, `namekey`, `styles`, `subject`,`stylesheet`,`fromname`,`fromemail`,`replyname`,`replyemail`,`thumb`,`readmore`,`category`)'; $query .= " SELECT CONCAT('copy_',`name`), `description`, `body`, `altbody`, $time, `published`, 0, `ordering`, CONCAT('$time',`tempid`,`namekey`), `styles`, `subject`,`stylesheet`,`fromname`,`fromemail`,`replyname`,`replyemail`,`thumb`,`readmore`,`category` FROM `#__acymailing_template` WHERE `tempid` IN (".implode(',', $cids).')'; acymailing_query($query); $orderClass = acymailing_get('helper.order'); $orderClass->pkey = 'tempid'; $orderClass->table = 'template'; $orderClass->reOrder(); return $this->listing(); } function store(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; acymailing_checkToken(); acymailing_isAdmin() or die('Only from the back-end'); $templateClass = acymailing_get('class.template'); $status = $templateClass->saveForm(); if($status){ acymailing_enqueueMessage(acymailing_translation('JOOMEXT_SUCC_SAVED'), 'message'); $templateClass->proposeApplyAreas(acymailing_getVar('int', 'tempid')); }else{ acymailing_enqueueMessage(acymailing_translation('ERROR_SAVING'), 'error'); if(!empty($templateClass->errors)){ foreach($templateClass->errors as $oneError){ acymailing_enqueueMessage($oneError, 'error'); } } } } function theme(){ if(!$this->isAllowed($this->aclCat, 'view')) return; acymailing_setVar('layout', 'theme'); return parent::display(); } function upload(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; acymailing_setVar('layout', 'upload'); return parent::display(); } function doupload(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; acymailing_checkToken(); $templateClass = acymailing_get('class.template'); $statusUpload = $templateClass->doupload(); if($statusUpload){ if(!$templateClass->proposedAreas){ acymailing_setNoTemplate(false); $js = "setTimeout('redirect()',2000); function redirect(){window.top.location.href = '".acymailing_completeLink('template', false, true)."'; }"; acymailing_addScript(true, $js); } return; }else{ return $this->upload(); } } function export(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; acymailing_checkToken(); $cids = acymailing_getVar('array', 'cid', array(), ''); acymailing_arrayToInteger($cids); $templateClass = acymailing_get('class.template'); $resExport = $templateClass->export($cids[0]); if(!empty($resExport)) acymailing_enqueueMessage(acymailing_translation_sprintf('ACYTEMPLATE_EXPORTED', '<a href="'.$resExport.'">', '</a>'), 'success'); return $this->listing(); } function test(){ if(!$this->isAllowed($this->aclCat, 'manage')) return; $this->store(); $tempid = acymailing_getCID('tempid'); $test_selection = acymailing_getVar('string', 'test_selection', '', ''); if(empty($tempid) OR empty($test_selection)) return; $mailer = acymailing_get('helper.mailer'); $mailer->report = true; $config = acymailing_config(); $subscriberClass = acymailing_get('class.subscriber'); $userHelper = acymailing_get('helper.user'); acymailing_importPlugin('acymailing'); $receivers = array(); if($test_selection == 'users'){ $receiverEntry = acymailing_getVar('string', 'test_emails', '', ''); if(!empty($receiverEntry)){ if(substr_count($receiverEntry, '@') > 1){ $receivers = explode(',', trim(preg_replace('# +#', '', $receiverEntry))); }else{ $receivers[] = trim($receiverEntry); } } }else{ $gid = acymailing_getVar('int', 'test_group', '-1'); if($gid == -1) return false; if(!ACYMAILING_J16){ $receivers = acymailing_loadResultArray('SELECT '.$this->cmsUserVars->email.' AS email FROM '.acymailing_table($this->cmsUserVars->table, false).' WHERE gid = '.intval($gid)); }else{ $receivers = acymailing_loadResultArray('SELECT u.'.$this->cmsUserVars->email.' AS email FROM '.acymailing_table($this->cmsUserVars->table, false).' AS u JOIN '.acymailing_table('user_usergroup_map', false).' AS ugm ON u.'.$this->cmsUserVars->id.' = ugm.user_id WHERE ugm.group_id = '.intval($gid)); } } if(empty($receivers)){ acymailing_enqueueMessage(acymailing_translation('NO_SUBSCRIBER'), 'notice'); return $this->edit(); } $classTemplate = acymailing_get('class.template'); $myTemplate = $classTemplate->get($tempid); $myTemplate->sendHTML = 1; $myTemplate->mailid = 0; $myTemplate->template = $myTemplate; if(empty($myTemplate->subject)) $myTemplate->subject = $myTemplate->name; if(empty($myTemplate->altBody)) $myTemplate->altbody = $mailer->textVersion($myTemplate->body); acymailing_trigger('acymailing_replacetags', array(&$myTemplate, true)); $myTemplate->body = acymailing_absoluteURL($myTemplate->body); $result = true; foreach($receivers as $receiveremail){ $copy = $myTemplate; $mailer->clearAll(); $mailer->setFrom($copy->fromemail, $copy->fromname); if(!empty($copy->replyemail)){ $replyToName = $config->get('add_names', true) ? $mailer->cleanText($copy->replyname) : ''; $mailer->AddReplyTo($mailer->cleanText($copy->replyemail), $replyToName); } $receiver = $subscriberClass->get($receiveremail); if(empty($receiver->subid)){ if($userHelper->validEmail($receiveremail)){ $newUser = new stdClass(); $newUser->email = $receiveremail; $subscriberClass->sendConf = false; $subid = $subscriberClass->save($newUser); $receiver = $subscriberClass->get($subid); } if(empty($receiver->subid)) continue; } $addedName = $config->get('add_names', true) ? $mailer->cleanText($receiver->name) : ''; $mailer->AddAddress($mailer->cleanText($receiver->email), $addedName); acymailing_trigger('acymailing_replaceusertags', array(&$copy, &$receiver, true)); $mailer->isHTML(true); $mailer->Body = $copy->body; $mailer->Subject = $copy->subject; if($config->get('multiple_part', false)){ $mailer->AltBody = $copy->altbody; } $mailer->send(); } return $this->edit(); } } PK &�!]�Yr�� � styles.phpnu &1i� <?php /** * @name Slider CK * @package com_slideshowck * @copyright Copyright (C) 2016. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ // No direct access. defined('_JEXEC') or die; jimport('joomla.application.component.controlleradmin'); /** * Pages list controller class. */ class SlideshowckControllerStyles extends \Joomla\CMS\MVC\Controller\AdminController { /** * Proxy for getModel. * @since 1.6 */ public function getModel($name = 'style', $prefix = 'SlideshowckModel', $config = array()) { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } }PK \�!])��WF&