当前位置: 首页>>代码示例>>PHP>>正文


PHP lovd_getInstallURL函数代码示例

本文整理汇总了PHP中lovd_getInstallURL函数的典型用法代码示例。如果您正苦于以下问题:PHP lovd_getInstallURL函数的具体用法?PHP lovd_getInstallURL怎么用?PHP lovd_getInstallURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lovd_getInstallURL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

// Define the list of VariantOnTranscript columns once and for all.
$aVOTCols = array('VariantOnTranscript/Distance_to_splice_site', 'VariantOnTranscript/GVS/Function', 'VariantOnTranscript/PolyPhen', 'VariantOnTranscript/Position');
// We also need to get a list of standard VariantOnTranscript columns.
$aColsStandard = $_DB->query('SELECT id FROM ' . TABLE_COLS . ' WHERE standard = 1 AND id IN ("' . implode('", "', $aVOTCols) . '")')->fetchAllColumn();
$sColumnMessage = '';
if (!$_DB->query('SELECT colid FROM ' . TABLE_ACTIVE_COLS . ' WHERE colid = "VariantOnGenome/Conservation_score/GERP"')->fetchColumn()) {
    // Check whether the GERP column is enabled.
    $sColumnMessage = '<BR>VariantOnGenome/Conservation_score/GERP: currently not enabled (<A href="#" onclick="lovd_openWindow(\'' . lovd_getInstallURL() . 'columns/VariantOnGenome/Conservation_score/GERP?add&amp;in_window=true\', \'col\', 800, 300); return false;">enable</A>)';
}
// Check if all VariantOnTranscript columns are activated for all genes and whether they are standard.
$nGenes = $_DB->query('SELECT COUNT(*) FROM ' . TABLE_GENES)->fetchColumn();
$aColCounts = $_DB->query('SELECT colid, COUNT(*) AS count FROM ' . TABLE_SHARED_COLS . ' WHERE colid IN ("' . implode('", "', $aVOTCols) . '") GROUP BY colid')->fetchAllCombine();
foreach ($aVOTCols as $sCol) {
    $b = true;
    if (!isset($aColCounts[$sCol]) && $nGenes || isset($aColCounts[$sCol]) && $aColCounts[$sCol] != $nGenes) {
        $sColumnMessage .= '<BR>' . $sCol . ': not enabled for some existing genes (<A href="#" onclick="lovd_openWindow(\'' . lovd_getInstallURL() . 'columns/' . $sCol . '?add&amp;in_window=true\', \'col\', 800, 450); return false;">enable</A>)';
        $b = false;
    }
    if (!in_array($sCol, $aColsStandard)) {
        if ($b) {
            $sColumnMessage .= '<BR>' . $sCol . ': ';
        } else {
            $sColumnMessage .= ' and ';
        }
        $sColumnMessage .= 'not enabled for new genes (<A href="#" onclick="lovd_setStandardColumn(\'' . $sCol . '\'); return false;">make standard</A>)';
    }
}
if (!empty($sColumnMessage)) {
    // Only show the infoTable if we have found problematic columns.
    lovd_showInfoTable('SeattleSeq files may contain additional annotations that can be imported into LOVD. To import this data into existing genes, the relevant columns need to be enabled for those genes.' . "\n" . 'To import this data into genes that will be created during import, the columns need to be set to \'standard\' so that they are enabled for the new genes.' . "\n" . '(<A href="#" onclick="lovd_checkColumns(); return false;">Re-check</A>)<BR>' . $sColumnMessage);
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:check_seattleseq_columns.php

示例2: lovd_AJAX_viewListHideRow

                    if (objHTTP.responseText.substring(0, 1) == '1') {
                        // Object successfully deleted.
                        lovd_AJAX_viewListHideRow(sViewListID, sID);
                        document.forms['viewlistForm_' + sViewListID].total.value --;
                        lovd_AJAX_viewListUpdateEntriesString(sViewListID);
                        lovd_AJAX_viewListAddNextRow(sViewListID);
                        return true;
                    } else if (objHTTP.responseText == '8') {
                        window.alert('Lost your session. Please log in again.');
                    } else if (objHTTP.responseText == '9') {
                        window.alert('Error while sending data. Please try again.');
                    } else if (!objHTTP.responseText || objHTTP.responseText == '0') {
                        // Silent failure.
                        return false;
                    } else {
                        window.alert('Unknown response :' + objHTTP.responseText);
                    }
                } else {
                    // FIXME; Maybe we should remove this...?
                    window.alert('Server error: ' + objHTTP.status);
                }
            }
        }
        objHTTP.open('GET', '<?php 
echo lovd_getInstallURL() . 'ajax/delete_log.php?id=';
?>
' + escape(sID), true);
        objHTTP.send(null);
    }
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:30,代码来源:inc-js-logs.php

