File manager - Edit - /home/capoccitel/www/wp-admin/view.html.php.tar
Back
home/capoccitel/www/components/com_sppagebuilder/views/form/view.html.php 0000705 00000005415 15242221200 0023016 0 ustar 00 <?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined ('_JEXEC') or die ('Restricted access'); // import Joomla view library jimport('joomla.application.component.view'); if(!class_exists('SppagebuilderHelperSite')) { require_once JPATH_ROOT . '/components/com_sppagebuilder/helpers/helper.php'; } // if (!class_exists('SppagebuilderModelPage')) { // require_once JPATH_ROOT . '/components/com_sppagebuilder/models/page.php'; // } class SppagebuilderViewForm extends JViewLegacy { protected $form; protected $item; function display( $tpl = null ) { $user = JFactory::getUser(); $app = JFactory::getApplication(); $this->item = $this->get('Item'); $this->form = $this->get('Form'); if ( !$user->id ) { $uri = JFactory::getURI(); $pageURL = $uri->toString(); $return_url = base64_encode($pageURL); $joomlaLoginUrl = 'index.php?option=com_users&view=login&return=' . $return_url; $app->redirect(JRoute::_($joomlaLoginUrl, false), JText::_('JERROR_ALERTNOAUTHOR'), 'message'); return false; } $input = JFactory::getApplication()->input; $pageid = $input->get('id', '', 'INT'); $item_info = SppagebuilderModelPage::getPageInfoById($pageid); $authorised = $user->authorise('core.edit', 'com_sppagebuilder') || $user->authorise('core.edit', 'com_sppagebuilder.page.' . $pageid) || ($user->authorise('core.edit.own', 'com_sppagebuilder') && ($user->id == $item_info->created_by)); if ($authorised !== true) { $app->enqueueMessage(JText::_('COM_SPPAGEBUILDER_ERROR_EDIT_PERMISSION'), 'error'); $app->setHeader('status', 403, true); return false; } // Check for errors. if (count($errors = (array) $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } $this->_prepareDocument($this->item->title); SppagebuilderHelperSite::loadLanguage(); parent::display($tpl); } protected function _prepareDocument($title = '') { $config = JFactory::getConfig(); $app = JFactory::getApplication(); $doc = JFactory::getDocument(); $menus = $app->getMenu(); $menu = $menus->getActive(); if(isset($menu)) { if($menu->params->get('page_title', '')) { $title = $menu->params->get('page_title'); } else { $title = $menu->title; } } //Include Site title $sitetitle = $title; if($config->get('sitename_pagetitles')==2) { $sitetitle = JText::sprintf('JPAGETITLE', $sitetitle, $app->get('sitename')); } elseif ($config->get('sitename_pagetitles')==1) { $sitetitle = JText::sprintf('JPAGETITLE', $app->get('sitename'), $sitetitle); } $doc->setTitle($sitetitle); } } home/capoccitel/www/administrator/components/com_tlptestimonial/views/settings/view.html.php 0000705 00000005372 15242241745 0027037 0 ustar 00 <?php /** * @version 1.0.0 * @package com_tlptestimonial * @copyright Copyright (C) 2013. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author TechLabPro <techlabpro@gmail.com> - http://www.techlabpro.com */ // No direct access defined('_JEXEC') or die; jimport('joomla.application.component.view'); /** * View class for a list of tlptestimonial. */ class TlptestimonialViewSettings extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } tlptestimonialHelper::addSubmenu('settings'); $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/tlptestimonial.php'; $state = $this->get('State'); $canDo = tlptestimonialHelper::getActions($state->get('filter.category_id')); JToolBarHelper::title(JText::_('COM_TLPTESTIMONIAL_TITLE_SETTINGS'), 'teams.png'); //Check if the form exists before showing the add/edit buttons $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/setting'; if (file_exists($formPath)) { if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('team.edit', 'JTOOLBAR_EDIT'); } } if ($canDo->get('core.edit.state')) { } //Show trash and delete for components that uses the state field if (isset($this->items[0]->state)) { } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_tlptestimonial'); } //Set sidebar action - New in 3.0 JHtmlSidebar::setAction('index.php?option=com_tlptestimonial&view=settings'); $this->extra_sidebar = ''; JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), "value", "text", $this->state->get('filter.state'), true) ); } protected function getSortFields() { return array( 'a.id' => JText::_('JGRID_HEADING_ID'), 'a.state' => JText::_('JSTATUS'), 'a.created_by' => JText::_('COM_TLPTESTIMONIAL_TEAMS_CREATED_BY'), ); } } home/capoccitel/www/administrator/components/com_tlptestimonial/views/category/view.html.php 0000705 00000004712 15242242013 0026776 0 ustar 00 <?php /** * @version 1.0.0 * @package com_tlptestimonial * @copyright Copyright (C) 2014. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Techlabpro <techlabpro@gmail.com> - http://www.techlabpro.com */ // No direct access defined('_JEXEC') or die; jimport('joomla.application.component.view'); /** * View to edit */ class TlptestimonialViewCategory extends JViewLegacy { protected $state; protected $item; protected $form; /** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $isNew = ($this->item->id == 0); if (isset($this->item->checked_out)) { $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); } else { $checkedOut = false; } $canDo = TlptestimonialHelper::getActions(); JToolBarHelper::title(JText::_('COM_TLPTESTIMONIAL_TITLE_CATEGORY'), 'category.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.create')))) { JToolBarHelper::apply('category.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('category.save', 'JTOOLBAR_SAVE'); } if (!$checkedOut && ($canDo->get('core.create'))) { JToolBarHelper::custom('category.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::custom('category.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if (empty($this->item->id)) { JToolBarHelper::cancel('category.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE'); } } } home/capoccitel/www/administrator/components/com_contact/views/contact/view.html.php 0000604 00000010442 15242257524 0025207 0 ustar 00 <?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; /** * View to edit a contact. * * @since 1.6 */ class ContactViewContact extends JViewLegacy { /** * The JForm object * * @var JForm */ protected $form; /** * The active item * * @var object */ protected $item; /** * The model state * * @var object */ protected $state; /** * Display the view. * * @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. */ public function display($tpl = null) { // Initialise variables. $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } // If we are forcing a language in modal (used for associations). if ($this->getLayout() === 'modal' && $forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'cmd')) { // Set the language field to the forcedLanguage and disable changing it. $this->form->setValue('language', null, $forcedLanguage); $this->form->setFieldAttribute('language', 'readonly', 'true'); // Only allow to select categories with All language or with the forced language. $this->form->setFieldAttribute('catid', 'language', '*,' . $forcedLanguage); // Only allow to select tags with All language or with the forced language. $this->form->setFieldAttribute('tags', 'language', '*,' . $forcedLanguage); } $this->addToolbar(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->id; $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId); // Since we don't track these assets at the item level, use the category id. $canDo = JHelperContent::getActions('com_contact', 'category', $this->item->catid); JToolbarHelper::title($isNew ? JText::_('COM_CONTACT_MANAGER_CONTACT_NEW') : JText::_('COM_CONTACT_MANAGER_CONTACT_EDIT'), 'address contact'); // Build the actions for new and existing records. if ($isNew) { // For new records, check the create permission. if ($isNew && (count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0)) { JToolbarHelper::apply('contact.apply'); JToolbarHelper::save('contact.save'); JToolbarHelper::save2new('contact.save2new'); } JToolbarHelper::cancel('contact.cancel'); } else { // Since it's an existing record, check the edit permission, or fall back to edit own if the owner. $itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId); // Can't save the record if it's checked out and editable if (!$checkedOut && $itemEditable) { JToolbarHelper::apply('contact.apply'); JToolbarHelper::save('contact.save'); // We can save this record, but check the create permission to see if we can return to make a new one. if ($canDo->get('core.create')) { JToolbarHelper::save2new('contact.save2new'); } } // If checked out, we can still save if ($canDo->get('core.create')) { JToolbarHelper::save2copy('contact.save2copy'); } if (JComponentHelper::isEnabled('com_contenthistory') && $this->state->params->get('save_history', 0) && $itemEditable) { JToolbarHelper::versions('com_contact.contact', $this->item->id); } if (JLanguageAssociations::isEnabled() && JComponentHelper::isEnabled('com_associations')) { JToolbarHelper::custom('contact.editAssociations', 'contract', 'contract', 'JTOOLBAR_ASSOCIATIONS', false, false); } JToolbarHelper::cancel('contact.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS_EDIT'); } }
| ver. 1.6 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings