Esempio n. 1
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign the data
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('showDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('delete_category'));
 }
Esempio n. 2
0
 /**
  * Parse the form
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent
     parent::parse();
     // parse additional variables
     $this->tpl->assign('commentsRSSURL', SITE_URL . BackendModel::getURLForBlock($this->URL->getModule(), 'comments_rss'));
 }
Esempio n. 3
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign id, term
     $this->tpl->assign('id', $this->record['id']);
     $this->tpl->assign('term', $this->record['term']);
 }
Esempio n. 4
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     $this->tpl->assign('item', $this->record);
     // delete allowed?
     $this->tpl->assign('showDeleteCategory', BackendBlogModel::deleteCategoryAllowed($this->id) && BackendModel::createURLForAction('delete_category'));
 }
Esempio n. 5
0
 /**
  * Parse the form
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent
     parent::parse();
     // assign the active record and additional variables
     $this->tpl->assign('group', $this->record);
 }
Esempio n. 6
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     parent::execute();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Esempio n. 7
0
 /**
  * Parse the datagrid and the reports
  */
 protected function parse()
 {
     parent::parse();
     // assign datagrid
     $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false);
     // assign the selected theme, so we can propagate it to the add/edit actions.
     $this->tpl->assign('selectedTheme', urlencode($this->selectedTheme));
 }
Esempio n. 8
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // parse form
     $this->frm->parse($this->tpl);
     // assign iteration
     $this->tpl->assign(array('modules' => $this->modules));
 }
Esempio n. 9
0
 /**
  * Parse the form
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent
     parent::parse();
     // assign
     $this->tpl->assign('item', $this->record);
     // delete allowed?
     $this->tpl->assign('deleteAllowed', BackendBlogModel::deleteCategoryAllowed($this->id));
 }
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign the active record and additional variables
     $this->tpl->assign('mailing', $this->record);
     $this->tpl->assign('template', $this->template);
     // parse template content
     $this->parseTemplateContent();
 }
Esempio n. 11
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->groupId = SpoonFilter::getGetValue('group_id', null, 0, 'int');
     $this->downloadExampleFile();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Esempio n. 12
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // parse filter
     $this->tpl->assign($this->filter);
     $this->tpl->assign('filterQuery', $this->filterQuery);
     // assign id, name
     $this->tpl->assign('name', $this->record['name']);
     $this->tpl->assign('id', $this->record['id']);
 }
Esempio n. 13
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // gets all needed parameters
     $this->getAnalyticsParameters();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Esempio n. 14
0
 /**
  * Parse the form
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent
     parent::parse();
     // assign id, name
     $this->tpl->assign('id', $this->record['id']);
     $this->tpl->assign('name', $this->record['name']);
     // can the category be deleted?
     if (BackendFaqModel::isCategoryAllowedToBeDeleted($this->id)) {
         $this->tpl->assign('showDelete', true);
     }
 }
Esempio n. 15
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     $settings = BackendModel::getModuleSettings();
     // assign to template
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('settings', $settings['location']);
     // assign message if address was not be geocoded
     if ($this->record['lat'] == null || $this->record['lng'] == null) {
         $this->tpl->assign('errorMessage', BL::err('AddressCouldNotBeGeocoded'));
     }
 }
Esempio n. 16
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // prevent XSS
     $filter = SpoonFilter::arrayMapRecursive('htmlspecialchars', $this->filter);
     // parse filter
     $this->tpl->assign($filter);
     $this->tpl->assign('filterQuery', $this->filterQuery);
     // assign id, name
     $this->tpl->assign('name', $this->record['name']);
     $this->tpl->assign('id', $this->record['id']);
 }
Esempio n. 17
0
 /**
  * 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 form
     $this->loadForm();
     // validates the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Esempio n. 18
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // get url
     $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
     $url404 = BackendModel::getURL(404);
     if ($url404 != $url) {
         $this->tpl->assign('detailURL', SITE_URL . $url);
     }
     // assign the active record and additional variables
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('feedback', $this->feedback);
 }
Esempio n. 19
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     $this->getData();
     $this->loadAccountForm();
     $this->loadClientForm();
     $this->loadGeneralForm();
     $this->validateAccountForm();
     $this->validateClientForm();
     $this->validateGeneralForm();
     $this->parse();
     $this->display();
 }
Esempio n. 20
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if ($this->id !== null && BackendBlogModel::existsComment($this->id)) {
         parent::execute();
         $this->getData();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
Esempio n. 21
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // store the passed group ID
     $this->groupId = SpoonFilter::getGetValue('group_id', null, 0, 'int');
     // download the example file
     $this->downloadExampleFile();
     // 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 (BackendMailmotorModel::existsMailing($this->id)) {
         // call parent, this will probably add some general CSS/JS or other required files
         parent::execute();
         // get all data for the item we want to edit
         $this->getData();
         // parse
         $this->parse();
         // display the page
         $this->display(BACKEND_MODULE_PATH . '/layout/templates/edit_mailing_iframe.tpl');
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
Esempio n. 23
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably edit some general CSS/JS or other required files
     parent::execute();
     // load record
     $this->loadData();
     // 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);
     // get the templates
     $this->templates = BackendPagesModel::getTemplates();
     // set the default template as checked
     $this->templates[$this->record['template_id']]['checked'] = true;
     // homepage?
     if ($this->id == 1) {
         // loop and set disabled state
         foreach ($this->templates as &$row) {
             $row['disabled'] = $row['has_block'];
         }
     }
     // get the extras
     $this->extras = BackendPagesModel::getExtras();
     // get maximum number of blocks
     $maxNumBlocks = BackendModel::getModuleSetting($this->getModule(), 'template_max_blocks', 5);
     // build blocks array
     for ($i = 0; $i < $maxNumBlocks; $i++) {
         $this->blocks[$i] = array('index' => $i, 'name' => 'name ' . $i);
     }
     // load the form
     $this->loadForm();
     // load drafts
     $this->loadDrafts();
     // load the datagrid with the versions
     $this->loadRevisions();
     // validate the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Esempio n. 24
0
 /**
  * Execute the action.
  *
  * @return	void
  */
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exists
     if ($this->id !== null && BackendProfilesModel::exists($this->id)) {
         // 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();
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
Esempio n. 25
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign the active record and additional variables
     $this->tpl->assign('campaign', $this->record);
 }
