getSidebarAjaxContent(); break; default: header('HTTP/1.0 404 Not Found'); break; } exit; } // Implement WT_Module_Sidebar public function defaultSidebarOrder() { return 50; } // Implement WT_Module_Sidebar public function hasSidebarContent() { return true; } // Implement WT_Module_Sidebar public function getSidebarAjaxContent() { $alpha =safe_GET('alpha'); // All surnames beginning with this letter where "@"=unknown and ","=none $surname =safe_GET('surname', '[^<>&%{};]*'); // All indis with this surname. NB - allow ' and " $search =safe_GET('search'); $last = array('alpha'=>$alpha, 'surname'=>$surname, 'search'=>$search); $_SESSION['sb_families_last'] = $last; if ($search) { return $this->search($search); } elseif ($alpha=='@' || $alpha==',' || $surname) { return $this->getSurnameFams($alpha, $surname); } elseif ($alpha) { return $this->getAlphaSurnames($alpha, $surname); } else { return ''; } } // Implement WT_Module_Sidebar public function getSidebarContent() { global $SHOW_MARRIED_NAMES, $WT_IMAGES, $UNKNOWN_NN; // Fetch a list of the initial letters of all surnames in the database $initials=WT_Query_Name::surnameAlpha($SHOW_MARRIED_NAMES, false, WT_GED_ID); $out = '
'; return $out; } public function getAlphaSurnames($alpha, $surname1='') { global $SHOW_MARRIED_NAMES; $surns=WT_Query_Name::surnames('', $alpha, $SHOW_MARRIED_NAMES, true, WT_GED_ID); $out = '