Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /AppServ/www/news/tmp/install_53214838987c8/admin/views/timage/ |
Upload File : |
<?php /*------------------------------------------------------------------------ # Timage # ------------------------------------------------------------------------ # author Trust Elegance # copyright Copyright (C) 2012 trustelegance.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.trustelegance.com # Technical Support: http://http://www.trustelegance.com/index.php?option=com_rsform&view=rsform&Itemid=55 -------------------------------------------------------------------------*/ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.view'); class TimageViewTimage extends JView { public function display($tpl = null) { $form = $this->get('Form'); $item = $this->get('Item'); $script = $this->get('Script'); if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } $this->form = $form; $this->item = $item; $this->script = $script; $this->addToolBar(); parent::display($tpl); $this->setDocument(); } protected function addToolBar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->id; $isNew = $this->item->id == 0; $canDo = TimageHelper::getActions($this->item->id); JToolBarHelper::title($isNew ? JText::_('COM_TIMAGE_MANAGER_TIMAGE_NEW') : JText::_('COM_TIMAGE_MANAGER_TIMAGE_EDIT'), 'timage'); if ($isNew) { if ($canDo->get('core.create')) { JToolBarHelper::apply('timage.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('timage.save', 'JTOOLBAR_SAVE'); JToolBarHelper::custom('timage.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } JToolBarHelper::cancel('timage.cancel', 'JTOOLBAR_CANCEL'); } else { if ($canDo->get('core.edit')) { JToolBarHelper::apply('timage.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('timage.save', 'JTOOLBAR_SAVE'); if ($canDo->get('core.create')) { JToolBarHelper::custom('timage.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } } if ($canDo->get('core.create')) { JToolBarHelper::custom('timage.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } JToolBarHelper::cancel('timage.cancel', 'JTOOLBAR_CLOSE'); } } protected function setDocument() { $isNew = $this->item->id == 0; $document = JFactory::getDocument(); $document->setTitle($isNew ? JText::_('COM_TIMAGE_TIMAGE_CREATING') : JText::_('COM_TIMAGE_TIMAGE_EDITING')); $document->addScript(JURI::root() . $this->script); $document->addScript(JURI::root() . "/administrator/components/com_timage/views/timage/submitbutton.js"); JText::script('COM_TIMAGE_TIMAGE_ERROR_UNACCEPTABLE'); } } ?>