示例3: __construct

 function __construct($sType = 'feed', $sFeedTitle = '', $sFeedURL = '', $sFeedID = '', $sFormat = 'atom')
 {
     global $_CONF, $_DB, $_SETT, $_STAT;
     // Feed or entry only options.
     if (!in_array($sType, array('feed', 'entry'))) {
         $sType = 'feed';
         // Silent error - we just assume Feed when we don't understand the requested type.
     }
     $this->sType = $sType;
     // So addEntry() knows what to do.
     if (preg_match($this->sAtomEntrySplit, $this->sAtomFeed, $aRegs)) {
         $this->sAtomEntry = $aRegs[1];
     } else {
         // Can't parse own $sAtomFeed, bug in LOVD (or someone has messed with the code).
         lovd_displayError('Feed', 'Couldn\'t parse AtomFeed. This is a bug in LOVD or in one of it\'s modules. Please <A href="' . $_SETT['upstream_URL'] . 'bugs/" target="_blank">file a bug</A> and include the below messages to help us solve the problem.' . "\n" . 'Debug: ' . lovd_getProjectFile() . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''));
     }
     if ($sType == 'feed') {
         // Fill in the feed's variables.
         $this->sAtomFeed = str_replace('{{ FEED_TITLE }}', $sFeedTitle, $this->sAtomFeed);
         $this->sAtomFeed = str_replace('{{ LOVD_URL }}', $_CONF['location_url'] ? $_CONF['location_url'] : lovd_getInstallURL(), $this->sAtomFeed);
         $this->sAtomFeed = str_replace('{{ FEED_URL }}', $sFeedURL, $this->sAtomFeed);
         $this->sAtomFeed = str_replace('{{ FEED_ID }}', $sFeedID ? $sFeedID : 'tag:' . $_SERVER['HTTP_HOST'] . ',' . $_STAT['install_date'] . ':' . $_STAT['signature'], $this->sAtomFeed);
         $this->sAtomFeed = str_replace('{{ LOVD_VERSION }}', $_SETT['system']['version'], $this->sAtomFeed);
         // Let the date of last update depend on the type of feed.
         if (preg_match('/\\/variants\\/(.+)$/', $sFeedURL, $aRegs)) {
             // Variants of a specific gene.
             $sDateUpdated = $_DB->query('SELECT MAX(updated_date) FROM ' . TABLE_GENES . ' WHERE id = ?', array($aRegs[1]))->fetchColumn();
         } else {
             // Find date of last update for all genes.
             $sDateUpdated = $_DB->query('SELECT MAX(updated_date) FROM ' . TABLE_GENES)->fetchColumn();
         }
         $this->sAtomFeed = str_replace('{{ FEED_DATE_UPDATED }}', $this->formatDate($sDateUpdated), $this->sAtomFeed);
         // For now, remove any of the entries until they are added using addEntry().
         $this->sAtomFeed = preg_replace($this->sAtomEntrySplit, '{{ ENTRY }}', $this->sAtomFeed);
     } else {
         // Only one entry requested.
         // Remove all, except the XML start entity!
         $this->sAtomFeed = preg_replace('/^(.+[\\r\\n]{1,2})(.|[\\r\\n]{1,2})+$/', "\$1{{ ENTRY }}", $this->sAtomFeed);
     }
 }
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:40,代码来源:feeds.php

示例4: CONCAT

$nMaxDropDown = 10;
$qGenes = $_DB->query('SELECT id AS value, CONCAT(id, " (", name, ")") AS label FROM ' . TABLE_GENES . ' ORDER BY id');
$zGenes = $qGenes->fetchAllAssoc();
if (empty($zGenes)) {
    die(json_encode(AJAX_DATA_ERROR));
}
foreach ($zGenes as $key => $aValues) {
    // This will shorten the gene names nicely, to prevent long gene names from messing up the form.
    $zGenes[$key]['label'] = lovd_shortenString($aValues['label'], 75);
}
if (count($zGenes) < $nMaxDropDown) {
    // Create the option elements.
    // Try to determine the currently selected gene, so we can pre-select that one,
    // making it easier to select genes close alphabetically, and also ensuring the
    // onChange() to run if the first gene from the list is selected.
    // This code is similar to inc-init.php's parsing to find CurrDB.
    $sCurrDB = '';
    if (!empty($_SERVER['HTTP_REFERER']) && preg_match('/^' . preg_quote(lovd_getInstallURL(), '/') . '(configuration|genes|transcripts|variants|individuals|view)\\/([^\\/]+)/', $_SERVER['HTTP_REFERER'], $aRegs)) {
        if (!in_array($aRegs[2], array('in_gene', 'upload')) && !ctype_digit($aRegs[2])) {
            $sCurrDB = strtoupper($aRegs[2]);
            // Not checking capitalization here yet.
        }
    }
    $sOptions = '';
    foreach ($zGenes as $aGene) {
        $sOptions .= '<OPTION value="' . $aGene['value'] . '"' . (!$sCurrDB || $sCurrDB != strtoupper($aGene['value']) ? '' : ' selected') . '>' . $aGene['label'] . ' </OPTION>' . "\n";
    }
    die(json_encode(array('switchType' => 'dropdown', 'html' => '<FORM action="" id="SelectGeneDBInline" method="get" style="margin : 0px;" onsubmit="lovd_changeURL(); return false;">' . "\n" . '  <DIV id="div_gene_dropdown">' . "\n" . '    <SELECT name="select_db" id="select_gene_dropdown" onchange="$(this).parent().parent().submit();">' . "\n" . $sOptions . '    </SELECT>' . "\n" . '    <INPUT type="submit" value="Switch" id="select_gene_switch">' . "\n" . '  </DIV>' . "\n" . '</FORM>')));
} else {
    die(json_encode(array('switchType' => 'autocomplete', 'html' => '<FORM action="" id="SelectGeneDBInline" method="get" style="margin : 0px;" onsubmit="lovd_changeURL(); return false;">' . "\n" . '  <DIV id="div_gene_autocomplete">' . "\n" . '    <INPUT name="select_db" id="select_gene_autocomplete" style="width : 75ex;">' . "\n" . '    <INPUT type="submit" value="Switch" id="select_gene_switch">' . "\n" . '  </DIV>' . "\n" . '</FORM>', 'data' => $zGenes)));
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:get_gene_switcher.php

示例5: drawHTML

 function drawHTML()
 {
     // Prints the current tree in HTML format.
     if (!$this->tree) {
         return false;
     }
     // Check if all widths have been calculated already, which is needed for the HTML print.
     if (!isset($this->tree[0]['tree_width'])) {
         $this->calculateWidths($this->tree);
     }
     // Print the tree!
     $a = $this->tree;
     $aNextTree = array();
     // The next drawn line are just branches, no individuals.
     print '<DIV id="pedigreeIndividualDetail" title="Individual" style="display : none;"></DIV>' . "\n" . '<TABLE border="0" cellspacing="0" cellpadding="0" style="margin-right : 400px;">' . "\n";
     while ($a) {
         print '  <TR>' . "\n";
         // Open generation line.
         if ($aNextTree) {
             // The previous line that was drawn is a line of individuals. This line will be just connecting lines.
             foreach ($aNextTree as $sVal) {
                 if (!$sVal) {
                     // Empty set, to make space.
                     print '    <TD>&nbsp;</TD>' . "\n";
                 } else {
                     print '    <TD><IMG src="gfx/pedigree/' . ($this->sMode == 'pedigree' ? '' : '100x100/') . 'l' . $sVal . '.png"></TD>' . "\n";
                 }
             }
             print '  </TR>' . "\n";
             $aNextTree = array();
             continue;
         }
         $aNextGeneration = array();
         // For the next generation.
         foreach ($a as $i => $aIndividual) {
             // One individual, or one set of spouses.
             if (!$aIndividual) {
                 // FIXME; when does this really happen?
                 // Empty set, to make space.
                 print '    <TD>&nbsp;</TD>' . "\n";
                 continue;
             } else {
                 // We'll always put one space on the left of each individual, such that we will
                 // automatically create the "padding" we're looking for.
                 if ($i) {
                     $aNextTree[] = '';
                     print '    <TD>&nbsp;</TD>' . "\n";
                 }
                 // Space at left?
                 $nSpace = $aIndividual['tree_width'] < $aIndividual['own_width'] ? 0 : $aIndividual['tree_width'] - $aIndividual['own_width'];
                 // 0 or more.
                 for ($i = $nSpace / 2; $i > 0; $i--) {
                     print '    <TD>&nbsp;</TD>' . "\n";
                 }
                 // Print individual itself.
                 foreach ($aIndividual['ids'] as $nKey => $nID) {
                     $aI = $this->individuals[$nID];
                     if ($nKey) {
                         // Not the first.
                         print '    <TD><IMG src="gfx/pedigree/' . ($this->sMode == 'pedigree' ? '' : '100x100/') . 'l14.png"></TD>' . "\n";
                     }
                     // What kind of line should this individual have in the background?
                     $nLine = 0;
                     // No line by default.
                     if ($aI['father'] || $aI['mother']) {
                         $nLine += 1;
                         // Line to top.
                     }
                     if (!$nKey && count($aIndividual['ids']) > 1) {
                         $nLine += 2;
                         // The first, but not alone, add line to right.
                     } elseif ($nKey) {
                         $nLine += 8;
                         // Not the first, add line to left.
                     }
                     // Individual with children but without spouse, gets a line to the bottom.
                     if (count($aIndividual['ids']) == 1 && count($aIndividual['children'])) {
                         $nLine += 4;
                     }
                     // Print the individuals themselves as well.
                     if ($this->sMode == 'pedigree') {
                         // And what do we have to say about this person?
                         $sDescription = '<B>' . $aI['name'] . '</B><BR>';
                         print '    <TD><A href="#"' . "\n" . '      onmouseover="lovd_showToolTip(\'' . str_replace('"', '\\\'', $sDescription) . '\');" onmouseout="lovd_hideToolTip();"' . "\n" . '      onclick="lovd_openWindow(\'' . lovd_getInstallURL() . 'individuals/' . $nID . '\', \'pedigreeIndividualDetail\', 900, 450); return false;">' . "\n" . '        <IMG src="gfx/pedigree/u' . $aI['gender'] . ($aI['diseases'] ? 'a' : 'u') . '.png" style="background : url(\'gfx/pedigree/l0' . $nLine . '.png\');"></A></TD>' . "\n";
                     } else {
                         // Family tree style.
                         $sImage = 'gfx/individuals/' . (!is_readable(ROOT_PATH . 'gfx/individuals/' . $nID . '.jpg') ? 'unknown_' . $aI['gender'] : $nID) . '.jpg';
                         list($nWidth, $nHeight) = getimagesize(ROOT_PATH . $sImage);
                         if ($nWidth > $nHeight && $nWidth > 100) {
                             $nHeight = 100 / $nWidth * $nHeight;
                         } else {
                             $nHeight = 100;
                         }
                         // FIXME: Display the name nicely (shorten in intelligent way).
                         $sName = $aI['name'];
                         print '    <TD align="center" style="position : relative;"><A href="#"' . "\n" . '      onclick="lovd_openWindow(\'' . lovd_getInstallURL() . 'individuals/' . $nID . '\', \'pedigreeIndividualDetail\', 900, 450); return false;">' . "\n" . '        <IMG src="' . $sImage . '" alt="' . $aI['name'] . '" title="' . $aI['name'] . '" height="' . $nHeight . '" style="background : url(\'gfx/pedigree/100x100/l0' . $nLine . '.png\');"></A>' . "\n" . '      <DIV style="width : 100%; height : 10px; background : #000; color : #FFF; opacity : 0.6; position : absolute; bottom : 0px; z-index : 100; font-size:10px; text-align : center;"><B>' . $sName . '</B></DIV>' . "\n" . '    </TD>' . "\n";
                     }
                 }
                 // Space at right?
                 for ($i = $nSpace / 2; $i > 0; $i--) {
//.........这里部分代码省略.........
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:101,代码来源:pedigree.php

示例6: lovd_errorClean

     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()) {
         // Query text.
         $_DATA->deleteEntry($sColumnID);
         // Write to log...
         lovd_writeLog('Event', LOG_EVENT, 'Deleted column ' . $sColumnID);
         // Thank the user...
         header('Refresh: 3; url=' . lovd_getInstallURL() . $_PE[0] . '/' . $sCategory);
         $_T->printHeader();
         $_T->printTitle();
         lovd_showInfoTable('Successfully deleted the column ' . $sColumnID . '!', 'success');
         $_T->printFooter();
         exit;
     } else {
         // Because we're sending the data back to the form, I need to unset the password field!
         unset($_POST['password']);
     }
 }
 $_T->printHeader();
 $_T->printTitle();
 lovd_errorPrint();
 // Table.
 print '      <FORM action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n";
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:columns.php

示例7: ON

     }
     if (!lovd_error()) {
         // Get genes which are modified before we delete the entry.
         // Only when phenotype, individual and variant are marked or public.
         if ($zData['statusid'] >= STATUS_MARKED) {
             $aGenes = $_DB->query('SELECT DISTINCT t.geneid FROM ' . TABLE_TRANSCRIPTS . ' AS t ' . 'INNER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot ON (vot.transcriptid = t.id) ' . 'INNER JOIN ' . TABLE_VARIANTS . ' AS vog ON (vog.id = vot.id) ' . 'INNER JOIN ' . TABLE_SCR2VAR . ' AS s2v ON (s2v.variantid = vog.id) ' . 'INNER JOIN ' . TABLE_SCREENINGS . ' AS s ON (s.id = s2v.screeningid) ' . 'INNER JOIN ' . TABLE_INDIVIDUALS . ' AS i ON (i.id = s.individualid) ' . 'INNER JOIN ' . TABLE_PHENOTYPES . ' AS p ON (p.individualid = i.id) ' . 'WHERE vog.statusid >= ? AND i.statusid >= ? AND p.id = ?', array(STATUS_MARKED, STATUS_MARKED, $nID))->fetchAllColumn();
         }
         $_DATA->deleteEntry($nID);
         if ($zData['statusid'] >= STATUS_MARKED && $aGenes) {
             // Change updated date for genes.
             lovd_setUpdatedDate($aGenes);
         }
         // Write to log...
         lovd_writeLog('Event', LOG_EVENT, 'Deleted phenotype information entry ' . $nID . ' (Owner: ' . $zData['owner'] . ')');
         // Thank the user...
         header('Refresh: 3; url=' . lovd_getInstallURL() . 'individuals/' . $zData['individualid']);
         $_T->printHeader();
         $_T->printTitle();
         lovd_showInfoTable('Successfully deleted the phenotype information entry!', 'success');
         $_T->printFooter();
         exit;
     } else {
         // Because we're sending the data back to the form, I need to unset the password fields!
         unset($_POST['password']);
     }
 }
 $_T->printHeader();
 $_T->printTitle();
 lovd_errorPrint();
 // Table.
 print '      <FORM action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n";
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:phenotypes.php

示例8: lovd_errorPrint

    lovd_errorPrint();
    // Tooltip JS code.
    lovd_includeJS('inc-js-tooltip.php');
    // Allow checking the database URL.
    lovd_includeJS('inc-js-submit-settings.php');
    // Table.
    print '      <FORM action="install/?step=' . $_GET['step'] . '&amp;sent=true" method="post">' . "\n";
    // Array which will make up the form table.
    $aForm = array_merge($_SYSSETTING->getForm(), array('skip', array('', '', 'submit', 'Continue &raquo;')));
    lovd_viewForm($aForm);
    print '</FORM>' . "\n\n";
    $_T->printFooter();
    exit;
} elseif ($_GET['step'] == 3) {
    $_GET['step']++;
}
if ($_GET['step'] == 4) {
    // Step 5: Done.
    if (!($_DB->query('SHOW TABLES LIKE "' . TABLE_CONFIG . '"')->fetchColumn() && $_DB->query('SELECT COUNT(*) FROM ' . TABLE_CONFIG)->fetchColumn())) {
        // Didn't finish previous step correctly.
        //header('Location: ' . PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?step=' . ($_GET['step'] - 2));
        header('Location: ' . PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?step=' . ($_GET['step'] - 1));
        exit;
    }
    $_T->printHeader();
    lovd_printSideBar();
    lovd_writeLog('Install', 'Installation', 'Installation of LOVD ' . $_STAT['version'] . ' complete');
    print '      <B>Done</B><BR>' . "\n" . '      <BR>' . "\n\n" . '      The installation of LOVD ' . $_STAT['version'] . ' is now complete.<BR>' . "\n" . '      <BR>' . "\n\n" . '      <BUTTON onclick="window.location.href=\'' . lovd_getInstallURL() . 'setup?newly_installed\';" style="font-weight : bold; font-size : 11px;">Continue to Setup area &gt;&gt;</BUTTON>' . "\n\n";
    $_T->printFooter();
    exit;
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:index.php

示例9: lovd_formatMail

    if (!empty($aSubmit['variants'])) {
        $aBody['variant_details'] = $aVariantDetails;
    }
    if (!empty($aSubmit['uploads'])) {
        $aBody['upload_details'] = $aUploadDetails;
    }
    require ROOT_PATH . 'inc-lib-form.php';
    $sBody = lovd_formatMail($aBody);
    // Set proper subject.
    $sSubject = 'LOVD submission' . (ACTION != 'edit' ? '' : ' update') . (!empty($aGenes) ? ' (' . implode(', ', array_slice($aGenes, 0, 20)) . (count($aGenes) > 20 ? ', ...' : '') . ')' : '');
    // Don't just change this; lovd_sendMail() is parsing it.
    $aCC = array();
    // Set submitter address.
    $aCC[] = array($_AUTH['name'], $_AUTH['email']);
    // Get owners address.
    if (!empty($aOwner)) {
        $aCC = array_merge($aCC, $_DB->query('SELECT name, email FROM ' . TABLE_USERS . ' WHERE id IN (?' . str_repeat(', ?', count($aOwner) - 1) . ')', $aOwner)->fetchAllRow());
    }
    // Send mail.
    $bMail = lovd_sendMail($aTo, $sSubject, $sBody, $_SETT['email_headers'], true, $_CONF['send_admin_submissions'], $aCC);
    // FIXME; When messaging system is built in, maybe queue message for curators?
    if ($bMail) {
        lovd_showInfoTable('Successfully processed your submission and sent an email notification to the relevant curator(s)!', 'success');
        // Forward only if there was no error sending the email.
        print '      <SCRIPT type="text/javascript">setTimeout("window.location.href=\'' . lovd_getInstallURL() . $sURI . $nID . '\'", 3000);</SCRIPT>' . "\n";
    } else {
        lovd_showInfoTable('Successfully processed your submission, but LOVD wasn\'t able to send an email notification to the relevant curator(s)!<BR>Please contact one of the relevant curators and notify them of your submission so that they can curate your data!', 'warning');
    }
    $_T->printFooter();
    exit;
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:submit.php

示例10: LOVD_CustomViewList

    $_GET['search_chromosome'] = '="' . $zData['chromosome'] . '"';
    require ROOT_PATH . 'class/object_custom_viewlists.php';
    $_DATA = new LOVD_CustomViewList(array('Gene', 'Transcript', 'DistanceToVar'), $zData['id']);
    // DistanceToVar needs the VariantID.
    $_DATA->setRowLink('VOT_map', 'javascript:lovd_addTranscript(\'{{ViewListID}}\', \'{{ID}}\', \'{{zData_geneid}}\', \'{{zData_name}}\', \'{{zData_id_ncbi}}\'); return false;');
    $_DATA->viewList('VOT_map', array(), true);
    print '      <BR><BR>' . "\n\n";
    lovd_showInfoTable('The variant entry is currently mapped to the following transcripts. Click on the cross at the right side of the transcript to remove the mapping.', 'information');
    print '      <TABLE class="sortable_head" style="width : 652px;"><TR><TH width="100">Gene</TH>' . '<TH style="text-align : left;">Name</TH><TH width="123" style="text-align : left;">Transcript ID</TH><TH width="20">&nbsp;</TH>' . '</TR></TABLE>' . "\n" . '      <FORM action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n" . '        <UL id="transcript_list" class="sortable" style="margin-top : 0px; width : 650px;">' . "\n";
    // Now loop the items in the order given.
    foreach ($aVOT as $aTranscript) {
        print '          <LI id="li_' . $aTranscript['id'] . '"><INPUT type="hidden" name="transcripts[]" value="' . $aTranscript['id'] . '"><TABLE width="100%"><TR><TD width="98">' . $aTranscript['geneid'] . '</TD>' . '<TD align="left">' . $aTranscript['name'] . '</TD><TD width="120" align="left">' . $aTranscript['id_ncbi'] . '</TD><TD width="20" align="right"><A href="#" onclick="lovd_removeTranscript(\'VOT_map\', \'' . $aTranscript['id'] . '\', \'' . $aTranscript['id_ncbi'] . '\'); return false;"><IMG src="gfx/mark_0.png" alt="Remove" width="11" height="11" border="0"></A></TD>' . '</TR></TABLE></LI>' . "\n";
    }
    print '        </UL>' . "\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 transcript list">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="submit" value="Cancel" onclick="window.location.href=\'' . lovd_getInstallURL() . CURRENT_PATH . '\'; return false;" style="border : 1px solid #FF4422;">'));
    lovd_viewForm($aForm);
    print "\n" . '      </FORM>' . "\n\n";
    ?>

      <SCRIPT type='text/javascript'>
        function lovd_addTranscript (sViewListID, nID, sGene, sName, sNM)
        {
            // Moves the transcript to the variant mapping block and removes the row from the viewList.
            var objViewListF = document.getElementById('viewlistForm_' + sViewListID);
            var objElement = document.getElementById(nID);
            objElement.style.cursor = 'progress';

            var objUsers = document.getElementById('transcript_list');
            var oLI = document.createElement('LI');
            oLI.id = 'li_' + nID;
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:variants.php

示例11: list

    }
    list($aColleagues, $sColTable) = lovd_colleagueTableHTML($nID, $sUserListID, $aColleagues, $bAllowGrantEdit);
    $_T->printHeader();
    $_T->printTitle();
    lovd_errorPrint();
    lovd_showInfoTable('To share access with other users, find the user in the list below, click on
                       the user to add him to the selection. Then click <B>save</B> to save the
                       changes.', 'information');
    // Set number of items per page for viewlist.
    $_GET['page_size'] = 10;
    // Set filter for viewlist to hide current colleagues and the user being viewed.
    $_GET['search_userid'] = '!' . $nID;
    foreach ($aColleagues as $aColleague) {
        $_GET['search_userid'] .= ' !' . $aColleague['id'];
    }
    // Show viewlist to select new users to share access with.
    $_DATA = new LOVD_User();
    $_DATA->setRowLink('users_share_access', 'javascript:lovd_passAndRemoveViewListRow("{{ViewListID}}", "{{ID}}", {id: "{{ID}}", name: "{{zData_name}}"}, lovd_addUserShareAccess); return false;');
    // The columns hidden here are also specified (enforced) in ajax/viewlist.php to make sure Submitters can't hack their way into the users table.
    $_DATA->viewList($sUserListID, array('username', 'status_', 'last_login_', 'created_date_', 'curates', 'level_'), true);
    lovd_showInfoTable('<B>' . $zData['name'] . ' (' . $nID . ')</B> shares access to all
                       data owned by him with the users listed below.', 'information');
    print '<FORM action="users/' . $nID . '?share_access" method="post">' . "\n";
    // Array which will make up the form table.
    print $sColTable . "\n";
    $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 access permissions">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="submit" value="Cancel" onclick="window.location.href=\'' . lovd_getInstallURL() . $_PE[0] . '/' . $nID . '\'; return false;" style="border : 1px solid #FF4422;">'));
    lovd_viewForm($aForm);
    print '</FORM>';
    $_T->printFooter();
    exit;
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:users.php

示例12: htmlspecialchars

            $n--;
            // Does not really matter at this point.
            continue;
        }
        $sContent = 'symbol:' . $sSymbol . "\n" . ($bUnique ? '' : 'id:' . $zData['id'] . "\n") . 'position_mRNA:' . $sPosition_mRNA . "\n" . 'position_genomic:' . $sPosition_genomic . "\n" . 'Variant/DNA:' . htmlspecialchars($zData['VariantOnTranscript/DNA']) . "\n" . 'Variant/DBID:' . $zData['VariantOnGenome/DBID'] . "\n" . 'Times_reported:' . $zData['Times'];
        $_FEED->addEntry($sTitle, $sSelfURL, $sAltURL, $sID, $zData['created_by'], $zData['created_date'], $sContributors, $zData['updated_date'], '', 'text', $sContent);
    }
} elseif ($sDataType == 'genes') {
    foreach ($aData as $zData) {
        // Prepare other fields to be included.
        $sTitle = $zData['id'];
        if ($sFeedType == 'feed') {
            $sSelfURL = ($_CONF['location_url'] ? $_CONF['location_url'] : lovd_getInstallURL()) . 'api/rest.php/genes/' . $zData['id'];
        } else {
            $sSelfURL = '';
        }
        $sChromosome = $zData['chromosome'];
        $sAltURL = ($_CONF['location_url'] ? $_CONF['location_url'] : lovd_getInstallURL()) . 'genes/' . $zData['id'];
        $sID = 'tag:' . $_SERVER['HTTP_HOST'] . ',' . substr($zData['created_date'], 0, 10) . ':' . $zData['id'];
        $sContributors = '';
        $sContributors .= ($sContributors ? ', ' : '') . htmlspecialchars($zData['curators']);
        $sContent = 'id:' . $zData['id'] . "\n" . 'entrez_id:' . $zData['id_entrez'] . "\n" . 'symbol:' . $zData['id'] . "\n" . 'name:' . $zData['name'] . "\n" . 'chromosome_location:' . $zData['chromosome'] . $zData['chrom_band'] . "\n" . 'position_start:chr' . $sChromosome . ':' . ($zData['sense'] ? $zData['position_g_mrna_start'] : $zData['position_g_mrna_end']) . "\n" . 'position_end:chr' . $sChromosome . ':' . ($zData['sense'] ? $zData['position_g_mrna_end'] : $zData['position_g_mrna_start']) . "\n" . 'refseq_genomic:' . $zData['refseq_genomic'] . "\n" . 'refseq_mrna:' . $zData['id_ncbi'] . "\n" . 'refseq_build:' . $_CONF['refseq_build'];
        $_FEED->addEntry($sTitle, $sSelfURL, $sAltURL, $sID, $zData['created_by'], $zData['created_date'], $sContributors, $zData['updated_date'], '', 'text', $sContent);
    }
}
if (!$n) {
    // This happens if searching on position and there is a partial match. MySQL returns a false positive which has been filtered out now.
    header('HTTP/1.0 404 Not Found');
    // This will replace the previous 200 OK status!
}
$_FEED->publish();
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:api.php

