function linked_name($p, $url = './family.php') { global $_Link_to_person; return square_brace($p) . conc(to_url($url, array('person' => $p), get_name($p), get_name_and_lifespan($p))); }
$prev_person = fetch_val($query); if (!$prev_person) { // wrap around $query = "SELECT MAX(person_id) FROM persons"; } $prev_person = fetch_val($query); echo menu_item("./family.php?person={$prev_person}", "< {$_Previous}", get_name_and_lifespan($prev_person)); // "Next >" $query = "SELECT MIN(person_id) FROM persons WHERE person_id > {$person}"; $prev_person = fetch_val($query); if (!$prev_person) { // wrap around $query = "SELECT MIN(person_id) FROM persons"; } $next_person = fetch_val($query); echo menu_item("./family.php?person={$next_person}", "{$_Next} >", get_name_and_lifespan($next_person)); // Toggle is_public if (fetch_val("SELECT is_public({$person})") == 'f') { echo menu_item("./forms/person_toggle_pf.php?person={$person}", "{$_Mark_as} {$_Public}"); } else { echo menu_item("./forms/person_toggle_pf.php?person={$person}", "{$_Mark_as} {$_Private}"); } // Toggle dead_child if (fetch_val("SELECT dead_child({$person})") == 'f') { echo menu_item("./forms/person_toggle_dcf.php?person={$person}", "{$_Died_young}"); } else { echo menu_item("./forms/person_toggle_dcf.php?person={$person}", "{$_Not_died_young}"); } } echo "</table>\n"; echo "<!-- End of Navigation Sidebar -->\n";
$title_next = get_source_plain_text($props['next_page']); $title = "S:{$self} " . get_source_plain_text($self); // limit title tag to a sensible length if (mb_strlen($title) > 80) { $title = mb_substr($title, 0, 80) . '...'; } // var used by header.php to display context dependent menu items $source_manager = true; require "./header.php"; // ***************************************************************************** // main // ***************************************************************************** echo "<div class=\"normal\">\n"; echo "<h2>Node {$self}" . node_details($props['number_of_events'], $props['number_of_relations'], $props['number_of_subsources'], $props['number_of_unused_subsources']) . conc($props[$label], ': '); if ($principal = get_source_principal($self)) { echo conc($props['source_date']) . conc(get_name_and_lifespan($principal), ' av '); } echo "</h2>\n"; // full source text echo para(square_brace($props['sort_order']) . conc(square_brace($props['source_date'])) . conc($props['source_txt']) . conc(paren(to_url('./forms/source_edit.php', array('person' => 0, 'source' => $self, 'self' => 1), $_edit)))); // displays feedback from add_source depending on outcome; (not i18n'd yet) // see ddl/functions.sql function add_source() for details $new = isset($_GET['new']) ? $_GET['new'] : 0; if ($new && $new < 0) { $new = abs($new); echo '<p class="alert">Kilden finnes allerede, se nr. [' . to_url($_SERVER['PHP_SELF'], array('node' => $new), $new) . "]!</p>\n"; } // ***************************************************************************** // experimental section: print list of persons mentioned in this source // ***************************************************************************** if ($props['part_type'] == 1) {