. */ namespace Fisharebest\Webtrees; /** * Defined in session.php * * @global Tree $WT_TREE */ global $WT_TREE; use Fisharebest\Webtrees\Controller\SimpleController; use Fisharebest\Webtrees\Functions\FunctionsDb; use Fisharebest\Webtrees\Query\QueryMedia; define('WT_SCRIPT_NAME', 'find.php'); require './includes/session.php'; $controller = new SimpleController; $type = Filter::get('type'); $filter = Filter::get('filter'); $action = Filter::get('action'); $callback = Filter::get('callback', '[a-zA-Z0-9_]+', 'paste_id'); $all = Filter::getBool('all'); $subclick = Filter::get('subclick'); $choose = Filter::get('choose', '[a-zA-Z0-9_]+', '0all'); $qs = Filter::get('tags'); if ($subclick === 'all') { $all = true; } $embed = substr($choose, 0, 1) === '1'; switch ($type) { case 'indi': $controller->setPageTitle(I18N::translate('Find an individual')); break; case 'fam': $controller->setPageTitle(I18N::translate('Find a family')); break; case 'media': $controller->setPageTitle(I18N::translate('Find a media object')); break; case 'place': $controller->setPageTitle(I18N::translate('Find a place')); break; case 'repo': $controller->setPageTitle(I18N::translate('Find a repository')); break; case 'note': $controller->setPageTitle(I18N::translate('Find a shared note')); break; case 'source': $controller->setPageTitle(I18N::translate('Find a source')); break; case 'specialchar': $controller->setPageTitle(I18N::translate('Find a special character')); break; case 'factINDI': $controller ->setPageTitle(I18N::translate('Find a fact or event')) ->addInlineJavascript('initPickFact("INDI");'); break; case 'factFAM': $controller ->setPageTitle(I18N::translate('Find a fact or event')) ->addInlineJavascript('initPickFact("FAM");'); break; case 'factSOUR': $controller ->setPageTitle(I18N::translate('Find a fact or event')) ->addInlineJavascript('initPickFact("SOUR");'); break; case 'factREPO': $controller ->setPageTitle(I18N::translate('Find a fact or event')) ->addInlineJavascript('initPickFact("REPO");'); break; case 'factNAME': $controller ->setPageTitle(I18N::translate('Find a fact or event')) ->addInlineJavascript('initPickFact("NAME");'); break; case 'factPLAC': $controller ->setPageTitle(I18N::translate('Find a fact or event')) ->addInlineJavascript('initPickFact("PLAC");'); break; } $controller->pageHeader(); echo ''; echo '
', I18N::translate('Total individuals: %s', count($myindilist)), '
'; } else { echo '', I18N::translate('No results found.'), '
'; } echo '', I18N::translate('Total families: %s', count($myfamlist)), '
'; } else { echo '', I18N::translate('No results found.'), '
'; } echo '', Filter::escapeHtml($media->getFilename()), '
'; } if ($media->fileExists()) { $imgsize = $media->getImageAttributes(); echo GedcomTag::getLabelValue('__IMAGE_SIZE__', $imgsize['WxH']); } echo '', I18N::translate('No results found.'), '
'; } echo '', I18N::translate('Places found'), ' ', count($places), '
'; } else { echo '', I18N::translate('No results found.'), '
'; } echo '', I18N::translate('Repositories found'), " ", count($repo_list), '
'; } else { echo '', I18N::translate('No results found.'), '
'; } echo '', I18N::translate('Shared notes found'), ' ', count($mynotelist), '
'; } else { echo '', I18N::translate('No results found.'), '
'; } echo '', I18N::translate('Total sources: %s', count($mysourcelist)), '
'; } else { echo '', I18N::translate('No results found.'), '
'; } echo ''; // lower case special characters foreach (SpecialChars::create($language_filter)->upper() as $special_character) { echo '', $special_character, ' '; } echo '
'; //upper case special characters foreach (SpecialChars::create($language_filter)->lower() as $special_character) { echo '', $special_character, ' '; } echo '
'; // other special characters (not letters) foreach (SpecialChars::create($language_filter)->other() as $special_character) { echo '', $special_character, ' '; } echo '