%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_phocadownload/controllers/ |
Upload File : |
<?php /* * @package Joomla 1.5 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * * @component Phoca Component * @copyright Copyright (C) Jan Pavelka www.phoca.cz * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL */ defined('_JEXEC') or die; jimport('joomla.application.component.controllerform'); class PhocaDownloadCpControllerPhocaDownloadLayout extends JControllerForm { protected $option = 'com_phocadownload'; function __construct($config=array()) { parent::__construct($config); } public function execute($task) { parent::execute($task); // Clear the component's cache if ($task != 'display') { $cache = JFactory::getCache('com_phocadownload'); $cache->clean(); } } protected function allowAdd($data = array()) { $user = JFactory::getUser(); $allow = null; $allow = $user->authorise('core.create', 'com_phocadownload'); if ($allow === null) { return parent::allowAdd($data); } else { return $allow; } } protected function allowEdit($data = array(), $key = 'id') { $user = JFactory::getUser(); $allow = null; $allow = $user->authorise('core.edit', 'com_phocadownload'); if ($allow === null) { return parent::allowEdit($data, $key); } else { return $allow; } } public function back($key = null) { JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); // Initialise variables. $app = JFactory::getApplication(); $model = $this->getModel(); $table = $model->getTable(); $checkin = property_exists($table, 'checked_out'); $context = "$this->option.edit.$this->context"; if (empty($key)) { $key = $table->getKeyName(); } $recordId = JRequest::getInt($key); // Attempt to check-in the current record. if ($recordId) { // Check we are holding the id in the edit list. if (!$this->checkEditId($context, $recordId)) { // Somehow the person just went to the form - we don't allow that. $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId)); $this->setMessage($this->getError(), 'error'); $this->setRedirect(JRoute::_('index.php?option=' . $this->option, false)); return false; } if ($checkin) { if ($model->checkin($recordId) === false) { // Check-in failed, go back to the record and display a notice. $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError())); $this->setMessage($this->getError(), 'error'); $this->setRedirect(JRoute::_('index.php?option=' . $this->option, false)); return false; } } } // Clean the session data and redirect. $this->releaseEditId($context, $recordId); $app->setUserState($context . '.data', null); $this->setRedirect(JRoute::_('index.php?option=' . $this->option, false)); return true; } }