Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/templates.zip
Назад
PK q�!]�<��� � save.phpnu &1i� <?php /** * @package Joomla.Site * @subpackage com_config * * @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; /** * Save Controller for global configuration * * @since 3.2 */ class ConfigControllerTemplatesSave extends JControllerBase { /** * Method to save global configuration. * * @return boolean True on success. * * @since 3.2 */ public function execute() { // Check for request forgeries. if (!JSession::checkToken()) { JFactory::getApplication()->redirect('index.php', JText::_('JINVALID_TOKEN')); } // Check if the user is authorized to do this. if (!JFactory::getUser()->authorise('core.admin')) { JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR')); return; } // Set FTP credentials, if given. JClientHelper::setCredentialsFromRequest('ftp'); $app = JFactory::getApplication(); // Access backend com_templates JLoader::register('TemplatesControllerStyle', JPATH_ADMINISTRATOR . '/components/com_templates/controllers/style.php'); JLoader::register('TemplatesModelStyle', JPATH_ADMINISTRATOR . '/components/com_templates/models/style.php'); JLoader::register('TemplatesTableStyle', JPATH_ADMINISTRATOR . '/components/com_templates/tables/style.php'); $controllerClass = new TemplatesControllerStyle; // Get a document object $document = JFactory::getDocument(); // Set backend required params $document->setType('json'); $this->input->set('id', $app->getTemplate(true)->id); // Execute backend controller $return = $controllerClass->save(); // Reset params back after requesting from service $document->setType('html'); // Check the return value. if ($return === false) { // Save the data in the session. $app->setUserState('com_config.config.global.data', $data); // Save failed, go back to the screen and display a notice. $message = JText::sprintf('JERROR_SAVE_FAILED'); $app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.templates', false), $message, 'error'); return false; } // Set the success message. $message = JText::_('COM_CONFIG_SAVE_SUCCESS'); // Redirect back to com_config display $app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.templates', false), $message); return true; } } PK q�!]�'��B B display.phpnu &1i� <?php /** * @package Joomla.Site * @subpackage com_config * * @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; /** * Display Controller for global configuration * * @since 3.2 */ class ConfigControllerTemplatesDisplay extends ConfigControllerDisplay { /** * Method to display global configuration. * * @return boolean True on success, false on failure. * * @since 3.2 */ public function execute() { // Get the application $app = $this->getApplication(); // Get the document object. $document = JFactory::getDocument(); $viewName = $this->input->getWord('view', 'templates'); $viewFormat = $document->getType(); $layoutName = $this->input->getWord('layout', 'default'); // Access backend com_config JLoader::register('TemplatesController', JPATH_ADMINISTRATOR . '/components/com_templates/controller.php'); JLoader::register('TemplatesViewStyle', JPATH_ADMINISTRATOR . '/components/com_templates/views/style/view.json.php'); JLoader::register('TemplatesModelStyle', JPATH_ADMINISTRATOR . '/components/com_templates/models/style.php'); $displayClass = new TemplatesController; // Set backend required params $document->setType('json'); $this->input->set('id', $app->getTemplate(true)->id); // Execute backend controller $serviceData = json_decode($displayClass->display(), true); // Reset params back after requesting from service $document->setType('html'); $this->input->set('view', $viewName); // Register the layout paths for the view $paths = new SplPriorityQueue; $paths->insert(JPATH_COMPONENT . '/view/' . $viewName . '/tmpl', 'normal'); $viewClass = 'ConfigView' . ucfirst($viewName) . ucfirst($viewFormat); $modelClass = 'ConfigModel' . ucfirst($viewName); if (class_exists($viewClass)) { if ($viewName !== 'close') { $model = new $modelClass; // Access check. if (!JFactory::getUser()->authorise('core.admin', $model->getState('component.option'))) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); return; } } $view = new $viewClass($model, $paths); $view->setLayout($layoutName); // Push document object into the view. $view->document = $document; // Load form and bind data $form = $model->getForm(); if ($form) { $form->bind($serviceData); } // Set form and data to the view $view->form = &$form; // Render view. echo $view->render(); } return true; } } PK �!](𰂜 � tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @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; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); $user = JFactory::getUser(); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=templates'); ?>" method="post" name="adminForm" id="adminForm"> <?php if (!empty($this->sidebar)) : ?> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <?php else : ?> <div id="j-main-container"> <?php endif; ?> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('selectorFieldName' => 'client_id'))); ?> <?php if ($this->total > 0) : ?> <table class="table table-striped" id="template-mgr"> <thead> <tr> <th class="col1template hidden-phone" width="20%"> <?php echo JText::_('COM_TEMPLATES_HEADING_IMAGE'); ?> </th> <th width="30%"> <?php echo JHtml::_('searchtools.sort', 'COM_TEMPLATES_HEADING_TEMPLATE', 'a.element', $listDirn, $listOrder); ?> </th> <th width="10%" class="hidden-phone"> <?php echo JText::_('JVERSION'); ?> </th> <th width="15%" class="hidden-phone"> <?php echo JText::_('JDATE'); ?> </th> <th width="25%" class="hidden-phone"> <?php echo JText::_('JAUTHOR'); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="5"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php foreach ($this->items as $i => $item) : ?> <tr class="row<?php echo $i % 2; ?>"> <td class="center hidden-phone"> <?php echo JHtml::_('templates.thumb', $item->element, $item->client_id); ?> <?php echo JHtml::_('templates.thumbModal', $item->element, $item->client_id); ?> </td> <td class="template-name"> <a href="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '&file=' . $this->file); ?>"> <?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_DETAILS', ucfirst($item->name)); ?></a> <div> <?php if ($this->preview && $item->client_id == '0') : ?> <a href="<?php echo JRoute::_(JUri::root() . 'index.php?tp=1&template=' . $item->element); ?>" target="_blank"> <?php echo JText::_('COM_TEMPLATES_TEMPLATE_PREVIEW'); ?> </a> <?php elseif ($item->client_id == '1') : ?> <?php echo JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW_ADMIN'); ?> <?php else : ?> <span class="hasTooltip" title="<?php echo JHtml::_('tooltipText', 'COM_TEMPLATES_TEMPLATE_NO_PREVIEW_DESC'); ?>"><?php echo JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW'); ?></span> <?php endif; ?> </div> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->xmldata->get('version')); ?> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->xmldata->get('creationDate')); ?> </td> <td class="hidden-phone"> <?php if ($author = $item->xmldata->get('author')) : ?> <div><?php echo $this->escape($author); ?></div> <?php else : ?> — <?php endif; ?> <?php if ($email = $item->xmldata->get('authorEmail')) : ?> <div><?php echo $this->escape($email); ?></div> <?php endif; ?> <?php if ($url = $item->xmldata->get('authorUrl')) : ?> <div><a href="<?php echo $this->escape($url); ?>"><?php echo $this->escape($url); ?></a></div> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </div> </form> PK �!]��r � � tmpl/default.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_TEMPLATES_TEMPLATES_VIEW_DEFAULT_TITLE"> <message> <![CDATA[COM_TEMPLATES_TEMPLATES_VIEW_DEFAULT_DESC]]> </message> </layout> </metadata> PK �!]S3Tz z tmpl/default_options.phpnu &1i� <?php /** * @package Joomla.Site * @subpackage com_config * * @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; // Load chosen.css JHtml::_('formbehavior.chosen', 'select'); ?> <?php $fieldSets = $this->form->getFieldsets('params'); ?> <legend><?php echo JText::_('COM_CONFIG_TEMPLATE_SETTINGS'); ?></legend> <?php // Search for com_config field set if (!empty($fieldSets['com_config'])) : ?> <fieldset class="form-horizontal"> <?php echo $this->form->renderFieldset('com_config'); ?> </fieldset> <?php else : // Fall-back to display all in params foreach ($fieldSets as $name => $fieldSet) : $label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_CONFIG_' . $name . '_FIELDSET_LABEL'; if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '<p class="tip">' . $this->escape(JText::_($fieldSet->description)) . '</p>'; endif; ?> <fieldset class="form-horizontal"> <?php echo $this->form->renderFieldset($name); ?> </fieldset> <?php endforeach; endif; PK �!]+V'Ƙ � html.phpnu &1i� <?php /** * @package Joomla.Site * @subpackage com_config * * @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; /** * View to edit a template style. * * @since 3.2 */ class ConfigViewTemplatesHtml extends ConfigViewCmsHtml { public $item; public $form; /** * Method to render the view. * * @return string The rendered view. * * @since 3.2 */ public function render() { $user = JFactory::getUser(); $this->userIsSuperAdmin = $user->authorise('core.admin'); return parent::render(); } } PK ՠ!]��� � view.html.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @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; /** * View class for a list of template styles. * * @since 1.6 */ class TemplatesViewTemplates extends JViewLegacy { /** * @var array * @since 1.6 */ protected $items; /** * @var object * @since 1.6 */ protected $pagination; /** * @var object * @since 1.6 */ protected $state; /** * @var string * @since 3.2 */ protected $file; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->total = $this->get('Total'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); $this->preview = JComponentHelper::getParams('com_templates')->get('template_positions_display'); $this->file = base64_encode('home'); TemplatesHelper::addSubmenu('templates'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_templates'); // Set the title. if ((int) $this->get('State')->get('client_id') === 1) { JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_TEMPLATES_ADMIN'), 'eye thememanager'); } else { JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_TEMPLATES_SITE'), 'eye thememanager'); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences('com_templates'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES'); JHtmlSidebar::setAction('index.php?option=com_templates&view=templates'); $this->sidebar = JHtmlSidebar::render(); } } PK q�!]�<��� � save.phpnu &1i� PK q�!]�'��B B � display.phpnu &1i� PK �!](𰂜 � ` tmpl/default.phpnu &1i� PK �!]��r � � <% tmpl/default.xmlnu &1i� PK �!]S3Tz z T&