/** * Parse */ protected function parse() { parent::parse(); // form info $this->tpl->assign('name', $this->record['name']); $this->tpl->assign('formId', $this->record['id']); // sent info $this->tpl->assign('id', $this->data['id']); $this->tpl->assign('sentOn', $this->data['sent_on']); // init $data = array(); // prepare data foreach ($this->data['fields'] as $field) { // implode arrays if (is_array($field['value'])) { $field['value'] = implode(', ', $field['value']); } else { $field['value'] = nl2br($field['value']); } // add to data $data[] = $field; } // assign $this->tpl->assign('data', $data); $this->tpl->assign('filter', $this->filter); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // set category id $this->categoryId = SpoonFilter::getGetValue('category', null, null, 'int'); if ($this->categoryId == 0) { $this->categoryId = null; } else { // get category $this->category = BackendBlogModel::getCategory($this->categoryId); // reset if (empty($this->category)) { // reset GET to trick Spoon $_GET['category'] = null; // reset $this->categoryId = null; } } // load datagrid $this->loadDataGrids(); // parse page $this->parse(); // display the page $this->display(); }
/** * Parse the correct messages into the template */ protected function parse() { parent::parse(); // grab the error-type from the parameters $errorType = $this->getParameter('type'); // set correct headers switch ($errorType) { case 'module-not-allowed': case 'action-not-allowed': SpoonHTTP::setHeadersByCode(403); break; case 'not-found': SpoonHTTP::setHeadersByCode(404); break; } // querystring provided? if ($this->getParameter('querystring') !== null) { // split into file and parameters $chunks = explode('?', $this->getParameter('querystring')); // get extension $extension = SpoonFile::getExtension($chunks[0]); // if the file has an extension it is a non-existing-file if ($extension != '' && $extension != $chunks[0]) { // set correct headers SpoonHTTP::setHeadersByCode(404); // give a nice error, so we can detect which file is missing echo 'Requested file (' . htmlspecialchars($this->getParameter('querystring')) . ') not found.'; // stop script execution exit; } } // assign the correct message into the template $this->tpl->assign('message', BL::err(SpoonFilter::toCamelCase(htmlspecialchars($errorType), '-'))); }
/** * Parse all datagrids */ protected function parse() { parent::parse(); // parse the datagrid $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false); // parse mailing record $this->tpl->assign('mailing', $this->mailing); }
/** * Parse the action into the template */ public function parse() { parent::parse(); // assign the interface language ourself, because it won't be assigned automagically $this->tpl->assign('INTERFACE_LANGUAGE', BackendLanguage::getInterfaceLanguage()); $this->frm->parse($this->tpl); $this->frmForgotPassword->parse($this->tpl); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // add highchart javascript $this->header->addJS('highcharts.js'); // set dates $this->setDates(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // parse the error $this->parse(); // display the page $this->display(); }
/** * Parse the dataGrids and the reports */ protected function parse() { parent::parse(); // parse dataGrids if (!empty($this->dataGrids)) { $this->tpl->assign('dataGrids', $this->dataGrids); } $this->tpl->assign('emptyDatagrid', $this->emptyDatagrid->getContent()); }
/** * Parse the datagrid */ protected function parse() { parent::parse(); $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false); // get settings $settings = BackendModel::getModuleSettings(); // assign to template $this->tpl->assign('items', BackendLocationModel::getAll()); $this->tpl->assign('settings', $settings['location']); }
/** * Execute the action. * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // set filter $this->setFilter(); // set items $this->setItems(); // create XML $this->createXML(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // load the datagrids $this->loadDataGrids(); // parse the datagrids $this->parse(); // display the page $this->display(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // load the form $this->loadForm(); // validate the form $this->validateForm(); // parse $this->parse(); // display the page $this->display(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // check for default groups $this->checkForDefaultGroups(); // load datagrid $this->loadDataGrid(); // parse page $this->parse(); // display the page $this->display(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // update the queued mailings with 'sent' status if their time has come already BackendMailmotorModel::updateQueuedMailings(); // get the active campaign $this->getCampaign(); // load datagrid $this->loadDataGrids(); // parse page $this->parse(); // display the page $this->display(); }
/** * Execute the action. * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // set filter $this->setFilter(); // load form $this->loadForm(); // load datagrids $this->loadDataGrid(); // parse page $this->parse(); // display the page $this->display(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // add highchart javascript $this->header->addJS('highcharts.js'); // get the data $this->getData(); // load datagrid $this->loadDataGrid(); // parse page $this->parse(); // display the page $this->display(); }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // is the user a GodUser? $this->isGod = BackendAuthentication::getUser()->isGod(); // set filter $this->setFilter(); // load form $this->loadForm(); // load datagrids $this->loadDataGrid(); // parse page $this->parse(); // display the page $this->display(); }
/** * Execute the action. * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // use our custom JavaScript $this->header->addJS('profiles.js'); // set filter $this->setFilter(); // load form $this->loadForm(); // load datagrids $this->loadDataGrid(); // parse page $this->parse(); // display the page $this->display(); }
/** * Execute the action. */ public function execute() { // get parameters $this->currentModule = $this->getParameter('module', 'string'); // does the item exist if ($this->currentModule !== null && BackendExtensionsModel::existsModule($this->currentModule)) { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // make sure this module can be installed $this->validateInstall(); // do the actual install BackendExtensionsModel::installModule($this->currentModule); // redirect to index with a success message $this->redirect(BackendModel::createURLForAction('modules') . '&report=module-installed&var=' . $this->currentModule . '&highlight=row-module_' . $this->currentModule); } else { $this->redirect(BackendModel::createURLForAction('modules') . '&error=non-existing'); } }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // get some data $modulesThatRequireAkismet = BackendSettingsModel::getModulesThatRequireAkismet(); $modulesThatRequireGoogleMaps = BackendSettingsModel::getModulesThatRequireGoogleMaps(); // set properties $this->needsAkismet = !empty($modulesThatRequireAkismet); $this->needsGoogleMaps = !empty($modulesThatRequireGoogleMaps); // load the form $this->loadForm(); // validate the form $this->validateForm(); // parse $this->parse(); // display the page $this->display(); }
/** * Execute the action * * @return void */ public function execute() { // get parameters $this->id = $this->getParameter('id', 'int'); // does the item exist if ($this->id !== null && BackendFormBuilderModel::existsData($this->id)) { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // set filter $this->setFilter(); // get data $this->getData(); // parse $this->parse(); // display the page $this->display(); } else { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } }
/** * Execute the action * * @return void */ public function execute() { // check if the user is really logged on if (BackendAuthentication::getUser()->isAuthenticated()) { // get the redirect-URL from the URL $redirectURL = $this->getParameter('querystring', 'string', BackendModel::createUrlForAction(null, 'dashboard')); // redirect to the correct URL (URL the user was looking for or fallback) $this->redirect($redirectURL); } // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // load form $this->load(); // validate the form $this->validateForm(); // parse the error $this->parse(); // display the page $this->display(); }
/** * Execute the action. */ public function execute() { // get parameters $this->currentTheme = $this->getParameter('theme', 'string'); // does the item exist if ($this->currentTheme !== null && BackendExtensionsModel::existsTheme($this->currentTheme)) { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // make sure this theme can be installed $this->validateInstall(); try { // do the actual install BackendExtensionsModel::installTheme($this->currentTheme); // redirect to index with a success message $this->redirect(BackendModel::createURLForAction('themes') . '&report=theme-installed&var=' . $this->currentTheme); } catch (Exception $e) { // redirect to index with a success message $this->redirect(BackendModel::createURLForAction('themes') . '&report=information-file-is-empty&var=' . $this->currentTheme); } } else { $this->redirect(BackendModel::createURLForAction('themes') . '&error=non-existing'); } }
/** * Execute the action * * @return void */ public function execute() { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // add js $this->header->addJS('jstree/jquery.tree.js'); $this->header->addJS('jstree/lib/jquery.cookie.js'); $this->header->addJS('jstree/plugins/jquery.tree.cookie.js'); // add css $this->header->addCSS('/backend/modules/pages/js/jstree/themes/fork/style.css', null, true); // check if the cached files exists if (!SpoonFile::exists(PATH_WWW . '/frontend/cache/navigation/keys_' . BackendLanguage::getWorkingLanguage() . '.php')) { BackendPagesModel::buildCache(BL::getWorkingLanguage()); } if (!SpoonFile::exists(PATH_WWW . '/frontend/cache/navigation/navigation_' . BackendLanguage::getWorkingLanguage() . '.php')) { BackendPagesModel::buildCache(BL::getWorkingLanguage()); } // load the dgRecentlyEdited $this->loadDataGrids(); // parse $this->parse(); // display the page $this->display(); }
/** * Parse & display the page */ protected function parse() { parent::parse(); // assign the datagrid $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false); }
/** * Parse & display the page */ protected function parse() { parent::parse(); // parse datagrids $this->tpl->assign('dgLabels', $this->dgLabels->getNumResults() != 0 ? $this->dgLabels->getContent() : false); $this->tpl->assign('dgMessages', $this->dgMessages->getNumResults() != 0 ? $this->dgMessages->getContent() : false); $this->tpl->assign('dgErrors', $this->dgErrors->getNumResults() != 0 ? $this->dgErrors->getContent() : false); $this->tpl->assign('dgActions', $this->dgActions->getNumResults() != 0 ? $this->dgActions->getContent() : false); // is filtered? if ($this->getParameter('form', 'string', '') == 'filter') { $this->tpl->assign('filter', true); } // parse filter as query $this->tpl->assign('filter', $this->filterQuery); // parse isGod $this->tpl->assign('isGod', $this->isGod); // parse noItems, if all the datagrids are empty $this->tpl->assign('noItems', $this->dgLabels->getNumResults() == 0 && $this->dgMessages->getNumResults() == 0 && $this->dgErrors->getNumResults() == 0 && $this->dgActions->getNumResults() == 0); // parse the add URL $this->tpl->assign('addURL', BackendModel::createURLForAction('add', null, null, null) . $this->filterQuery); }
/** * Parse the datagrid and the reports */ protected function parse() { parent::parse(); // datagrid $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false); // form info $this->tpl->assign('name', $this->record['name']); $this->tpl->assign('id', $this->record['id']); $this->tpl->assignArray($this->filter); }
/** * Parse the datagrid and the reports */ protected function parse() { parent::parse(); // parse dgRecentlyEdited $this->tpl->assign('dgRecentlyEdited', $this->dgRecentlyEdited->getNumResults() != 0 ? $this->dgRecentlyEdited->getContent() : false); $this->tpl->assign('dgDrafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false); // parse the tree $this->tpl->assign('tree', BackendPagesModel::getTreeHTML()); // open the tree on a specific page if ($this->getParameter('id', 'int') !== null) { $this->tpl->assign('openedPageId', $this->getParameter('id', 'int')); } else { $this->tpl->assign('openedPageId', 1); } }
/** * Execute the action */ public function execute() { parent::execute(); $this->header->addJS('highcharts.js', null, false, false, false); $this->setDates(); }
/** * Parse. */ protected function parse() { parent::parse(); // assign theme data $this->tpl->assign('name', $this->currentTheme); $this->tpl->assign('warnings', $this->warnings); $this->tpl->assign('information', $this->information); $this->tpl->assign('showExtensionsInstallTheme', !BackendExtensionsModel::isThemeInstalled($this->currentTheme) && BackendAuthentication::isAllowedAction('install_theme')); // data grids $this->tpl->assign('dataGridTemplates', isset($this->dataGridTemplates) && $this->dataGridTemplates->getNumResults() > 0 ? $this->dataGridTemplates->getContent() : false); }