/** * View display method * @return void */ public function display($tpl = null) { $this->about = baformsHelper::aboutUs(); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Set the toolbar $this->addToolBar(); baformsHelper::addSubmenu('forms'); $this->sidebar = JHtmlSidebar::render(); foreach ($this->items as &$item) { $item->order_up = true; $item->order_dn = true; } // Display the template parent::display($tpl); }
public function updateBaforms() { $target = $_POST['target']; $config = JFactory::getConfig(); $path = $config->get('tmp_path') . '/com_baforms.zip'; copy($target, $path); JArchive::extract($path, $config->get('tmp_path') . '/com_baforms'); $installer = JInstaller::getInstance(); $result = $installer->update($config->get('tmp_path') . '/com_baforms'); JFile::delete($path); JFolder::delete($config->get('tmp_path') . '/com_baforms'); $verion = baformsHelper::aboutUs(); if ($result) { echo new JResponseJson($result, $verion->version); } else { echo new JResponseJson($result, '', true); } jexit(); }
/** * View display method * @return void */ public function display($tpl = null) { $input = JFactory::getApplication()->input; $print = $input->get('print'); if (!empty($print)) { $this->print = $this->getPrintData($print); $this->printTitle = $this->getPrintTitle($print); $this->setLayout('print'); } else { $this->about = baformsHelper::aboutUs(); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->addToolBar(); baformsHelper::addSubmenu('Submissions'); $this->sidebar = JHtmlSidebar::render(); foreach ($this->items as &$item) { $item->order_up = true; $item->order_dn = true; } } // Display the template parent::display($tpl); }