// FIXME; perhaps a HTTP/1.0 501 Not Implemented? If so, provide proper output (gene not found) and // test if browsers show that output or their own error page. Also, then, use the same method at // the bottom of all files, as a last resort if command/URL is not understood. Do all of this LATER. exit; } } define('PAGE_TITLE', 'View all screenings' . (isset($sGene) ? ' for gene ' . $sGene : '')); $_T->printHeader(); $_T->printTitle(); $aColsToHide = array(); if (isset($sGene)) { $aColsToHide[] = 'genes'; } require ROOT_PATH . 'class/object_screenings.php'; $_DATA = new LOVD_Screening(); $_DATA->viewList('Screenings', $aColsToHide, false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER), false, true); $_T->printFooter(); exit; } if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && !ACTION) { // URL: /screenings/0000000001 // View specific entry. $nID = sprintf('%010d', $_PE[1]); define('PAGE_TITLE', 'View screening #' . $nID); $_T->printHeader(); $_T->printTitle(); // Load appropriate user level for this screening entry. lovd_isAuthorized('screening', $nID); require ROOT_PATH . 'class/object_screenings.php'; $_DATA = new LOVD_Screening($nID); $zData = $_DATA->viewEntry($nID);
$_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(); $_DATA->setSortDefault('id'); $_DATA->viewList('Screenings_for_I_VE', array('screeningid', 'individualid', 'created_date', 'edited_date'), true, true); unset($_GET['search_individualid']); $_GET['search_screeningid'] = implode('|', $zData['screeningids']); print '<BR><BR>' . "\n\n"; $_T->printTitle('Variants', 'H4'); require ROOT_PATH . 'class/object_custom_viewlists.php'; // VOG needs to be first, so it groups by the VOG ID. $_DATA = new LOVD_CustomViewList(array('VariantOnGenome', 'Scr2Var', 'VariantOnTranscript')); $_DATA->viewList('CustomVL_VOT_for_I_VE', array(), false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER)); } $_T->printFooter(); exit; } if (PATH_COUNT == 1 && ACTION == 'create') { // URL: /individuals?create // Create a new entry.
$nID = sprintf('%08d', $_PE[2]); define('PAGE_TITLE', 'Select screening to add variant to'); $_T->printHeader(); $_T->printTitle(); $bExists = $_DB->query('SELECT COUNT(*) FROM ' . TABLE_INDIVIDUALS . ' WHERE id = ?', array($nID))->fetchColumn(); if (!$bExists || !isset($_AUTH['saved_work']['submissions']['individual'][$nID])) { lovd_showInfoTable('No such ID!', 'stop'); $_T->printFooter(); exit; } require ROOT_PATH . 'class/object_screenings.php'; $_DATA = new LOVD_Screening(); $_GET['search_individualid'] = $nID; $_GET['page_size'] = '10'; $_DATA->setRowLink('Screenings_submissions', 'variants?create&target=' . $_DATA->sRowID); $_DATA->viewList('Screenings_submissions', array('individualid', 'owned_by_', 'created_date'), false, false); $_T->printFooter(); exit; } if (PATH_COUNT == 3 && $_PE[1] == 'screening' && ctype_digit($_PE[2]) && !ACTION) { // URL: /submit/screening/00000001 // Screening submission global $_DB, $_AUTH; define('LOG_EVENT', 'SubmitScreening'); lovd_requireAUTH(LEVEL_SUBMITTER); $nID = sprintf('%010d', $_PE[2]); $zData = $_DB->query('SELECT * FROM ' . TABLE_SCREENINGS . ' WHERE id = ? AND created_by = ?', array($nID, $_AUTH['id']))->fetchAssoc(); if (empty($zData)) { define('PAGE_TITLE', 'Submit'); $_T->printHeader(); $_T->printTitle();
} else { lovd_showInfoTable('No submissions of individuals found!', 'stop'); } $_T->printTitle('Screenings', 'H4'); $aUnfinished = !empty($zData['saved_work']['submissions']['screening']) ? array_keys($zData['saved_work']['submissions']['screening']) : array(); if (!empty($aUnfinished)) { require ROOT_PATH . 'class/object_screenings.php'; $_DATA = new LOVD_Screening(); $_GET['search_screeningid'] = implode('|', $aUnfinished); $_GET['page_size'] = '10'; if ($_AUTH['id'] == $nID) { $_DATA->setRowLink('Screenings_submissions', 'submit/screening/' . $_DATA->sRowID); } else { $_DATA->setRowLink('Individuals_submissions', 'screenings/' . $_DATA->sRowID); } $_DATA->viewList('Screenings_submissions', array('owned_by_', 'created_date', 'edited_date'), false, false, true, false, true); } else { lovd_showInfoTable('No submissions of variant screenings found!', 'stop'); } $_T->printFooter(); exit; } if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && ACTION == 'share_access') { // URL: /users/00001?share_access // Let the user share access to his objects to other users. $nID = sprintf('%05d', $_PE[1]); define('PAGE_TITLE', 'Sharing access'); define('LOG_EVENT', 'ShareAccess'); require_once ROOT_PATH . 'class/object_users.php'; require ROOT_PATH . 'inc-lib-form.php'; // Boolean flag setting whether users can give edit-permissions to their colleagues.