public function viewDetails() { global $tab, $cookie, $currentIndex; $currentIndex = $_SERVER['SCRIPT_NAME'] . (($controller = Tools::getValue('controller')) ? '?controller=' . $controller : ''); $url = $currentIndex . '&token=' . Tools::getAdminTokenLite('AdminMoussiqFree'); $obj = $this->loadObject(true); if (Tools::isSubmit('csvGen')) { require_once dirname(__FILE__) . '/classes/Export.php'; if (!Export::checkDir(dirname(__FILE__) . '/export/')) { echo Module::displayError($this->l('Your export directory is not writeable')); } else { if (is_object($exportEngine = Export::setExportEngine($obj->export_engine, $obj->id))) { $exportEngine->startImport(); } } } echo ' <p style="margin-bottom: 1em;"> <a href="' . $url . '"><img src="../img/admin/arrow2.gif" /> ' . $this->l('Back to services list') . '</a> </p>'; $this->exporterView($obj); echo ' <p style="margin-top: 1em;"> <a href="' . $url . '"><img src="../img/admin/arrow2.gif" /> ' . $this->l('Back to services list') . '</a> </p>'; }
public function update($nullValues = true) { if (parent::update($nullValues)) { $this->updateCategories(); require_once dirname(__FILE__) . '/Export.php'; if (is_object($engine = Export::setExportEngine($this->name, $this->id))) { $engine->startImport(); } return true; } return false; }