Exemple #1
0
    ////////////////////////////////////////////////////////////////////////////////
    case 'editrawfact':
        $xref = Filter::get('xref', WT_REGEX_XREF);
        $fact_id = Filter::get('fact_id');
        $record = GedcomRecord::getInstance($xref, $WT_TREE);
        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();');
            return;
        }
        $controller->setPageTitle($record->getFullName() . ' - ' . I18N::translate('Edit raw GEDCOM'))->pageHeader();
        ?>
	<div id="edit_interface-page">
		<h4>
			<?php 
        echo $controller->getPageTitle();
        ?>
			<?php 
        echo FunctionsPrint::helpLink('edit_edit_raw');
        ?>
			<?php 
        FunctionsPrint::printSpecialCharacterLink('gedcom');
        ?>
Exemple #2
0
        $controller->setPageTitle(I18N::translate('Find a fact or event'))->addInlineJavascript('initPickFact("FAM");');
        break;
    case 'factSOUR':
        $controller->setPageTitle(I18N::translate('Find a fact or event'))->addInlineJavascript('initPickFact("SOUR");');
        break;
    case 'factREPO':
        $controller->setPageTitle(I18N::translate('Find a fact or event'))->addInlineJavascript('initPickFact("REPO");');
        break;
    case 'factNAME':
        $controller->setPageTitle(I18N::translate('Find a fact or event'))->addInlineJavascript('initPickFact("NAME");');
        break;
    case 'factPLAC':
        $controller->setPageTitle(I18N::translate('Find a fact or event'))->addInlineJavascript('initPickFact("PLAC");');
        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);
Exemple #3
0
        break;
    case 'send':
        // Only send messages if we've come straight from the compose page.
        if (!Session::get('good_to_send')) {
            Log::addAuthenticationLog('Attempt to send a message without visiting the compose page. Spam attack?');
            $action = 'compose';
        }
        if (!Filter::checkCsrf()) {
            $action = 'compose';
        }
        Session::forget('good_to_send');
        break;
}
switch ($action) {
    case 'compose':
        $controller->pageHeader()->addInlineJavascript('
		function checkForm(frm) {
			if (frm.subject.value === "") {
				alert("' . I18N::translate('Please enter a message subject.') . '");
				document.messageform.subject.focus();
				return false;
			}
			if (frm.body.value === "") {
				alert("' . I18N::translate('Please enter some message text before sending.') . '");
				document.messageform.body.focus();
				return false;
			}
			return true;
		}
	');
        echo '<span class="subheaders">', I18N::translate('Send a message'), '</span>';