//////////////////////////////////////////////////////////////////////////////// case 'editrawfact': $xref = WT_Filter::get('xref', WT_REGEX_XREF); $fact_id = WT_Filter::get('fact_id'); $record = WT_GedcomRecord::getInstance($xref); check_record_access($record); // Find the fact to edit $edit_fact = null; foreach ($record->getFacts() as $fact) { if ($fact->getFactId() == $fact_id && $fact->canEdit()) { $edit_fact = $fact; break; } } if (!$edit_fact) { $controller->pageHeader()->addInlineJavascript('closePopupAndReloadParent();'); exit; } $controller->setPageTitle($record->getFullName() . ' - ' . WT_I18N::translate('Edit raw GEDCOM'))->pageHeader(); ?> <div id="edit_interface-page"> <h4> <?php echo $controller->getPageTitle(); ?> <?php echo help_link('edit_edit_raw'); ?> <?php print_specialchar_link('gedcom'); ?>
if (Auth::id()) { // Users will probably always want the same language, so remember their setting if (!$language_filter) { $language_filter = Auth::user()->getSetting('default_language_filter'); } else { Auth::user()->setSetting('default_language_filter', $language_filter); } } require WT_ROOT . 'includes/specialchars.php'; $action = "filter"; break; case "facts": $controller->setPageTitle(WT_I18N::translate('Find a fact or event'))->addInlineJavascript('initPickFact();'); break; } $controller->pageHeader(); echo '<script>'; ?> function pasteid(id, name, thumb) { if (thumb) { window.opener.<?php echo $callback; ?> (id, name, thumb); <?php echo "window.close();"; ?> } else { // GEDFact_assistant ======================== if (window.opener.document.getElementById('addlinkQueue')) { window.opener.insertRowToTable(id, name);
$subject = WT_Filter::post('subject', null, WT_Filter::get('subject')); $body = WT_Filter::post('body'); $from_name = WT_Filter::post('from_name'); $from_email = WT_Filter::post('from_email'); $action = WT_Filter::post('action', 'compose|send', 'compose'); $to = WT_Filter::post('to', null, WT_Filter::get('to')); $method = WT_Filter::post('method', 'messaging|messaging2|messaging3|mailto|none', WT_Filter::get('method', 'messaging|messaging2|messaging3|mailto|none', 'messaging2')); $url = WT_Filter::postUrl('url', WT_Filter::getUrl('url')); $controller = new WT_Controller_Simple(); $controller->setPageTitle(WT_I18N::translate('webtrees message')); $to_user = User::findByIdentifier($to); // Only admins can send broadcast messages if ((!$to_user || $to == 'all' || $to == 'last_6mo' || $to == 'never_logged') && !Auth::isAdmin()) { // TODO, what if we have a user called "all" or "last_6mo" or "never_logged" ??? WT_FlashMessages::addMessage(WT_I18N::translate('Message was not sent')); $controller->pageHeader(); $controller->addInlineJavascript('window.opener.location.reload(); window.close();'); exit; } $errors = ''; // Is this message from a member or a visitor? if (WT_USER_ID) { $from = WT_USER_NAME; } else { // Visitors must provide a valid email address if ($from_email && (!preg_match("/(.+)@(.+)/", $from_email, $match) || function_exists('checkdnsrr') && checkdnsrr($match[2]) === false)) { $errors .= '<p class="ui-state-error">' . WT_I18N::translate('Please enter a valid email address.') . '</p>'; $action = 'compose'; } // Do not allow anonymous visitors to include links to external sites if (preg_match('/(?!' . preg_quote(WT_SERVER_NAME, '/') . ')(((?:ftp|http|https):\\/\\/)[a-zA-Z0-9.-]+)/', $subject . $body, $match)) {