示例#1
0
文件: genes.php 项目: LOVDnl/LOVD3
        // Load connected diseases.
        $_POST['created_date'] = substr($_POST['created_date'], 0, 10);
    }
    $_T->printHeader();
    $_T->printTitle();
    if (!lovd_error()) {
        print '      To edit this gene database, please complete the form below and press "Edit" at the bottom of the form.<BR>' . "\n" . '      <BR>' . "\n\n";
    }
    lovd_errorPrint();
    // Tooltip JS code.
    lovd_includeJS('inc-js-tooltip.php');
    lovd_includeJS('inc-js-custom_links.php');
    // Table.
    print '      <FORM action="' . $_PE[0] . '/' . $sID . '?' . ACTION . '" method="post">' . "\n";
    // Array which will make up the form table.
    $aForm = array_merge($_DATA->getForm(), array(array('', '', 'submit', 'Edit gene information entry')));
    lovd_viewForm($aForm);
    print '<INPUT type="hidden" name="workID" value="' . $_POST['workID'] . '">' . "\n";
    print '</FORM>' . "\n\n";
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 2 && preg_match('/^[a-z][a-z0-9#@-]*$/i', rawurldecode($_PE[1])) && ACTION == 'empty') {
    // URL: /genes/DMD?empty
    // Empty the gene database (delete all variants and associated data).
    $sID = rawurldecode($_PE[1]);
    define('PAGE_TITLE', 'Empty ' . $sID . ' gene database');
    define('LOG_EVENT', 'GeneEmpty');
    $_T->printHeader();
    $_T->printTitle();
    // Load appropriate user level for this gene.