pid = safe_GET_xref('pid'); $gedrec = find_person_record($this->pid, WT_GED_ID); if ($USE_RIN && $gedrec==false) { $this->pid = find_rin_id($this->pid); $gedrec = find_person_record($this->pid, WT_GED_ID); } if (empty($gedrec)) { $gedrec = "0 @".$this->pid."@ INDI\n"; } if (find_person_record($this->pid, WT_GED_ID) || find_updated_record($this->pid, WT_GED_ID)!==null) { $this->indi = new WT_Person($gedrec); $this->indi->ged_id=WT_GED_ID; // This record is from a file } else if (!$this->indi) { return false; } $this->pid=$this->indi->getXref(); // Correct upper/lower case mismatch //-- if the user can edit and there are changes then get the new changes if (WT_USER_CAN_EDIT || WT_USER_CAN_ACCEPT) { $newrec = find_updated_record($this->pid, WT_GED_ID); if (!empty($newrec)) { $this->diffindi = new WT_Person($newrec); $this->diffindi->setChanged(true); } } $this->indi->diffMerge($this->diffindi); // Initialise tabs $this->tabs = WT_Module::getActiveTabs(); foreach ($this->tabs as $mod) { $mod->setController($this); } if (!isset($_SESSION['WT_pin']) && $DEFAULT_PIN_STATE) $_SESSION['WT_pin'] = true; if (!isset($_SESSION['WT_sb_closed']) && $DEFAULT_SB_CLOSED_STATE) $_SESSION['WT_sb_closed'] = true; //-- handle ajax calls if ($this->action=="ajax") { $tab = 0; if (isset($_REQUEST['module'])) { $tabname = $_REQUEST['module']; if ($SEARCH_SPIDER) { // Search engines should not make AJAX requests header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden'); exit; } if (!array_key_exists($tabname, $this->tabs)) { // An AJAX request for a non-existant tab? header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); exit; } header("Content-Type: text/html; charset=UTF-8"); //AJAX calls do not have the meta tag headers and need this set header("X-Robots-Tag: noindex,follow"); //AJAX pages should not show up in search results, any links can be followed though $mod = $this->tabs[$tabname]; if ($mod) { echo $mod->getTabContent(); // Allow the other tabs to modify this one - e.g. lightbox does this. echo WT_JS_START; foreach (WT_Module::getActiveTabs() as $module) { echo $module->getJSCallback(); } echo WT_JS_END; } } if (isset($_REQUEST['sb_closed'])) { if ($_REQUEST['sb_closed']=='true') $_SESSION['WT_sb_closed'] = true; else $_SESSION['WT_sb_closed'] = false; } //-- only get the requested tab and then exit if (WT_DEBUG_SQL) { echo WT_DB::getQueryLog(); } exit; } } /** * return the title of this page * @return string the title of the page to go in the