Файловый менеджер - Редактировать - /var/www/iplanru/data/www/i-plan.ru/administrator/components/com_pay/views/discount/view.html.php
Назад
<?php // No direct access defined( '_JEXEC' ) or die; /** * View for edit current element * @author kirdinyuri */ class PayViewDiscount extends JViewLegacy { protected $form; protected $item; protected $user; /** * Method to display the current pattern * @param String $tpl */ public function display( $tpl = null ) { $this->form = $this->get( 'Form' ); $this->item = $this->get( 'Item' ); $this->user = JFactory::getUser(); if ( count( $errors = $this->get( 'Errors' ) ) ) { JError::raiseError( 500, implode( '\n', $errors ) ); return false; } $this->loadHelper( 'pay' ); $this->canDo = payHelper::getActions( 'discount' ); $this->_setToolBar(); parent::display( $tpl ); } /** * Method to display the toolbar */ protected function _setToolBar() { JFactory::getApplication()->input->set( 'hidemainmenu', true ); $isNew = ( $this->item->id == 0 ); $canDo = payHelper::getActions( 'discount', $this->item->id ); JToolBarHelper::title( JText::_( 'COM_PAY' ) . ': <small>[ ' . ( $isNew ? JText::_( 'JTOOLBAR_NEW' ) : JText::_( 'JTOOLBAR_EDIT' ) ) . ']</small>' ); // For new records, check the create permission. if ( $isNew && ( count( $this->user->getAuthorisedCategories( 'com_pay', 'core.create' ) ) > 0 ) ) { JToolBarHelper::apply( 'discount.apply' ); JToolBarHelper::save( 'discount.save' ); JToolBarHelper::save2new( 'discount.save2new' ); JToolBarHelper::cancel( 'discount.cancel' ); } else { // Can't save the record if it's checked out. // Since it's an existing record, check the edit permission, or fall back to edit own if the owner. if ( $canDo->get( 'core.edit' ) || ( $canDo->get( 'core.edit.own' ) && $this->item->created_by == $this->user->get( 'id' ) ) ) { JToolBarHelper::apply( 'discount.apply' ); JToolBarHelper::save( 'discount.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( 'discount.save2new' ); } } // If checked out, we can still save if ( $canDo->get( 'core.create' ) ) { JToolBarHelper::save2copy( 'discount.save2copy' ); } JToolBarHelper::cancel( 'discount.cancel', 'JTOOLBAR_CLOSE' ); } } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45-1~dotdeb+6.1 | Генерация страницы: 0.03 |
proxy
|
phpinfo
|
Настройка