print '</FORM>' . "\n\n"; $_T->printFooter(); exit; } if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && ACTION == 'delete') { // URL: /phenotypes/0000000001?delete // Drop specific entry. $nID = sprintf('%010d', $_PE[1]); define('PAGE_TITLE', 'Delete phenotype #' . $nID); define('LOG_EVENT', 'PhenotypeDelete'); // FIXME; hier moet een goede controle komen, wanneer lager is toegestaan. // Load appropriate user level for this phenotype entry. lovd_isAuthorized('phenotype', $nID); lovd_requireAUTH(LEVEL_CURATOR); require ROOT_PATH . 'class/object_phenotypes.php'; $_DATA = new LOVD_Phenotype('', $nID); $zData = $_DATA->loadEntry($nID); require ROOT_PATH . 'inc-lib-form.php'; if (!empty($_POST)) { lovd_errorClean(); // Mandatory fields. if (empty($_POST['password'])) { lovd_errorAdd('password', 'Please fill in the \'Enter your password for authorization\' field.'); } // User had to enter his/her password for authorization. if ($_POST['password'] && !lovd_verifyPassword($_POST['password'], $_AUTH['password'])) { lovd_errorAdd('password', 'Please enter your correct password for authorization.'); } if (!lovd_error()) { // Get genes which are modified before we delete the entry. // Only when phenotype, individual and variant are marked or public.
} } lovd_showJGNavigation($aNavigation, 'Individuals'); print '<BR><BR>' . "\n\n"; if (!empty($zData['phenotypes'])) { // List of phenotype entries associated with this person, per disease. $_GET['search_individualid'] = $nID; $_T->printTitle('Phenotypes', 'H4'); // Repeat searching for diseases, since this individual might have phenotype entry for a disease he doesn't have. $zData['diseases'] = $_DB->query('SELECT id, symbol, name FROM ' . TABLE_DISEASES . ' WHERE id IN (?' . str_repeat(', ?', count($zData['phenotypes']) - 1) . ')', $zData['phenotypes'])->fetchAllRow(); require ROOT_PATH . 'class/object_phenotypes.php'; foreach ($zData['diseases'] as $aDisease) { list($nDiseaseID, $sSymbol, $sName) = $aDisease; if (in_array($nDiseaseID, $zData['phenotypes'])) { $_GET['search_diseaseid'] = $nDiseaseID; $_DATA = new LOVD_Phenotype($nDiseaseID); print '<B>' . $sName . ' (<A href="diseases/' . $nDiseaseID . '">' . $sSymbol . '</A>)</B> <A href="phenotypes?create&target=' . $nID . '&diseaseid=' . $nDiseaseID . '"><IMG src="gfx/plus.png"></A> Add phenotype for this disease'; $_DATA->viewList('Phenotypes_for_I_VE_' . $nDiseaseID, array('phenotypeid', 'individualid', 'diseaseid'), true, true); } } unset($_GET['search_individualid']); unset($_GET['search_diseaseid']); } else { lovd_showInfoTable('No phenotypes found for this individual!', 'stop'); } if (count($zData['screeningids'])) { $_GET['search_individualid'] = $nID; print '<BR><BR>' . "\n\n"; $_T->printTitle('Screenings', 'H4'); require ROOT_PATH . 'class/object_screenings.php'; $_DATA = new LOVD_Screening();