/** Generate the advanced search page */ public function advancedAction() { $form = new AdvancedSearchForm(array('disableLoadDefaultDecorators' => true)); $this->view->form = $form; if ($this->getRequest()->isPost() && $form->isValid($_POST)) { if ($form->isValid($form->getValues())) { $params = array_filter($form->getValues()); $params = $this->array_cleanup($params); $this->_flashMessenger->addMessage('Your search is complete'); $this->_helper->Redirector->gotoSimple('results', 'search', 'database', $params); } else { $form->populate($this->_getAllParams()); } } }
/** Generate the advanced search page * @access public * @return void */ public function advancedAction() { $form = new AdvancedSearchForm(); $this->view->form = $form; if ($this->getRequest()->isPost()) { if ($form->isValid($this->_request->getPost())) { $this->process($form->getValues()); } else { $form->populate($this->_request->getPost()); } } }
*/ // versione con campo UNICO $l_search = 'standard_node'; $form_dataHa = array(array('label' => translateFN('Parola') . "<br>", 'type' => 'text', 'name' => 's_UnicNode_text', 'size' => '20', 'maxlength' => '40', 'value' => $s_UnicNode_text), array('label' => '', 'type' => 'hidden', 'name' => 'l_search', 'value' => $l_search), array('label' => '', 'type' => 'submit', 'name' => 'submit', 'value' => translateFN('Cerca'))); if (isset($op) && $op == 'lemma') { $form_dataHa[] = array('label' => '', 'type' => 'hidden', 'name' => 'op', 'value' => $op); } $fObj = new Form(); $action = whoami() . ".php"; /*set get method to prevent the confirmation data on back button's browser*/ $fObj->initForm($action, 'GET'); $fObj->setForm($form_dataHa); $search_form = $fObj->getForm(); if (isset($_GET['s_AdvancedForm'])) { $form_AdvancedSearch = new AdvancedSearchForm(false, 'search.php'); if ($form_AdvancedSearch->isValid()) { $AdvancedSearchAr = array('s_node_name' => $_GET['s_node_name'], 's_node_title' => $_GET['s_node_title'], 's_node_text' => $_GET['s_node_text'], 's_AdvancedForm' => $_GET['s_AdvancedForm']); $form_AdvancedSearch->fillWithArrayData($AdvancedSearchAr); $advancedSearch_form = $form_AdvancedSearch->getHtml(); } } else { $form_AdvancedSearch = new AdvancedSearchForm(false, 'search.php'); $action = whoami() . ".php"; $advancedSearch_form = $form_AdvancedSearch->getHtml(); } $online_users_listing_mode = 2; $online_users = ADALoggableUser::get_online_usersFN($sess_id_course_instance, $online_users_listing_mode); // CHAT, BANNER etc $banner = (include ROOT_DIR . "/include/banner.inc.php"); $SimpleSearchlabel = translateFN('Ricerca semplice'); $AdvanceSearchlabel = translateFN('Ricerca avanzata');