<?php // Parses gedcom file and displays a list of the shared notes in the file. // // webtrees: Web based Family History software // Copyright (C) 2014 webtrees development team. // // Derived from PhpGedView // Copyright (C) 2009 PGV Development Team. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA define('WT_SCRIPT_NAME', 'notelist.php'); require './includes/session.php'; require_once WT_ROOT . 'includes/functions/functions_print_lists.php'; $controller = new WT_Controller_Page(); $controller->setPageTitle(WT_I18N::translate('Shared notes')); $controller->pageHeader(); echo '<div id="notelist-page">', '<h2>', WT_I18N::translate('Shared notes'), '</h2>', format_note_table(get_note_list(WT_GED_ID)); echo '</div>';
echo '<li><a href="', $repo->getHtmlUrl(), '" onclick="pasteid(\'', $repo->getXref(), '\');"><span class="list_item">', $repo->getFullName(), '</span></a></li>'; } echo '</ul> <p>', WT_I18N::translate('Repositories found'), " ", count($repo_list), '</p>'; } else { echo '<p>', WT_I18N::translate('No results found.'), '</p>'; } echo '</div>'; } // Output Shared Notes if ($type == "note") { echo '<div id="find-output">'; if ($filter) { $mynotelist = search_notes($filter_array, array(WT_GED_ID), 'AND', true); } else { $mynotelist = get_note_list(WT_GED_ID); } if ($mynotelist) { usort($mynotelist, array('WT_GedcomRecord', 'Compare')); echo '<ul>'; foreach ($mynotelist as $note) { echo '<li><a href="', $note->getHtmlUrl(), '" onclick="pasteid(\'', $note->getXref(), '\');"><span class="list_item">', $note->getFullName(), '</span></a></li>'; } echo '</ul> <p>', WT_I18N::translate('Shared notes found'), ' ', count($mynotelist), '</p>'; } else { echo '<p>', WT_I18N::translate('No results found.'), '</p>'; } echo '</div>'; } // Output Sources
echo "<tr><td class=\"list_label\">", $pgv_lang["repos_found"], " ", count($repo_list); echo "</td></tr>"; } else { echo "<tr><td class=\"list_value_wrap\">"; echo $pgv_lang["no_results"]; echo "</td></tr>"; } echo "</table>"; } // Output Shared Notes if ($type == "note") { echo '<table class="tabs_table ', $TEXT_DIRECTION, ' width90">'; if ($filter) { $mynotelist = search_notes($filter_array, array(PGV_GED_ID), 'AND', true); } else { $mynotelist = get_note_list(PGV_GED_ID); } if ($mynotelist) { usort($mynotelist, array('GedcomRecord', 'Compare')); echo '<tr><td class="list_value_wrap"><ul>'; foreach ($mynotelist as $note) { echo '<li><a href="javascript:;" onclick="pasteid(\'', $note->getXref(), "', '", preg_replace("/(['\"])/", "\\\$1", PrintReady($note->getListName())), '\'); return false;"><span class="list_item">', PrintReady($note->getListName()), '</span></a></li>'; } echo '</ul></td></tr><tr><td class="list_label">', $pgv_lang['shared_notes_found'], ' ', count($mynotelist), '</td></tr>'; } else { echo '<tr><td class="list_value_wrap">', $pgv_lang['no_results'], '</td></tr>'; } echo '</table>'; } // Output Sources if ($type == "source") {