Esempio n. 1
0
 /**
  * Displays the search form
  *
  * @author Michael Klier <*****@*****.**>
  */
 function xhtml_search_form()
 {
     global $lang;
     ptln('<div class="level1">');
     $blogs = $this->entryhelper->get_blogs();
     $form = new Doku_Form(array('id' => 'blogtng__search_form'));
     $form->startFieldset($lang['btn_search']);
     $form->addHidden('page', 'blogtng');
     $form->addHidden('btng[admin]', 'search');
     $form->addElement(formSecurityToken());
     $form->addElement(form_makeListBoxField('btng[query][blog]', $blogs, $_REQUEST['btng']['query']['blog'], $this->getLang('blog')));
     $form->addElement(form_makeListBoxField('btng[query][filter]', array('entry_title', 'entry_author', 'comment', 'comment_ip', 'tags'), $_REQUEST['btng']['query']['filter'], $this->getLang('filter')));
     $form->addElement(form_makeTextField('btng[query][string]', $_REQUEST['btng']['query']['string'], ''));
     $form->addElement(form_makeButton('submit', 'admin', $lang['btn_search']));
     $form->endFieldset();
     html_form('blogtng__search_form', $form);
     ptln('</div>');
 }
Esempio n. 2
0
 /**
  * Displays the limit selection form
  *
  * @author hArpanet <*****@*****.**>
  *
  * @param string $query
  */
 private function xhtml_limit_form($query = '')
 {
     global $lang;
     $limit = $this->getLimitParam($query);
     $resultset = $query['resultset'];
     ptln('<div class="level1">');
     $form = new Doku_Form(array('id' => 'blogtng__' . $resultset . '_limit_form'));
     $form->startFieldset("");
     $form->addHidden('page', 'blogtng');
     $form->addElement(form_makeListBoxField("btng[{$resultset}][limit]", array(5, 10, 15, 20, 25, 30, 40, 50, 100), $limit, $this->getLang('numhits')));
     $form->addHidden("btng[{$resultset}][offset]", $this->getOffsetParam($query));
     $form->addElement(form_makeButton('submit', 'admin', $lang['btn_update']));
     $form->endFieldset();
     html_form('blogtng__' . $resultset . '_cnt_form', $form);
     ptln('</div>');
 }