//-- only allow logged in users to access this page if (!$ALLOW_EDIT_GEDCOM || !$USE_QUICK_UPDATE || !PGV_USER_ID) { echo $pgv_lang["access_denied"]; print_simple_footer(); exit; } if (!isset($closewin)) { $closewin = 0; } // TODO Decide whether to use GET/POST and appropriate validation $pid = safe_REQUEST($_REQUEST, 'pid', PGV_REGEX_XREF, PGV_USER_GEDCOM_ID); $action = safe_REQUEST($_REQUEST, 'action'); $closewin = safe_REQUEST($_REQUEST, 'closewin', '1', '0'); //-- only allow editors or users who are editing their own individual or their immediate relatives if (!PGV_USER_CAN_EDIT) { $famids = pgv_array_merge(find_sfamily_ids(PGV_USER_GEDCOM_ID), find_family_ids(PGV_USER_GEDCOM_ID)); $related = false; foreach ($famids as $famid) { if (!isset($pgv_changes[$famid . "_" . PGV_GEDCOM])) { $famrec = find_family_record($famid, PGV_GED_ID); } else { $famrec = find_updated_record($famid, PGV_GED_ID); } if (preg_match("/1 (HUSB|WIFE|CHIL) @{$pid}@/", $famrec)) { $related = true; break; } } if (!$related) { echo $pgv_lang["access_denied"]; print_simple_footer();
echo $indi->format_list('li', true); } echo '</ul></td></tr><tr><td class="list_label">', $pgv_lang['total_indis'], ' ', count($myindilist), '</tr></td>'; } else { echo "<td class=\"list_value_wrap\">"; echo $pgv_lang["no_results"]; echo "</td></tr>"; } echo "</table>"; } // Output Family if ($type == "fam") { echo "<table class=\"tabs_table {$TEXT_DIRECTION} width90\"><tr>"; // Get the famrecs with hits on names from the family table // Get the famrecs with hits in the gedcom record from the family table $myfamlist = pgv_array_merge(search_fams_names($filter_array, array(PGV_GED_ID), 'AND'), search_fams($filter_array, array(PGV_GED_ID), 'AND', true)); if ($myfamlist) { $curged = $GEDCOM; echo "<td class=\"list_value_wrap {$TEXT_DIRECTION}\"><ul>"; usort($myfamlist, array('GedcomRecord', 'Compare')); foreach ($myfamlist as $family) { echo $family->format_list('li', true); } echo '</ul></td></tr><tr><td class="list_label">', $pgv_lang['total_fams'], ' ', count($myfamlist), '</tr></td>'; } else { echo "<td class=\"list_value_wrap\">"; echo $pgv_lang["no_results"]; echo "</td></tr>"; } echo "</table>"; }