Файловый менеджер - Редактировать - /home/lmsyaran/public_html/administrator/components/com_invoices/controllers/templateitem.php
Назад
<?php /*------------------------------------------------------------------------ # com_invoices - Invoice Manager for Joomla # ------------------------------------------------------------------------ # author Germinal Camps # copyright Copyright (C) 2012 - 2016 JoomlaThat.com. All Rights Reserved. # @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.joomlathat.com # Technical Support: Forum - http://www.joomlathat.com/support -------------------------------------------------------------------------*/ //no direct access defined('_JEXEC') or die('Restricted access.'); class TemplateitemsControllerTemplateitem extends TemplateitemsController { function __construct() { parent::__construct(); // Register Extra tasks $this->registerTask( 'add' , 'edit' ); $this->registerTask( 'apply', 'save' ); } function edit() { $this->input->set( 'view', 'templateitem' ); $this->input->set( 'layout', 'form' ); $this->input->set('hidemainmenu', 1); parent::display(); } function save() { $model = $this->getModel('templateitem'); if ($model->store($post)) { $msg = JText::_( 'PRODUCT_SAVED' ); } else { $msg = JText::_( 'ERROR_SAVING_PRODUCT' ); } $task = $this->input->getCmd( 'task' ); $id = $this->input->getInt('id'); switch ($task) { case 'apply': $link = 'index.php?option=com_invoices&controller=templateitem&task=edit&cid[]='. $id ; break; case 'save': default: $link = 'index.php?option=com_invoices&controller=templateitems'; break; } $this->setRedirect($link, $msg); } function remove() { //this function is called only from the album form template $album_id = $this->input->getVar('id'); $model = $this->getModel('templateitem'); if(!$model->delete()) { $msg = JText::_( 'ERROR_DELETING_PRODUCTS' ); } else { $msg = JText::_( 'PRODUCTS_DELETED' ); } $this->setRedirect( 'index.php?option=com_invoices&controller=templateitems', $msg ); } function cancel() { $msg = JText::_( 'OPERATION_CANCELLED' ); $this->setRedirect( 'index.php?option=com_invoices&controller=templateitems', $msg ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка