示例#1
0
    $base_query = $query;
    echo "<hr />";
    echo "<table border=1px>";
    echo "<tr>";
    echo "<td align=center><strong>Year</strong></td>";
    echo "<td align=center><strong># of publications</strong></td>";
    echo "<td></td>";
    echo "</tr>";
    for ($i = $date_from; $i <= $date_to; $i++) {
        $query = $base_query . ' AND ("' . $i . '/01/01"[Date - Entrez] : "' . $i . '/12/31"[Date - Entrez]) ';
        $query = urlencode($query);
        echo "<tr>";
        echo "<td align=center>" . $i . "</td>";
        echo "<td align=center>" . ($count = get_PMIDs($query, true) . "</td>");
        echo "<td><a href='http://www.ncbi.nlm.nih.gov/pubmed?term=" . $query . "' target='blank'>query</a>";
        echo "</tr>";
    }
    $query = $base_query . ' AND ("' . $date_from . '/01/01"[Date - Entrez] : "' . $date_to . '/12/31"[Date - Entrez]) ';
    $query = urlencode($query);
    $count = get_PMIDs($query, true);
    echo "<tr>";
    echo "<td align=center><strong>TOTAL</strong></td>";
    echo "<td align=center><strong>" . $count . "</strong></td>";
    echo "<td><a href='http://www.ncbi.nlm.nih.gov/pubmed?term=" . $query . "' target='blank'>Original query</a></td>";
    echo "</tr>";
    echo "</table>";
}
?>

</body>
</html>
示例#2
0
#echo '<table><tr><td><input type="checkbox" name="review" /></td><td>Check this to include reviews</td></tr></table>';
#submit
echo '<input type="submit" value="Query" />';
echo '</form>';
if ($query != "*") {
    #Query has been provided
    #if ($review == "off") { $query = $query . " AND (NOT review)"; }
    if ($date_restrict == "on") {
        $query = $query . ' AND ("' . $date_from . '"[Date - Entrez] : "' . $date_to . '"[Date - Entrez]) ';
    }
    echo "Query: " . $query;
    echo "<br />";
    $query = urlencode($query);
    echo "Query: " . $query;
    echo "<hr />";
    list($PMID, $count) = get_PMIDs($query);
    echo $count . "<br>";
    if (1 == 1) {
        list($authors, $title, $abstract, $date_pubmed, $date_rec, $date_acc, $journal, $affil) = get_summary($PMID[3]);
        echo "<strong>authors</strong>:";
        print_r($authors);
        echo "<br />";
        echo "<strong>title</strong>:" . $title . "<br>";
        echo "<strong>abstract</strong>:" . $abstract . "<br>";
        echo "<strong>date (pubmed):</strong>";
        print_r($date_pubmed);
        echo "<br />";
        echo "<strong>date (received):</strong>";
        print_r($date_rec);
        echo "<br />";
        echo "<strong>date (accepted):</strong>";