コード例 #1
0
ファイル: individuals.php プロジェクト: LOVDnl/LOVD3
            $_POST['statusid'] = STATUS_OK;
        }
    }
    $_T->printHeader();
    $_T->printTitle();
    if (GET) {
        print '      To edit an individual information entry, please fill out the form below.<BR>' . "\n" . '      <BR>' . "\n\n";
    }
    lovd_errorPrint();
    // Tooltip JS code.
    lovd_includeJS('inc-js-tooltip.php');
    lovd_includeJS('inc-js-custom_links.php');
    // Hardcoded ACTION because when we're publishing, but we get the form on screen (i.e., something is wrong), we want this to be handled as a normal edit.
    print '      <FORM action="' . CURRENT_PATH . '?edit" method="post">' . "\n";
    // Array which will make up the form table.
    $aForm = array_merge($_DATA->getForm(), array(array('', '', 'print', '<INPUT type="submit" value="Edit individual information entry">' . ($bSubmit ? '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="submit" value="Cancel" onclick="window.location.href=\'' . lovd_getInstallURL() . 'submit/individual/' . $nID . '\'; return false;" style="border : 1px solid #FF4422;">' : ''))));
    lovd_viewForm($aForm);
    print '</FORM>' . "\n\n";
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && ACTION == 'delete') {
    // URL: /individuals/00000001?delete
    // Drop specific entry.
    $nID = sprintf('%08d', $_PE[1]);
    define('PAGE_TITLE', 'Delete individual information entry ' . $nID);
    define('LOG_EVENT', 'IndividualDelete');
    // FIXME: What if individual also contains other user's data?
    lovd_isAuthorized('individual', $nID);
    lovd_requireAUTH(LEVEL_CURATOR);
    require ROOT_PATH . 'class/object_individuals.php';