Example #1
0
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 2 && preg_match('/^[a-z][a-z0-9#@-]*$/i', rawurldecode($_PE[1])) && !ACTION) {
    // URL: /genes/DMD
    // View specific entry.
    $sID = rawurldecode($_PE[1]);
    define('PAGE_TITLE', 'View ' . $sID . ' gene homepage');
    $_T->printHeader();
    $_T->printTitle();
    lovd_printGeneHeader();
    // Load appropriate user level for this gene.
    lovd_isAuthorized('gene', $sID);
    require ROOT_PATH . 'class/object_genes.php';
    $_DATA = new LOVD_Gene();
    $zData = $_DATA->viewEntry($sID);
    // 2015-07-22; 3.0-14; Drop usage of CURRENT_PATH in favor of fixed $sID which may have a gene symbol with incorrect case.
    // Now fix possible issues with capitalization. inc-init.php does this for $_SESSION['currdb'], but we're using $sID.
    $sID = $zData['id'];
    $aNavigation = array();
    if ($_AUTH && $_AUTH['level'] >= LEVEL_CURATOR) {
        // Authorized user is logged in. Provide tools.
        $aNavigation[$_PE[0] . '/' . $sID . '?edit'] = array('menu_edit.png', 'Edit gene information', 1);
        $aNavigation['transcripts/' . $sID . '?create'] = array('menu_plus.png', 'Add transcript(s) to gene', 1);
        if ($_AUTH['level'] >= LEVEL_MANAGER) {
            $aNavigation[$_PE[0] . '/' . $sID . '?delete'] = array('cross.png', 'Delete gene entry', 1);
            $aNavigation[$_PE[0] . '/' . $sID . '?authorize'] = array('', 'Add/remove curators/collaborators', 1);
        } else {
            $aNavigation[$_PE[0] . '/' . $sID . '?sortCurators'] = array('', 'Sort/hide curator names', 1);
        }
        $aNavigation[$_PE[0] . '/' . $sID . '?empty'] = array('menu_empty.png', 'Empty this gene database', (bool) $zData['variants']);