Esempio n. 26
0
 /**
  * Parse the form
  */
 protected function parse()
 {
     $this->parseFields();
     parent::parse();
     $this->tpl->assign('id', $this->record['id']);
     $this->tpl->assign('name', $this->record['name']);
     // parse error messages
     $this->parseErrorMessages();
 }
Esempio n. 27
0
 /**
  * Parse the data
  */
 protected function parse()
 {
     parent::parse();
     $this->tpl->assign('godUser', BackendAuthentication::getUser()->isGod());
 }
Esempio n. 28
0
 /**
  * Parse the form
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent
     parent::parse();
     // assign items
     $this->tpl->assign('dataGridUsers', $this->dataGridUsers->getNumResults() != 0 ? $this->dataGridUsers->getContent() : false);
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('groupName', $this->record['name']);
 }
Esempio n. 29
0
 /**
  * Parse the form
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent
     parent::parse();
     // assign id, name
     $this->tpl->assign('id', $this->id);
     $this->tpl->assign('name', $this->record['name']);
     // assign usage-datagrid
     $this->tpl->assign('usage', $this->dgUsage->getNumResults() != 0 ? $this->dgUsage->getContent() : false);
 }
Esempio n. 30
0
 /**
  * Parse
  */
 protected function parse()
 {
     parent::parse();
     // set
     $this->record['url'] = $this->meta->getURL();
     if ($this->id == 1) {
         $this->record['url'] = '';
     }
     // parse some variables
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('isGod', $this->isGod);
     $this->tpl->assign('templates', $this->templates);
     $this->tpl->assign('positions', $this->positions);
     $this->tpl->assign('extrasData', json_encode(BackendExtensionsModel::getExtrasData()));
     $this->tpl->assign('extrasById', json_encode(BackendExtensionsModel::getExtras()));
     $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL($this->record['parent_id']), '/'));
     $this->tpl->assign('formErrors', (string) $this->frm->getErrors());
     // init var
     $showDelete = true;
     // has children?
     if (BackendPagesModel::getFirstChildId($this->record['id']) !== false) {
         $showDelete = false;
     }
     if (!$this->record['delete_allowed']) {
         $showDelete = false;
     }
     // allowed?
     if (!BackendAuthentication::isAllowedAction('delete', $this->getModule())) {
         $showDelete = false;
     }
     // show delete button
     $this->tpl->assign('showPagesDelete', $showDelete);
     // assign template
     $this->tpl->assignArray($this->templates[$this->record['template_id']], 'template');
     // parse datagrids
     $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
     $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
     // parse the tree
     $this->tpl->assign('tree', BackendPagesModel::getTreeHTML());
 }