$controller->pageHeader()->addInlineJavascript('closePopupAndReloadParent();'); exit; } $controller->setPageTitle($record->getFullName() . ' - ' . WT_I18N::translate('Edit'))->pageHeader(); echo '<div id="edit_interface-page">'; echo '<h4>', $controller->getPageTitle(), '</h4>'; init_calendar_popup(); echo '<form name="editform" method="post" action="edit_interface.php" enctype="multipart/form-data">'; echo '<input type="hidden" name="ged" value="', WT_Filter::escapeHtml(WT_GEDCOM), '">'; echo '<input type="hidden" name="action" value="update">'; echo '<input type="hidden" name="fact_id" value="', $fact_id, '">'; echo '<input type="hidden" name="xref" value="', $xref, '">'; echo '<input type="hidden" name="prev_action" value="edit">'; echo WT_Filter::getCsrf(); echo '<table class="facts_table">'; create_edit_form($record, $edit_fact); echo keep_chan($record); echo '</table>'; $level1type = $edit_fact->getTag(); switch ($record::RECORD_TYPE) { case 'OBJE': case 'NOTE': // OBJE and NOTE facts are all special, and none can take lower-level links break; case 'SOUR': case 'REPO': // SOUR and REPO facts may only take a NOTE if ($level1type != 'NOTE') { print_add_layer('NOTE'); } break;
function main() { if (isset($_GET['day'])) { $day = $_GET['day']; } else { $day = date('Y-m-d'); } check_post_values(); create_html_start(); show_error_msg(); create_edit_form($day); create_html_end(); }
//------------------------------------------------------------------------------ //-- edit a fact record in a form case 'edit_family': init_calendar_popup(); echo "<form method=\"post\" action=\"edit_interface.php\" enctype=\"multipart/form-data\">\n"; echo "<input type=\"hidden\" name=\"action\" value=\"update\" />\n"; echo "<input type=\"hidden\" name=\"famid\" value=\"{$famid}\" />\n"; echo "<br /><input type=\"submit\" value=\"", $pgv_lang["save"], "\" /><br />\n"; echo "<table class=\"facts_table\">"; $gedlines = explode("\n", $gedrec); // -- find the number of lines in the record $empty = true; for ($i = $linenum; $i < count($gedlines); $i++) { $fields = explode(' ', $gedlines[$i]); if (substr($gedlines[$i], 0, 1) < 2 && $fields[1] != "HUSB" && $fields[1] != "WIFE" && $fields[1] != "CHIL" && $fields[1] != "CHAN") { $level1type = create_edit_form($gedrec, $i, $level0type); echo "<input type=\"hidden\" name=\"linenum[]\" value=\"{$i}\" />\n"; $empty = false; } } if ($empty) { $linenum = count($gedlines); create_add_form("MARR"); echo "<input type=\"hidden\" name=\"linenum[]\" value=\"{$i}\" />\n"; } if (PGV_USER_IS_ADMIN) { echo "<tr><td class=\"descriptionbox ", $TEXT_DIRECTION, " wrap width25\">"; print_help_link("no_update_CHAN_help", "qm", "no_update_CHAN"); echo $pgv_lang["admin_override"], "</td><td class=\"optionbox wrap\">\n"; if ($NO_UPDATE_CHAN) { echo "<input type=\"checkbox\" checked=\"checked\" name=\"preserve_last_changed\" />\n";