'doList',); var $Doc = null; function Search_Show(&$Doc, &$DBObj, $options) { $this->_options = $options; $this->Doc = &$Doc; $this->DB_Grid($Doc, $DBObj); } function _doListBind(&$DB_List) { $DB_List->bind(); return true; } function getSearchForm($adv = false) { require_once 'class/Form/Form.class.php'; $form = new Form($this->Doc, 'form_'.strtolower(get_class($this->DBObj)), 'get', BASE_URL . '/search', '_self', array('class'=>'form form_'.strtolower(get_class($this->DBObj)))); $form->addElement('hidden', 'search[pages]', 'y'); $form->addElement('text', 'search[str]', ($adv ? 'all these words' : 'Search string'), array('class' => 'search_str')); $form->addRuleRequired(array('search[str]')); if ($adv) { $form->addElement('text', 'search[no_str]', null, array('class' => 'search_str')); $form->addElement('advcheckbox', 'search[no_keywords]', null, null, null, array('n', 'y')); } $form->addElement('advcheckbox', 'search[emails]', null, null, null, array('n', 'y')); $form->setCancelType(null); $form->setSubmitTitle('Search'); $form->setRendType(FORM_RENDERER_ARRAY_SMARTY); $form->setReturnForm(true); $form->setTpl(BASE_PATH . '/tpl/Search/form.tpl'); return $form; } function doList() { $form = $this->getSearchForm(true); $form->setDefaults(array('search' => $this->DBObj->search_data)); //$this->Doc->addContent(array('tpl' => BASE_PATH . '/tpl/Search/form.tpl', 'search_str' => $this->DBObj->search_str)); $this->Doc->addContent($form->exec()); if (!empty($this->DBObj->search_data['str'])) { require_once('class/DB/List/List.php'); $DB_List = new DB_List($this->Doc, $this->DBObj, $this->functionalFields); $DB_List->ipp = 10; $DB_List->tpl = BASE_PATH . "/tpl/Search/list.tpl"; $this->_doListBind($DB_List); $DB_List->exec(); } return true; } } ?>