%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/old/administrator/components/com_sigpro/controllers/ |
Upload File : |
<?php /** * @version $Id$ * @package Simple Image Gallery Pro * @author JoomlaWorks - http://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved. * @license http://www.joomlaworks.net/license */ // no direct access defined('_JEXEC') or die ; class SigProControllerSettings extends SigProController { public function apply() { $response = $this->saveSettings(); $this->setRedirect('index.php?option=com_sigpro&view=settings', $response->message, $response->type); } public function save() { $response = $this->saveSettings(); $this->setRedirect('index.php?option=com_sigpro', $response->message, $response->type); } protected function saveSettings() { if (version_compare(JVERSION, '2.5.0', 'ge')) { $this->checkPermissions(); JRequest::checkToken() or jexit('Invalid Token'); $data = JRequest::getVar('jform', array(), 'post', 'array'); $id = JRequest::getInt('id'); $option = JRequest::getCmd('component'); // Joomla! 3.2 compatibility if (version_compare(JVERSION, '3.2', 'ge')) { require_once JPATH_SITE.'/components/com_config/model/cms.php'; require_once JPATH_SITE.'/components/com_config/model/form.php'; } // Validate the form JForm::addFormPath(JPATH_ADMINISTRATOR.'/components/'.$option); $form = JForm::getInstance('com_sigpro.settings', 'config', array( 'control' => 'jform', 'load_data' => $loadData ), false, '/config'); JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_config/models'); $model = JModelLegacy::getInstance('Component', 'ConfigModel'); $params = $model->validate($form, $data); if ($params === false) { $errors = $model->getErrors(); $response = new stdClass; $response->message = $errors[0] instanceof Exception ? $errors[0]->getMessage() : $errors[0]; $response->type = 'warning'; return $response; } $data = array( 'params' => $params, 'id' => $id, 'option' => $option ); } else { JRequest::checkToken() or jexit('Invalid Token'); $data = JRequest::get('post'); } $model = SigProModel::getInstance('Settings', 'SigProModel'); $model->setState('option', 'com_sigpro'); $model->setState('data', $data); $response = new stdClass; if ($model->save()) { $response->message = JText::_('COM_SIGPRO_SETTINGS_SAVED'); $response->type = 'message'; } else { $response->message = $model->getError(); $response->type = 'error'; } return $response; } public function cancel() { $this->setRedirect('index.php?option=com_sigpro'); } protected function checkPermissions() { if (version_compare(JVERSION, '2.5.0', 'ge')) { if (!JFactory::getUser()->authorise('core.admin', 'com_sigpro')) { JFactory::getApplication()->redirect('index.php?option=com_sigpro', JText::_('JERROR_ALERTNOAUTHOR')); return; } } } }