. * * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) * @author Chunsheng Wang * @package search * @version $Id$ * @link http://www.zentaoms.com */ class search extends control { public function buildForm($module, $searchFields, $fieldParams, $actionURL, $queryID = 0) { $this->search->initSession($module, $searchFields, $fieldParams); $this->view->module = $module; $this->view->groupItems = $this->config->search->groupItems; $this->view->searchFields = $searchFields; $this->view->actionURL = $actionURL; $this->view->fieldParams = $this->search->setDefaultParams($searchFields, $fieldParams); $this->view->queries = $this->search->getQueryPairs($module); $this->view->queryID = $queryID; $this->display(); } public function buildQuery() { $this->search->buildQuery(); die(js::locate($this->post->actionURL, 'parent')); } public function saveQuery() { $this->search->saveQuery(); if(dao::isError()) die(js::error(dao::getError())); die('success'); } public function deleteQuery($queryID) { $this->dao->delete()->from(TABLE_USERQUERY)->where('id')->eq($queryID)->andWhere('account')->eq($this->app->user->account)->exec(); die(js::reload('parent')); } }