echo $text; ?> </td> </tr> <?php foreach ($facts as $fact) { print_fact($fact, $controller->record); } if ($controller->record->canEdit()) { print_add_new_fact($controller->record->getXref(), $facts, 'NOTE'); } ?> </table> </div> <?php if ($linked_indi) { echo '<div id="indi-note">', format_indi_table($linked_indi), '</div>'; } if ($linked_fam) { echo '<div id="fam-note">', format_fam_table($linked_fam), '</div>'; } if ($linked_obje) { echo '<div id="media-note">', format_media_table($linked_obje), '</div>'; } if ($linked_sour) { echo '<div id="source-note">', format_sour_table($linked_sour), '</div>'; } ?> </div> </div>
break; } if ($count) { if ($show == 'indi' && $givn_initial == $falpha && $show_all_firstnames == 'no') { $list[] = '<a class="warning" href="' . $url . '&falpha=' . rawurlencode($givn_initial) . '" title="' . WT_I18N::number($count) . '">' . $html . '</a>'; } else { $list[] = '<a href="' . $url . '&falpha=' . rawurlencode($givn_initial) . '" title="' . WT_I18N::number($count) . '">' . $html . '</a>'; } } else { $list[] = $html; } } // Search spiders don't get the "show all" option as the other links give them everything. if (!$SEARCH_SPIDER) { if ($show_all_firstnames == 'yes') { $list[] = '<span class="warning">' . WT_I18N::translate('All') . '</span>'; } else { $list[] = '<a href="' . $url . '&show_all_firstnames=yes">' . WT_I18N::translate('All') . '</a>'; } } if ($show_all == 'no') { echo '<h2 class="center">', WT_I18N::translate('Individuals with surname %s', $legend), '</h2>'; } echo '<p class="center alpha_index">', join(' | ', $list), '</p>'; } } if ($show == 'indi') { echo format_fam_table(WT_Query_Name::families($surname, $alpha, $falpha, $show_marnm, WT_GED_ID)); } } }
//-- display results $controller->addInlineJavascript('jQuery("#places-tabs").tabs();')->addInlineJavascript('jQuery("#places-tabs").css("visibility", "visible");')->addInlineJavascript('jQuery(".loading-image").css("display", "none");'); echo '<div class="loading-image"> </div>'; echo '<div id="places-tabs"><ul>'; if ($myindilist) { echo '<li><a href="#places-indi"><span id="indisource">', WT_I18N::translate('Individuals'), '</span></a></li>'; } if ($myfamlist) { echo '<li><a href="#places-fam"><span id="famsource">', WT_I18N::translate('Families'), '</span></a></li>'; } echo '</ul>'; if ($myindilist) { echo '<div id="places-indi">', format_indi_table($myindilist), '</div>'; } if ($myfamlist) { echo '<div id="places-fam">', format_fam_table($myfamlist), '</div>'; } if (!$myindilist && !$myfamlist) { echo '<div id="places-indi">', format_indi_table(array()), '</div>'; } echo '</div>'; // <div id="places-tabs"> } echo '<h4><a href="placelist.php?display=list">', WT_I18N::translate('Show all places in a list'), '</a></h4>'; if ($gm_module && $gm_module->getSetting('GM_PLACE_HIERARCHY')) { echo '<link type="text/css" href="', WT_STATIC_URL, WT_MODULES_DIR, 'googlemap/css/wt_v3_googlemap.css" rel="stylesheet">'; $gm_module->map_scripts($numfound, $level, $parent, $linklevels, $placelevels, $place_names); } break; } echo '</div>';
function printResults() { require_once WT_ROOT . 'includes/functions/functions_print_lists.php'; global $GEDCOM; $somethingPrinted = false; // whether anything printed // ---- section to search and display results on a general keyword search if ($this->action == "general" || $this->action == "soundex" || $this->action == "replace") { if ($this->myindilist || $this->myfamlist || $this->mysourcelist || $this->mynotelist) { $this->addInlineJavascript('jQuery("#search-result-tabs").tabs();'); $this->addInlineJavascript('jQuery("#search-result-tabs").css("visibility", "visible");'); $this->addInlineJavascript('jQuery(".loading-image").css("display", "none");'); echo '<br>'; echo '<div class="loading-image"> </div>'; echo '<div id="search-result-tabs"><ul>'; if ($this->myindilist) { echo '<li><a href="#searchAccordion-indi"><span id="indisource">', WT_I18N::translate('Individuals'), '</span></a></li>'; } if ($this->myfamlist) { echo '<li><a href="#searchAccordion-fam"><span id="famsource">', WT_I18N::translate('Families'), '</span></a></li>'; } if ($this->mysourcelist) { echo '<li><a href="#searchAccordion-source"><span id="mediasource">', WT_I18N::translate('Sources'), '</span></a></li>'; } if ($this->mynotelist) { echo '<li><a href="#searchAccordion-note"><span id="notesource">', WT_I18N::translate('Notes'), '</span></a></li>'; } echo '</ul>'; // individual results echo '<div id="searchAccordion-indi">'; // Split individuals by tree $trees = WT_Tree::getAll(); foreach ($this->sgeds as $ged_id => $gedcom) { $datalist = array(); foreach ($this->myindilist as $individual) { if ($individual->getGedcomId() == $ged_id) { $datalist[] = $individual; } } if ($datalist) { $somethingPrinted = true; usort($datalist, array('WT_GedcomRecord', 'compare')); $GEDCOM = $gedcom; load_gedcom_settings($ged_id); echo '<h3 class="indi-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3> <div class="indi-acc_content">', format_indi_table($datalist); echo '</div>'; //indi-acc_content } } echo '</div>'; //#searchAccordion-indi $this->addInlineJavascript('jQuery("#searchAccordion-indi").accordion({heightStyle: "content", collapsible: true});'); // family results echo '<div id="searchAccordion-fam">'; // Split families by gedcom foreach ($this->sgeds as $ged_id => $gedcom) { $datalist = array(); foreach ($this->myfamlist as $family) { if ($family->getGedcomId() == $ged_id) { $datalist[] = $family; } } if ($datalist) { $somethingPrinted = true; usort($datalist, array('WT_GedcomRecord', 'compare')); $GEDCOM = $gedcom; load_gedcom_settings($ged_id); echo '<h3 class="fam-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3> <div class="fam-acc_content">', format_fam_table($datalist); echo '</div>'; //fam-acc_content } } echo '</div>'; //#searchAccordion-fam $this->addInlineJavascript('jQuery("#searchAccordion-fam").accordion({heightStyle: "content", collapsible: true});'); // source results echo '<div id="searchAccordion-source">'; // Split sources by gedcom foreach ($this->sgeds as $ged_id => $gedcom) { $datalist = array(); foreach ($this->mysourcelist as $source) { if ($source->getGedcomId() == $ged_id) { $datalist[] = $source; } } if ($datalist) { $somethingPrinted = true; usort($datalist, array('WT_GedcomRecord', 'compare')); $GEDCOM = $gedcom; load_gedcom_settings($ged_id); echo '<h3 class="source-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3> <div class="source-acc_content">', format_sour_table($datalist); echo '</div>'; //fam-acc_content } } echo '</div>'; //#searchAccordion-source $this->addInlineJavascript('jQuery("#searchAccordion-source").accordion({heightStyle: "content", collapsible: true});'); // note results echo '<div id="searchAccordion-note">'; // Split notes by gedcom foreach ($this->sgeds as $ged_id => $gedcom) { $datalist = array(); foreach ($this->mynotelist as $note) { if ($note->getGedcomId() == $ged_id) { $datalist[] = $note; } } if ($datalist) { $somethingPrinted = true; usort($datalist, array('WT_GedcomRecord', 'compare')); $GEDCOM = $gedcom; load_gedcom_settings($ged_id); echo '<h3 class="note-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3> <div class="note-acc_content">', format_note_table($datalist); echo '</div>'; //note-acc_content } } echo '</div>'; //#searchAccordion-note $this->addInlineJavascript('jQuery("#searchAccordion-note").accordion({heightStyle: "content", collapsible: true});'); $GEDCOM = WT_GEDCOM; load_gedcom_settings(WT_GED_ID); echo '</div>'; //#search-result-tabs } elseif (isset($this->query)) { echo '<br><div class="warning center"><em>' . WT_I18N::translate('No results found.') . '</em><br>'; if (!isset($this->srindi) && !isset($this->srfams) && !isset($this->srsour) && !isset($this->srnote)) { echo '<em>' . WT_I18N::translate('Be sure to select an option to search for.') . '</em><br>'; } echo '</div>'; } } return $somethingPrinted; // whether anything printed }
echo '<p class="ui-state-error">', $controller->error_message, '</p>'; } else { switch ($controller->chart_style) { case 0: // List echo '<ul style="list-style: none; display: block;" id="descendancy_chart">'; $controller->print_child_descendancy($controller->root, $controller->generations); echo '</ul>'; break; case 1: // Booklet $show_cousins = true; echo '<div id="descendancy_chart">'; $controller->print_child_family($controller->root, $controller->generations); echo '</div>'; break; case 2: // Individual list $descendants = $controller->indi_desc($controller->root, $controller->generations, array()); echo '<div id="descendancy-list">', format_indi_table($descendants), '</div>'; break; case 3: // Family list $descendants = $controller->fam_desc($controller->root, $controller->generations, array()); echo '<div id="descendancy-list">', format_fam_table($descendants), '</div>'; break; } } ?> </div>
foreach ($person->getChildFamilies() as $family) { print_sosa_family($family->getXref(), $pid, $i); } } } } echo '</div>'; break; case 2: // Individual list $treeid = ancestry_array($controller->root->getXref(), $PEDIGREE_GENERATIONS); echo '<div id="ancestry-list">', format_indi_table($treeid, 'sosa'), '</div>'; break; case 3: // Family list $treeid = ancestry_array($controller->root->getXref(), $PEDIGREE_GENERATIONS - 1); $famlist = array(); foreach ($treeid as $pid) { $person = WT_Individual::getInstance($pid); if (!$person) { continue; } foreach ($person->getChildFamilies() as $famc) { $famlist[$famc->getXref()] = $famc; } } echo '<div id="ancestry-list">', format_fam_table($famlist), '</div>'; break; } echo '</div>'; // close #ancestry-page
echo WT_Gedcom_Tag::getLabel('OBJE'); echo '</td><td class="optionbox">'; echo '<a href="#" onclick="window.open(\'addmedia.php?action=showmediaform&linktoid=', $controller->record->getXref(), '\', \'_blank\', edit_window_specs); return false;">', WT_I18N::translate('Add a new media object'), '</a>'; echo help_link('OBJE'); echo '<br>'; echo '<a href="#" onclick="window.open(\'inverselink.php?linktoid=', $controller->record->getXref(), '&linkto=source\', \'_blank\', find_window_specs); return false;">', WT_I18N::translate('Link to an existing media object'), '</a>'; echo '</td></tr>'; } } echo '</table> </div>'; // Individuals linked to this source if ($linked_indi) { echo '<div id="indi-sources">', format_indi_table($linked_indi), '</div>'; } // Families linked to this source if ($linked_fam) { echo '<div id="fam-sources">', format_fam_table($linked_fam), '</div>'; } // Media Items linked to this source if ($linked_obje) { echo '<div id="media-sources">', format_media_table($linked_obje), '</div>'; } // Shared Notes linked to this source if ($linked_note) { echo '<div id="note-sources">', format_note_table($linked_note), '</div>'; } echo '</div>'; //close div "source-tabs" echo '</div>'; //close div "source-details"