示例13: lovd_soapError

function lovd_soapError($e, $bHalt = true)
{
    // Formats SOAP errors for the error log, and optionally halts the system.
    if (!is_object($e)) {
        return false;
    }
    // Try to detect if arguments have been passed, and isolate them from the stacktrace.
    $sMethod = '';
    $sArgs = '';
    foreach ($e->getTrace() as $aTrace) {
        if (isset($aTrace['function']) && $aTrace['function'] == '__call') {
            // This is the low level SOAP call. Isolate used method and arguments from here.
            list($sMethod, $aArgs) = $aTrace['args'];
            if ($aArgs && is_array($aArgs) && isset($aArgs[0])) {
                $aArgs = $aArgs[0];
                // Not sure why the call's argument are in a sub array, but oh, well.
                foreach ($aArgs as $sArg => $sValue) {
                    $sArgs .= (!$sArgs ? '' : "\n") . "\t\t" . $sArg . ':' . $sValue;
                }
            }
            break;
        }
    }
    // Format the error message.
    $sError = preg_replace('/^' . preg_quote(rtrim(lovd_getInstallURL(false), '/'), '/') . '/', '', $_SERVER['REQUEST_URI']) . ' returned error in module \'' . $sMethod . '\'.' . "\n" . (!$sArgs ? '' : 'Arguments:' . "\n" . $sArgs . "\n") . 'Error message:' . "\n" . str_replace("\n", "\n\t\t", $e->__toString());
    // If the system needs to be halted, send it through to lovd_displayError() who will print it on the screen,
    // write it to the system log, and halt the system. Otherwise, just log it to the database.
    if ($bHalt) {
        return lovd_displayError('SOAP', $sError);
    } else {
        return lovd_writeLog('Error', 'SOAP', $sError);
    }
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:33,代码来源:inc-lib-init.php

示例14: define

 *
 * This file is part of LOVD.
 *
 * LOVD is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * LOVD is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with LOVD.  If not, see <http://www.gnu.org/licenses/>.
 *
 *************/
define('ROOT_PATH', './');
require ROOT_PATH . 'inc-init.php';
// Send manager and database administrator to setup, curators to the config, with selected database to the gene homepage, the rest to the gene listing.
if ($_AUTH && $_AUTH['level'] >= LEVEL_MANAGER) {
    $sFile = 'setup';
} elseif ($_AUTH && $_SESSION['currdb'] && lovd_isAuthorized('gene', $_SESSION['currdb'], false)) {
    $sFile = 'configuration';
} elseif ($_SESSION['currdb']) {
    $sFile = 'genes/' . $_SESSION['currdb'];
} else {
    $sFile = 'genes';
}
header('Location: ' . lovd_getInstallURL() . $sFile);
exit;
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:index.php

示例15: elseif

    if (empty($aCategories['Individual'])) {
        $nActiveTab = 0;
        $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;
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:31,代码来源:references.php


注:本文中的lovd_getInstallURL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。