$nDisabledTab = 1; } elseif (empty($aCategories['VariantOnGenome'])) { $nActiveTab = 1; $nDisabledTab = 0; } if (!empty($aCategories['VariantOnGenome'])) { require ROOT_PATH . 'class/object_genome_variants.php'; $_DATAvariants = new LOVD_GenomeVariant(); } if (!empty($aCategories['Individual'])) { require ROOT_PATH . 'class/object_individuals.php'; $_DATAindividuals = new LOVD_Individual(); } print ' <SCRIPT type="text/javascript">' . "\n" . ' $(function() {' . "\n" . ' $("#tabs").tabs({active: ' . $nActiveTab . ', disabled: [' . $nDisabledTab . ']});' . "\n" . ' });' . "\n" . ' </SCRIPT>' . "\n" . ' <DIV id="tabs">' . "\n" . ' <UL>' . "\n" . ' <LI><A href="' . lovd_getInstallURL() . implode('/', $_PE) . '#tabs-variants">Variants</A></LI>' . "\n" . ' <LI><A href="' . lovd_getInstallURL() . implode('/', $_PE) . '#tabs-individuals">Individuals</A></LI>' . "\n" . ' </UL>' . "\n" . ' <DIV id="tabs-variants">' . "\n"; if (!empty($_DATAvariants)) { $_DATAvariants->viewList('Variants_per_reference', $aColsToHide['VariantOnGenome'], true, true); } print ' </DIV>' . "\n" . ' <DIV id="tabs-individuals">' . "\n"; if (!empty($_DATAindividuals)) { $_DATAindividuals->viewList('Individuals_per_reference', $aColsToHide['Individual'], true, true); } print ' </DIV>' . "\n" . ' </DIV>'; $_T->printFooter(); exit; } if ($bImage) { header('Content-type: image/png'); readfile(ROOT_PATH . 'gfx/trans.png'); exit; } define('PAGE_TITLE', 'View data for reference: ' . $aPathElements[1]);
unset($_POST['password']); } } else { // Default session values. $_SESSION['viewlists']['Screenings_' . $nID . '_removeVariants']['checked'] = array(); } $_T->printHeader(); $_T->printTitle(); lovd_errorPrint(); lovd_showInfoTable('The variant entries below are all variants that can be removed from this screening. Variants that are not also added to another screening can not be removed.', 'information'); $_GET['page_size'] = 10; $_GET['search_screeningids'] = $nID; $_GET['search_id_'] = count($aInvalidVariants) ? '!' . implode(' !', $aInvalidVariants) : ''; require ROOT_PATH . 'class/object_genome_variants.php'; $_DATA = new LOVD_GenomeVariant(); $_DATA->viewList('Screenings_' . $nID . '_removeVariants', array('id_', 'screeningids', 'chromosome'), true, false, true, false, true); print ' <BR><BR>' . "\n\n"; // Table. print ' <FORM id="removeVariants" action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n"; // Array which will make up the form table. $aForm = array(array('POST', '', '', '', '0%', '0', '100%'), array('', '', 'print', 'Enter your password for authorization'), array('', '', 'password', 'password', 20), array('', '', 'print', '<INPUT type="submit" value="Save variant list" onclick="lovd_AJAX_viewListSubmit(\'Screenings_' . $nID . '_removeVariants\', function () { $(\'#removeVariants\').submit(); }); return false;"> <INPUT type="submit" value="Cancel" onclick="window.location.href=\'' . lovd_getInstallURL() . ($bSubmit ? 'submit/screening/' : 'screenings/') . $nID . '\'; return false;" style="border : 1px solid #FF4422;">')); lovd_viewForm($aForm); $_T->printFooter(); exit; } if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && ACTION == 'delete') { // URL: /screenings/0000000001?delete // Drop specific entry. $nID = sprintf('%010d', $_PE[1]); define('PAGE_TITLE', 'Delete screening information entry ' . $nID); define('LOG_EVENT', 'ScreeningDelete');
$_T->printFooter(); exit; } if (PATH_COUNT == 3 && $_PE[1] == 'upload' && ctype_digit($_PE[2]) && !ACTION) { // URL: /variants/upload/123451234567890 // View all genomic variant entries that were submitted in the given upload. $nID = sprintf('%015d', $_PE[2]); define('PAGE_TITLE', 'View genomic variants from upload #' . $nID); $_T->printHeader(); $_T->printTitle(); lovd_requireAUTH(LEVEL_MANAGER); require ROOT_PATH . 'class/object_genome_variants.php'; $_DATA = new LOVD_GenomeVariant(); $_GET['search_created_by'] = substr($nID, 0, 5); $_GET['search_created_date'] = date('Y-m-d H:i:s', substr($nID, 5, 10)); $_DATA->viewList('VOG_uploads', array('allele_'), false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER), false, true); $_T->printFooter(); exit; } if (!ACTION && !empty($_PE[1]) && !ctype_digit($_PE[1])) { // URL: /variants/DMD // URL: /variants/DMD/unique // URL: /variants/DMD/NM_004006.2 // URL: /variants/DMD/NM_004006.2/unique // View all entries in a specific gene, affecting a specific transcript. $bUnique = false; if (isset($_PE[2]) && $_PE[2] == 'unique' || isset($_PE[3]) && $_PE[3] == 'unique') { $bUnique = true; } $sGene = $_DB->query('SELECT id FROM ' . TABLE_GENES . ' WHERE id = ?', array(rawurldecode($_PE[1])))->fetchColumn(); if ($sGene) {