Example #1
0
 function __construct()
 {
     parent::__construct();
     $this->setPageTitle(WT_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');
     }
 }
Example #2
0
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 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, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
define('WT_SCRIPT_NAME', 'search.php');
require './includes/session.php';
require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Search();
$controller->pageHeader()->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('autocomplete();');
?>
<script>
	function checknames(frm) {
		action = "<?php 
echo $controller->action;
?>
";
		if (action == "general")
		{
			if (frm.query.value.length<2) {
				alert("<?php 
echo WT_I18N::translate('Please enter more than one character');
?>
");