/** * Startup activity */ public function __construct() { parent::__construct(); $this->setPageTitle(I18N::translate('Advanced search')); if (empty($_REQUEST['action'])) { $this->action = "advanced"; } if ($this->action == "advanced") { if (isset($_REQUEST['fields'])) { $this->fields = $_REQUEST['fields']; ksort($this->fields); } if (isset($_REQUEST['values'])) { $this->values = $_REQUEST['values']; } if (isset($_REQUEST['plusminus'])) { $this->plusminus = $_REQUEST['plusminus']; } $this->reorderFields(); $this->advancedSearch(); } if (!$this->fields) { $this->fields = array('NAME:GIVN:SDX', 'NAME:SURN:SDX', 'BIRT:DATE', 'BIRT:PLAC', 'FAMS:MARR:DATE', 'FAMS:MARR:PLAC', 'DEAT:DATE', 'DEAT:PLAC', 'FAMC:HUSB:NAME:GIVN:SDX', 'FAMC:HUSB:NAME:SURN:SDX', 'FAMC:WIFE:NAME:GIVN:SDX', 'FAMC:WIFE:NAME:SURN:SDX'); } }
* the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ namespace Fisharebest\Webtrees; use Fisharebest\Webtrees\Controller\SearchController; use Fisharebest\Webtrees\Functions\FunctionsPrint; define('WT_SCRIPT_NAME', 'search.php'); require './includes/session.php'; $controller = new SearchController(); $controller->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();'); ?> <script> function checknames(frm) { action = "<?php echo $controller->action; ?> "; if (action === "general") { if (frm.query.value.length<2) { alert("<?php echo I18N::translate('Please enter more than one character.'); ?> "); frm.query.focus();