Exemplo n.º 1
0
    function DisplayHtmlContent()
    {
        global $config;
        global $db;
        $this->display_disqus = false;
        echo html_page_header(true, '', 'name');
        echo '<h1>' . $this->GetTitle() . '</h1>';
        echo '<h2>' . num_cited_by($this->id) . " citations" . '</h2>';
        echo '<p class="explanation">References in BioStor that cite this reference</p>' . "\n";
        $sql = 'SELECT DISTINCT(rdmp_reference_cites.reference_id) FROM rdmp_reference_citation_string_joiner
INNER JOIN rdmp_reference_cites USING(citation_string_id)
WHERE rdmp_reference_citation_string_joiner.reference_id=' . $this->id;
        $result = $db->Execute($sql);
        if ($result == false) {
            die("failed [" . __FILE__ . ":" . __LINE__ . "]: " . $sql);
        }
        echo '<ul>' . "\n";
        while (!$result->EOF) {
            $reference = db_retrieve_reference($result->fields['reference_id']);
            echo '<li style="border-bottom:1px dotted rgb(128,128,128);padding:4px;">';
            echo '<a href="' . $config['web_root'] . 'reference/' . $result->fields['reference_id'] . '">' . $reference->title . '</a><br/>';
            echo '<span style="color:green;">' . reference_authors_to_text_string($reference);
            if (isset($reference->year)) {
                echo ' (' . $reference->year . ')';
            }
            echo ' ' . reference_to_citation_text_string($reference) . '</span>';
            echo ' ' . reference_to_coins($reference);
            echo '</li>';
            $result->MoveNext();
        }
        echo '</ul>' . "\n";
    }
Exemplo n.º 2
0
 function DisplayHtmlContent()
 {
     global $config;
     echo html_page_header(true, '', 'name');
     echo '<h1>' . $this->GetTitle() . '</h1>';
     /*
     //------------------------------------------------------------------------------------------
     // Export options
     echo '<h2>Export</h2>';
     echo '<div>';
     echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '.text" title="Text">Text</a></span>';		
     echo '</div>';
     */
     //------------------------------------------------------------------------------------------
     // Identifiers
     echo '<h2>Identifiers</h2>';
     echo '<ul>';
     if ($this->in_bhl) {
         // BHL reference
         echo '<li><a href="http://www.biodiversitylibrary.org/item/' . $this->id . '" target="_new">BHL ItemID:' . $this->id . '</a></li>';
         $identifiers = bhl_retrieve_identifiers($this->object->TitleID);
         foreach ($identifiers as $k => $v) {
             switch ($k) {
                 case 'oclc':
                     echo '<li><a href="http://www.worldcat.org/oclc/' . $v . '" target="_new">OCLC:' . $v . '</a></li>';
                     break;
                 case 'isbn':
                     echo '<li><a href="http://www.worldcat.org/isbn/' . $v . '" target="_new">ISBN:' . $v . '</a></li>';
                     break;
                 default:
                     break;
             }
         }
     }
     echo '</ul>';
     //------------------------------------------------------------------------------------------
     if ($this->in_bhl) {
         //--------------------------------------------------------------------------------------
         echo '<h2>Viewer</h2>';
         echo '<table width="100%" >';
         echo '<tr  valign="top"><td>';
         echo bhl_item_viewer($this->id, $this->page);
         echo '</td>';
         echo '<td>';
         //echo $this->DisplayEditForm();
         echo '</td></tr>';
         echo '</table>';
         //--------------------------------------------------------------------------------------
         if (count($this->localities) != 0) {
             echo '<h2>Localities</h2>';
             echo '<p class="explanation">Localities extracted from OCR text.</p>';
             echo '<div id="map_canvas" style="width: 600px; height: 300px"></div>';
         }
     }
 }
Exemplo n.º 3
0
    function DisplayHtmlContent()
    {
        global $config;
        global $db;
        $this->display_disqus = false;
        echo html_page_header(true, '', 'name');
        echo '<h1><a href=' . $config['web_root'] . 'reference/' . $this->id . '">' . $this->GetTitle() . '</a></h1>';
        echo '<h2>' . num_cites($this->id) . " references cited" . '</h2>';
        echo '<p class="explanation">References cited by this reference</p>' . "\n";
        echo '<div>';
        echo '<div style="display:inline;border:1px solid rgb(192,192,192);background-color:#D8F3C9;width:20px;height:20px;">&nbsp;&nbsp;&nbsp;&nbsp;</div>';
        echo '&nbsp;Reference exists in BioStor&nbsp;';
        echo '<div style="display:inline;border:1px solid rgb(192,192,192);background-color:#FCCB08;width:10px;height:10px;">&nbsp;&nbsp;&nbsp;&nbsp;</div>';
        echo '&nbsp;Reference parsed but not found online&nbsp;';
        echo '<div style="display:inline;border:1px solid rgb(192,192,192);background-color:white;width:10px;height:10px;">&nbsp;&nbsp;&nbsp;&nbsp;</div>';
        echo '&nbsp;Reference not parsed&nbsp;';
        echo '</div>';
        echo '<hr />' . "\n";
        $sql = 'SELECT * FROM rdmp_reference_cites
INNER JOIN rdmp_citation_string USING(citation_string_id)
LEFT JOIN rdmp_reference_citation_string_joiner USING(citation_string_id)
WHERE rdmp_reference_cites.reference_id = ' . $this->id . ' ORDER BY rdmp_reference_cites.citation_order';
        $result = $db->Execute($sql);
        if ($result == false) {
            die("failed [" . __FILE__ . ":" . __LINE__ . "]: " . $sql);
        }
        echo '<ul>' . "\n";
        while (!$result->EOF) {
            $style = 'padding:4px;border-bottom:1px solid rgb(192,192,192);';
            if ($result->fields['reference_id'] != '') {
                $style .= 'background-color:#D8F3C9;';
            } elseif ($result->fields['citation_object'] != '') {
                $style .= 'background-color:#FCCB08;';
            }
            echo '<li style="' . $style . '">';
            if ($result->fields['reference_id'] != '') {
                echo '<a href="' . $config['web_root'] . 'reference/' . $result->fields['reference_id'] . '">';
            }
            echo $result->fields['citation_string'];
            if ($result->fields['reference_id'] != '') {
                echo '</a>';
            }
            echo '</li>';
            $result->MoveNext();
        }
        echo '</ul>' . "\n";
    }
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$row_style = '';
$order_by = MAN_DOC_TYPE_NAME;
$order_dir = "ASC";
$page_number = 1;
util_set_order_by($order_by, $_GET);
util_set_order_dir($order_dir, $_GET);
util_set_page_number($page_number, $_GET);
util_set_order_by($order_by, $_POST);
util_set_order_dir($order_dir, $_POST);
util_set_page_number($page_number, $_POST);
html_window_title();
html_print_body();
html_page_title(project_get_name($selected_project_id) . " - " . lang_get('manage_project_page'));
html_page_header($db, $project_name);
html_print_menu();
admin_menu_print($page, $project_id, $user_id);
html_project_manage_menu();
html_project_manage_tests_menu();
error_report_check($_GET);
$project_details = project_get_details($selected_project_id);
print "<div align=center>" . NEWLINE;
print "<br>" . NEWLINE;
if (!empty($project_details)) {
    $project_id = $project_details[PROJ_ID];
    $project_name = $project_details[PROJ_NAME];
    $project_status = $project_details[PROJ_STATUS];
    $project_description = $project_details[PROJ_DESCRIPTION];
    ####################################################################################
    # Test Doc Type
Exemplo n.º 5
0
function html_print_operation_successful($page_title, $redirect_page)
{
    global $db;
    $s_project_properties = session_get_project_properties();
    $project_name = $s_project_properties['project_name'];
    html_window_title();
    html_print_body();
    html_page_title($project_name . " - " . lang_get($page_title));
    html_page_header($db, $project_name);
    html_print_menu();
    print "<div class=operation-successful>" . lang_get('operation_successful') . "</div>";
    html_print_footer();
    html_redirect($redirect_page);
    exit;
}
Exemplo n.º 6
0
 function DisplayHtmlContent()
 {
     global $config;
     echo html_page_header(true, '', 'name');
     echo '<div style="float:right;background-color:rgb(230,242,250);padding:6px">' . "\n";
     if ($this->issn != '') {
         echo '<h2>Identifiers</h2>' . "\n";
         echo '<ul class="guid-list">' . "\n";
         echo '<li class="permalink"><a href="' . $config['web_root'] . 'issn/' . $this->issn . '" title="Permalink">' . $config['web_root'] . 'issn/' . $this->issn . '</a></li>' . "\n";
         echo '<li class="worldcat"><a href="http://www.worldcat.org/issn/' . $this->issn . '" title="ISSN">' . $this->issn . '</a></li>' . "\n";
         echo '<h2>Export</h2>' . "\n";
         echo '<ul class="export-list">' . "\n";
         echo '<li class="xml"><a href="' . $config['web_root'] . 'issn/' . $this->issn . '.xml" title="Endnote XML">Endnote XML</a></li>';
         echo '<li class="ris"><a href="' . $config['web_root'] . 'issn/' . $this->issn . '.ris" title="RIS">Reference manager</a></li>';
         echo '<li class="bibtex"><a href="' . $config['web_root'] . 'issn/' . $this->issn . '.bib" title="BibTex">BibTex</a></li>';
         echo '<li class="text"><a href="' . $config['web_root'] . 'issn/' . $this->issn . '.text" title="text">Text</a></li>';
         echo '</ul>' . "\n";
     }
     if ($this->oclc != '') {
         echo '<h2>Identifiers</h2>' . "\n";
         echo '<ul class="guid-list">' . "\n";
         echo '<li class="permalink"><a href="' . $config['web_root'] . 'oclc/' . $this->oclc . '" title="Permalink">' . $config['web_root'] . 'oclc/' . $this->oclc . '</a></li>' . "\n";
         echo '<li class="worldcat"><a href="http://www.worldcat.org/oclc/' . $this->oclc . '" title="OCLC">' . $this->oclc . '</a></li>' . "\n";
         echo '<h2>Export</h2>' . "\n";
         echo '<ul class="export-list">' . "\n";
         echo '<li class="xml"><a href="' . $config['web_root'] . 'oclc/' . $this->oclc . '.xml" title="Endnote XML">Endnote XML</a></li>';
         echo '<li class="ris"><a href="' . $config['web_root'] . 'oclc/' . $this->oclc . '.ris" title="RIS">Reference manager</a></li>';
         echo '<li class="bibtex"><a href="' . $config['web_root'] . 'oclc/' . $this->oclc . '.bib" title="BibTex">BibTex</a></li>';
         echo '<li class="text"><a href="' . $config['web_root'] . 'oclc/' . $this->oclc . '.text" title="text">Text</a></li>';
         echo '</ul>' . "\n";
     }
     echo '</div>' . "\n";
     echo '<h1>' . $this->GetTitle() . '</h1>';
     // Image
     if (isset($this->issn)) {
         echo '<div>';
         echo '<img src="http://bioguid.info/issn/image.php?issn=' . $this->issn . '" alt="cover" style="border:1px solid rgb(228,228,228);height:100px;" />';
         echo '</div>';
     }
     // Stats
     /*		echo '<div>';
     		echo '<img src="' . sparkline_articles_added_for_issn($this->issn) . '" alt="sparkline" />';
     		echo '</div>';*/
     echo '<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="rdmpage" data-related="biostor_org">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>';
     echo '<h2>Coverage</h2>' . "\n";
     echo '<p>';
     if ($this->issn != '') {
         echo bhl_articles_for_issn($this->issn);
     }
     if ($this->oclc != '') {
         echo bhl_articles_for_oclc($this->oclc);
     }
     echo ' articles in database.</p>' . "\n";
     echo '<h3>Distribution of identified articles over time</h3>' . "\n";
     echo '<div>' . "\n";
     echo '   <img src="' . sparkline_references($this->issn, $this->oclc, 360, 100) . '" alt="sparkline" />' . "\n";
     echo '</div>' . "\n";
     $titles = array();
     if ($this->issn != '') {
         $titles = bhl_titles_for_issn($this->issn);
     }
     if ($this->oclc != '') {
         $titles = bhl_titles_for_oclc($this->oclc);
     }
     if (count($titles) > 0) {
         echo '<h3>Distribution of identified articles across BHL items</h3>' . "\n";
         echo '<div>';
         echo '<div style="display:inline;background-color:rgb(230,242,250);width:20px;height:20px;">&nbsp;&nbsp;&nbsp;&nbsp;</div>';
         echo '&nbsp;Scanned pages&nbsp;';
         echo '<div style="display:inline;background-color:rgb(0,119,204);width:10px;height:10px;">&nbsp;&nbsp;&nbsp;&nbsp;</div>';
         echo '&nbsp;Articles&nbsp;';
         echo '</div>';
         echo '<p></p>';
         $items = array();
         $volumes = array();
         items_from_titles($titles, $items, $volumes);
         $html = '<div style="height:400px;border:1px solid rgb(192,192,192);overflow:auto;">' . "\n";
         $html .= '<table>' . "\n";
         $html .= '<tbody style="font-size:10px;">' . "\n";
         foreach ($volumes as $volume) {
             $item = $items[$volume];
             // How many pages in this item?
             $num_pages = bhl_num_pages_in_item($item->ItemID);
             // Coverage
             $coverage = bhl_item_page_coverage($item->ItemID);
             $row_height = 10;
             // Draw as DIV
             $html .= '<tr>' . "\n";
             $html .= '<td>';
             $html .= '<a href="http://www.biodiversitylibrary.org/item/' . $item->ItemID . '" target="_new">';
             $html .= $item->VolumeInfo;
             $html .= '</a>';
             $html .= '</td>' . "\n";
             $html .= '<td>' . "\n";
             $html .= '<div style="position:relative">' . "\n";
             $html .= '   <div style="background-color:rgb(230,242,250);border-bottom:1px solid rgb(192,192,192);border-right:1px solid rgb(192,192,192);position:absolute;left:0px;top:0px;width:' . $num_pages . 'px;height:' . $row_height . 'px;">' . "\n";
             foreach ($coverage as $c) {
                 $html .= '      <div style="background-color:rgb(0,119,204);position:absolute;left:' . $c->start . 'px;top:0px;width:' . ($c->end - $c->start) . 'px;height:' . $row_height . 'px;">' . "\n";
                 $html .= '      </div>' . "\n";
             }
             $html .= '   </div>' . "\n";
             $html .= '</div>' . "\n";
             $html .= '</td>' . "\n";
             $html .= '</tr>' . "\n";
         }
         $html .= '</tbody>' . "\n";
         $html .= '</table>' . "\n";
         $html .= '</div>' . "\n";
         echo $html;
     }
     $institutions = institutions_from_titles($titles);
     if (count($institutions) != 0) {
         echo '<h3>BHL source(s)</h3>' . "\n";
         echo '<table>' . "\n";
         foreach ($institutions as $k => $v) {
             echo '<tr>' . "\n";
             echo '<td>' . "\n";
             switch ($k) {
                 case 'American Museum of Natural History Library':
                     echo '<img src="' . $config['web_root'] . 'images/institutions/' . 'AMNH_logo_--_blue_rectangle.jpg' . '" width="48" />';
                     break;
                 case 'Harvard University, MCZ, Ernst Mayr Library':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'Mod_Color_Harvard_Shield_small_bigger.jpg' . '" width="48" />';
                     break;
                 case 'Missouri Botanical Garden':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'twitter_icon_MBG.jpg' . '" width="48" />';
                     break;
                 case 'New York Botanical Garden':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'NYBGDOMEHEADERWEB.jpg' . '" />';
                     break;
                 case 'Smithsonian Institution Libraries':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'SILCatesbyMagnolia.jpg' . '"  width="48" />';
                     break;
                 case 'The Field Museum':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'field.jpg' . '" width="48" />';
                     break;
                 case 'BHL-Europe':
                     echo '<br /><div style="background-color:green;width:120px;text-align:center"><img src="' . $config['web_root'] . 'images/institutions/' . 'BHL_logo_wg.png' . '" height="48" /></div>';
                     break;
                 case 'Boston Public Library':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'BPLcards.jpg' . '" width="48" />';
                     break;
                 case 'Harvard University Herbarium':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'huh_logo_bw_100.png' . '" width="48" />';
                     break;
                 case 'MBLWHOI Library':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'library_logo2_bigger.jpg' . '" width="48" />';
                     break;
                 case 'Natural History Museum, London':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'natural_history_museum-01.jpg' . '" width="48" />';
                     break;
                 case 'University of Illinois Urbana Champaign':
                     echo '<br /><img src="' . $config['web_root'] . 'images/institutions/' . 'ilogo_horz_bold.gif' . '" height="48" />';
                     break;
                 default:
                     break;
             }
             echo '</td>' . "\n";
             echo '<td>' . "\n";
             echo $k . '<br />' . $v . ' items';
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
         }
         echo '</table>' . "\n";
     }
     // How does journal relate to BHL Titles and Items?
     $titles = array();
     if ($this->issn != '') {
         $titles = db_retrieve_journal_names_from_issn($this->issn);
     }
     if ($this->oclc != '') {
         $titles = db_retrieve_journal_names_from_oclc($this->oclc);
     }
     if (count($titles) > 1) {
         echo '<h2>Alternative titles</h2>';
         echo '<ul>';
         foreach ($titles as $title) {
             echo '<li>' . $title . '</li>';
         }
         echo '</ul>';
     }
     echo '<h2>Articles</h2>';
     if ($this->issn == '0374-5481') {
         // Special treatment for Ann mag Nat Hist
         echo '<ul>';
         for ($series = 1; $series <= 9; $series++) {
             echo '<li><a href="' . $config['web_root'] . 'issn/' . $this->issn . '#series' . $series . '">Series ' . $series . '</a></li>';
         }
         echo '</ul>';
         for ($series = 1; $series <= 9; $series++) {
             echo '<h3><a name="series' . $series . '"></a>Series ' . $series . '</h3>' . "\n";
             $articles = db_retrieve_articles_from_journal_series($this->issn, $series == 1 ? '' : $series);
             echo '<ul>';
             foreach ($articles as $k => $v) {
                 echo '<li style="display:block;border-top:1px solid #EEE; ">' . $k;
                 echo '<ul>';
                 if (is_array($v)) {
                     foreach ($v as $ref) {
                         echo '<li><a href="' . $config['web_root'] . 'reference/' . $ref->id . '">' . $ref->title . '</a></li>';
                     }
                 }
                 echo '</ul>';
                 echo '</li>';
             }
             echo '</ul>';
         }
     } else {
         $articles = db_retrieve_articles_from_journal($this->issn, $this->oclc);
         //print_r($articles);
         echo '<ul>';
         foreach ($articles as $k => $v) {
             echo '<li style="display:block;border-top:1px solid #EEE; ">' . $k;
             echo '<ul>';
             if (is_array($v)) {
                 foreach ($v as $ref) {
                     if (0) {
                         // fast
                         echo '<li><a href="' . $config['web_root'] . 'reference/' . $ref->id . '">' . $ref->title . '</a></li>';
                     } else {
                         // slower, but useful for debugging
                         $reference = db_retrieve_reference($ref->id);
                         echo '<li style="border-bottom:1px dotted rgb(128,128,128);padding:4px;">';
                         echo '<a href="' . $config['web_root'] . 'reference/' . $ref->id . '">' . $reference->title . '</a><br/>';
                         echo '<span style="color:green;">' . reference_authors_to_text_string($reference);
                         if (isset($reference->year)) {
                             echo ' (' . $reference->year . ')';
                         }
                         echo ' ' . reference_to_citation_text_string($reference) . '</span>';
                         echo ' ' . reference_to_coins($reference);
                         // Thumbail, useful for debugging
                         if (0) {
                             echo '<div>';
                             $pages = bhl_retrieve_reference_pages($ref->id);
                             $image = bhl_fetch_page_image($pages[0]->PageID);
                             echo '<a href="' . $config['web_root'] . 'reference/' . $ref->id . '">';
                             echo '<img style="padding:2px;border:1px solid blue;margin:2px;" id="thumbnail_image_' . $page->PageID . '" src="' . $image->thumbnail->url . '" width="' . $image->thumbnail->width . '" height="' . $image->thumbnail->height . '" alt="thumbnail"/>';
                             echo '</a>';
                             echo '</div>';
                         }
                         echo '</li>';
                     }
                 }
             } else {
                 // Article lacks volume
                 if (isset($v->id)) {
                     $reference = db_retrieve_reference($v->id);
                     echo '<li style="border-bottom:1px dotted rgb(128,128,128);padding:4px;">';
                     echo '<a href="' . $config['web_root'] . 'reference/' . $v->id . '">' . $reference->title . '</a><br/>';
                     echo '<span style="color:green;">' . reference_authors_to_text_string($reference);
                     if (isset($reference->year)) {
                         echo ' (' . $reference->year . ')';
                     }
                     echo ' ' . reference_to_citation_text_string($reference) . '</span>';
                     echo ' ' . reference_to_coins($reference);
                 }
             }
             echo '</ul>';
             echo '</li>';
         }
         echo '</ul>';
     }
 }
Exemplo n.º 7
0
    function DisplayHtmlContent()
    {
        global $config;
        echo html_page_header(true, '', 'author');
        echo '<h1>' . $this->GetTitle() . '</h1>';
        // Name variations
        $names = db_get_all_author_names($this->id);
        if (count($names) > 1) {
            /*			echo '<h2>Name variants</h2>'; 
            			echo '<ul>';
            			foreach ($names as $name)
            			{
            				echo '<li><a href="' . $config['web_root'] . 'author/' . $name['author_id'] . '">' . $name['name'] . '</a></li>';
            			}
            			echo '</ul>';
            			echo '<h2>Name variants</h2>'; 
            			echo '<ul>';
            */
            $count = 0;
            echo '<p>(';
            foreach ($names as $name) {
                if ($count++ > 0) {
                    echo ', ';
                }
                echo '<a href="' . $config['web_root'] . 'author/' . $name['author_id'] . '">' . $name['name'] . '</a>';
            }
            echo ')</p>';
        }
        echo '<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="rdmpage" data-related="biostor_org">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>';
        echo '<div>';
        echo '<img src="' . sparkline_author_articles($this->id) . '" alt="sparkline" align="top"/>';
        echo '</div>';
        echo '<div>';
        // Ideally make this SVG, but then we have to deal with clicks on nodes going to embedded object,
        // not parent window (see issue with phylomash project)
        if (0) {
            $graph_url = $config['web_root'] . 'cgi-bin/neato.cgi/' . $config['web_root'] . 'coauthor/' . $this->id . '.svg';
            echo '
			<!--[if IE]>
			<embed width="360" height="180" src="' . $graph_url . '">
			</embed>
			<![endif]-->
			<![if !IE]>
			<object id="mysvg" type="image/svg+xml" width="360" height="180" data="' . $graph_url . '">
			<p>Error, browser must support "SVG"</p>
			</object>
			<![endif]>';
        } else {
            /* Turn off
            			$graph_url = $config['web_root'] . 'cgi-bin/neato.cgi/' .  $config['web_root'] . 'coauthor/' . $this->id . '.png';
            			echo '<img src="' . $graph_url . '" alt="graph" align="top"/>';
            			*/
        }
        echo '</div>';
        // My original code
        /*
        // List of papers authored
        echo '<h2>Publications</h2>';
        $refs = db_retrieve_authored_references($this->id);
        echo '<ul>';
        foreach($refs as $reference_id)
        {
        	$reference = db_retrieve_reference ($reference_id);
        	echo '<li><a href="' . $config['web_root'] . 'reference/' . $reference_id . '">' . $reference->title . '</a></li>';
        }
        echo '</ul>';
        
        // Timeline 
        echo '<h2>Publication Timeline</h2>';
        echo '<div>';
        $timeline = db_retrieve_author_timeline($this->id);
        
        $max_count = 0;
        foreach ($timeline as $k => $v)
        {
        	$max_count = max ($max_count, $v);
        }
        
        // CSS display from http://www.alistapart.com/articles/accessibledatavisualization/
        echo '<ul class="timeline">';
        foreach ($timeline as $k => $v)
        {
        	echo '<li>';
        	echo '<a>';
        	echo '<span class="label">' . $k . '</span>';
        	
        	$percentage = round(100 * $v/$max_count, 2);
        	
        	echo '<span class="count" style="height: ' . $percentage . '%">(' . $v . ')</span>';
        	echo '</a>';
        	echo '</li>';
        }
        echo '</ul>';
        echo '</div>';
        //print_r($timeline);
        
        // Coauthorships (LinkedIn-style)
        $coauthors = db_retrieve_coauthors($this->id);
        //print_r($coauthors);
        echo '<h2>Coauthors</h2>';
        echo '<div>';
        echo '<div id="contact_index" style="float:right;padding:6px;text-align:center;"></div>';
        echo '<div id="contact_list" style="overflow:auto;height:400px;border:1px solid rgb(190,190,190);"></div>';
        echo '</div>';
        
        echo '<script type="text/javascript">' . "\n" . 'display_coauthors(\'' .  json_encode($coauthors) . '\');</script>' . "\n";
        */
        // Exhibit
        echo '<h2>Publications</h2>';
        echo '
    <table width="100%">
        <tr valign="top">
            <td ex:role="viewPanel">
                <div ex:role="view">                
				  <table ex:role="lens" class="reference">
					   <tr>
						   <td><img style="border:1px solid rgb(192,192,192);" ex:src-content=".imageURL" width="40"/></td>
						   <td>
								<div>
								<a ex:href-content=".uri">
							   <span ex:content=".label"></span></a></div>
							   <div>
								   <span ex:content=".citation"></span>
							   </div>
						   </td>
					   </tr>
				   </table>                                
                </div>
            </td>
            <td width="25%">
               <!-- browsing controls here... -->
                <div ex:role="facet" ex:facetClass="TextSearch" ex:facetLabel="Search within results"></div>
				<div ex:role="facet" ex:expression=".type" ex:facetLabel="Reference type"></div>
				<div ex:role="facet" ex:expression=".journal" ex:facetLabel="Journal"></div>
 				<div ex:role="facet" ex:expression=".year" ex:facetLabel="Year"></div>
 				<div ex:role="facet" ex:expression=".coauthors" ex:facetLabel="Coauthors"></div>
            </td>
        </tr>
    </table>';
    }
Exemplo n.º 8
0
/**
 * @file zotero.php
 *
 * Explain how to use with Zotero
 *
 */
require_once '../config.inc.php';
require_once dirname(__FILE__) . '/html.php';
global $config;
header("Content-type: text/html; charset=utf-8\n\n");
echo html_html_open();
echo html_head_open();
echo html_title('Zotero - ' . $config['site_name']);
echo html_head_close();
echo html_body_open();
echo html_page_header(false);
?>
<div style="float:right;padding:10px;"><img src="static/zotero_z_32px.png" alt="zotero logo"/></div>
<h1>Using BioStor with Zotero</h1>


<p><a href="http://www.zotero.org">Zotero</a> is a Firefox extension for collecting and managing bibliographic references. You can use Zotero to capture citations from BioStor, and you can also link to references in BioStor from within Zotero using OpenURL. Note that the instructions below assume that you are using version 2.0 or Zotero.</p>

<h2>Storing citations</h2>
<p>Zotero can detect when a BioStor page contains bibliograpic information, and you can import that information into you Zotero library in the normal way (see the Zotero page <a href="http://www.zotero.org/support/getting_stuff_into_your_library">Getting stuff into your library</a>).</p>

<h2>Set up OpenURL linking</h2>
<p>To enable OpenURL linking go the <b>Actions</b> button in Zotero and click 
on the <b>Preferences</b> command:</p>

<div style="text-align:center;"><img src="static/zotero_menu.png" width="200" alt="zotero menu"/></div>
Exemplo n.º 9
0
function display_bhl_result_html($referent, $hits)
{
    global $config;
    header("Content-type: text/html; charset=utf-8\n\n");
    echo html_html_open();
    echo html_head_open();
    echo html_title('Reference Finder - ' . $config['site_name']);
    echo html_include_css('css/main.css');
    echo html_include_css('css/lightbox.css');
    echo html_include_script('js/fadeup.js');
    echo html_include_script('js/prototype.js');
    echo html_include_script('js/scriptaculous.js?load=effects,builder');
    echo html_include_script('js/lightbox.js');
    // Handle user accepting a hit
    echo '<script type="text/javascript">';
    echo 'function store(form_id, page_id)
{
var form = $(form_id);
//alert($(form).serialize());

// Update database
var success	= function(t){updateSuccess(t);}
var failure	= function(t){updateFailure(t);}

var url = "update.php";
var pars = $(form).serialize() + "&PageID=" + page_id;
var myAjax = new Ajax.Request(url, {method:"post", postBody:pars, onSuccess:success, onFailure:failure});
}

function updateSuccess (t)
{
var s = t.responseText.evalJSON();
//alert(t.responseText);
if (s.is_valid)
{
// we\'ve stored reference, so reload page, which will redirect us to page for reference
window.location.reload(true);
}
else
{
// User did not pass recaptcha so refresh it
Recaptcha.create("' . $config['recaptcha_publickey'] . '",
	"recaptcha_div", {
	theme: "clean",
	callback: Recaptcha.focus_response_field
});
//fadeUp($(recaptcha_div),255,255,153);
}
}

function updateFailure (t)
{
	var s = t.responseText.evalJSON();
	alert("Badness happened:\\n" + t.responseText);
}';
    // Based on http://ne0phyte.com/blog/2008/09/02/javascript-keypress-event/
    // and http://blog.evandavey.com/2008/02/how-to-capture-return-key-from-field.html
    // I want to capture enter key press in recaptcha to avoid submitting the form (user must click
    // on button for that). We listen for keypress and eat it. Note that we attach the listener after
    // the window has loaded.
    echo 'function onMyTextKeypress(event)
{
if (Event.KEY_RETURN == event.keyCode) 
{
// do something usefull
//alert(\'Enter key was pressed.\');		
Event.stop(event);
}
return;
}
Event.observe(window, \'load\', function() {
Event.observe(\'recaptcha_response_field\', \'keypress\', onMyTextKeypress);
});';
    echo '</script>';
    echo html_head_close();
    echo html_body_open();
    echo html_page_header(false);
    echo '<h1>Reference Finder results</h1>';
    if (count($hits) != 0) {
        echo '<form id="metadata_form" action=\'#\'>';
        // referent metadata (hidden). By populating form we can pass metadata to
        // update.php via Ajax call
        echo reference_hidden_form($referent);
        echo '<table border="0" cellpadding="10">';
        foreach ($hits as $hit) {
            echo '<tr>';
            // Thumbnail of page
            echo '<td valign="top">';
            echo '<a href="bhl_image.php?PageID=' . $hit->PageID . '" rel="lightbox">';
            echo '<img style="border:1px solid rgb(128,128,128);" src="bhl_image.php?PageID=' . $hit->PageID . '&amp;thumbnail" alt="page thumbnail"/>';
            echo '</a>';
            echo '</td>';
            // Details of match
            echo '<td valign="top">';
            echo '<div style="margin-bottom:4px;">' . $hit->snippet . '</div>';
            echo "<div><span>Title match score = " . $hit->score . "</span></div>";
            echo '<div><span>BHL PageID </span><a href="http://www.biodiversitylibrary.org/page/' . $hit->PageID . '">' . $hit->PageID . '</a></div>';
            // Action
            echo '<br/><span style="padding:2px;cursor:pointer;background-color:#2D7BB2;color:white;font-size:18px;font-family:Arial;text-align:center" onclick="store(\'metadata_form\', \'' . $hit->PageID . '\');">&nbsp;Click here to accept this match&nbsp;</span>';
            echo '</td>';
            echo '</tr>';
        }
        echo '</table>';
        // Recaptcha
        $recaptcha = !user_is_logged_in();
        if ($recaptcha) {
            echo '<script type="text/javascript">';
            echo 'var RecaptchaOptions = ';
            echo '{';
            echo 'theme: \'white\',';
            echo 'tabindex: 2';
            echo '};';
            echo '</script>';
            echo '<div id="recaptcha_div">';
            //			echo '<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=' . $config['recaptcha_publickey'] . '"></script>';
            // https://groups.google.com/forum/?fromgroups#!topic/recaptcha/V7qswqBnA1o
            echo '<script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=' . $config['recaptcha_publickey'] . '"></script>';
            echo '</div>';
        }
        echo '</form>';
    } else {
        echo '<p>No matching article found</p>';
        echo '<ul>';
        echo '<li><a href="openurl.php">Return to Reference Finder</a></li>';
        echo '<li><a href="http://biodiversitylibrary.org/openurl?' . $_SERVER['QUERY_STRING'] . '" target= "_new">Try to find using BHL OpenURL resolver</a></li>';
        echo '<li><a href="http://bioguid.info/openurl.php?' . $_SERVER['QUERY_STRING'] . '" target= "_new">Try to find using bioGUID OpenURL resolver</a></li>';
        echo '</ul>';
    }
    echo html_body_close();
    echo html_html_close();
}
Exemplo n.º 10
0
 function DisplayHtmlContent()
 {
     global $config;
     echo html_page_header(true, '', 'name');
     echo '<h1>' . $this->GetTitle() . '</h1>';
     if (count($this->object->specimens) == 0) {
         echo '<p>No specimens with this code</p>';
     } else {
         // What articles have this specimen?
         echo '<h2>References in BioStor with this specimen</h2>';
         $refs = specimens_references_with_code($this->code);
         //print_r($refs);
         foreach ($refs as $occurrenceID => $ref_list) {
             if ($occurrenceID != 0) {
                 echo '<p>GBIF occurrence <a class="gbif" href="http://data.gbif.org/occurrences/' . $occurrenceID . '/" target="_new">' . $occurrenceID . '</a>';
                 $datasetID = specimens_dataset_from_occurrence($occurrenceID);
                 $dataset = specimens_dataset($datasetID);
                 echo ' from dataset <a href="gbif_dataset.php?datasetID=' . $dataset->datasetID . '">' . $dataset->dataResourceName . ' (' . $dataset->providerName . ')' . '</a>';
                 echo '</p>';
                 $occurrence = specimens_from_occurrenceID($occurrenceID);
                 echo '<p>' . $occurrence->scientificName . ' (' . join(':', $occurrence->lineage) . ')' . '</p>';
             } else {
                 echo '<p>(specimen not known in GBIF)</p>';
             }
             echo '<table cellspacing="0" cellpadding="2" width="100%">';
             foreach ($ref_list as $reference_id) {
                 $reference = db_retrieve_reference($reference_id);
                 echo '<tr';
                 if (in_array($reference_id, $act_refs)) {
                     echo ' style="background-color:#D8F3C9;"';
                 }
                 echo '>';
                 if ($reference->PageID != 0) {
                     $image = bhl_fetch_page_image($reference->PageID);
                     $imageURL = $image->thumbnail->url;
                 } else {
                     // if it's an article we could use journal image
                     $imageURL = 'http://bioguid.info/issn/image.php?issn=' . $reference->issn;
                 }
                 echo '<td valign="top"><img style="border:1px solid rgb(192,192,192);" src="' . $imageURL . '" width="40" />';
                 echo '</td>';
                 echo '<td valign="top">';
                 echo '<a href="' . $config['web_root'] . 'reference/' . $reference_id . '">' . $reference->title . '</a><br/>';
                 echo '<span>' . reference_authors_to_text_string($reference);
                 if (isset($reference->year)) {
                     echo ' (' . $reference->year . ')';
                 }
                 echo ' ' . reference_to_citation_text_string($reference) . '</span>';
                 echo ' ' . reference_to_coins($reference);
                 if (0) {
                     echo '<div>';
                     echo bhl_pages_with_name_thumbnails($reference_id, $this->object->NameBankID);
                     echo '</div>';
                 }
                 echo '</td>';
                 echo '</tr>';
             }
             echo '</table>';
         }
     }
 }
Exemplo n.º 11
0
function main($uri)
{
    global $config;
    // Triple store
    global $store_config;
    global $store;
    $uri = urldecode($uri);
    $ntriples = get_canonical_uri($uri);
    //echo $ntriples; exit();
    if ($ntriples == 0) {
        // Fetch URI
        echo '<html>';
        echo '<body>';
        echo 'Sorry, don\'t have this URI <b>' . $uri . '</b>, trying to fetch it...';
        $uri_to_fetch = $uri;
        if (preg_match('/^urn:lsid:/', $uri_to_fetch)) {
            $uri_to_fetch = 'http://bioguid.info/' . $uri_to_fetch;
        }
        echo $uri_to_fetch;
        // can we get it, if so redirect...
        $query = "LOAD <" . $uri_to_fetch . ">";
        $r = $store->query($query);
        /*echo $query;
        		
        		echo '<pre>';
        		print_r($r);
        		echo '</pre>';
        		exit(); */
        if ($r['result']['t_count'] > 0) {
            // Got it, redirect to web page for this URI
            echo '<script type="text/javascript">';
            echo 'document.location="' . $config['web_root'] . 'uri/' . $uri . '";';
            echo '</script>';
        } else {
            // Bugger...
            echo "Badness happened";
        }
        echo '</body>';
        echo '</html>';
    } else {
        // Display info about this object (having issues with CONSTRUCT not returning language codes!?)
        $sparql = "\nCONSTRUCT\n{\n\t<{$uri}> ?o ?p\n}\n\nWHERE \n{ \n\t<{$uri}> ?o ?p\n}\n";
        $sparql = "DESCRIBE <{$uri}>";
        //echo $sparql . "\n";
        // get object
        $r = $store->query($sparql);
        $index = $r['result'];
        $parser = ARC2::getRDFParser();
        $rdfxml_doc = $parser->toRDFXML($index);
        //echo $rdfxml_doc;
        // What type if this?
        $dom = new DOMDocument();
        $dom->loadXML($rdfxml_doc);
        $xpath = new DOMXPath($dom);
        $xpath->registerNamespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
        $xpath->registerNamespace("dcterms", "http://purl.org/dc/terms/");
        $type = array();
        $xsl_filename = '';
        $html = '';
        $topic_title = '';
        //------------------------------------------------------------------------------------------
        // Get type(s) of objects
        $name = '';
        $nodeCollection = $xpath->query('//rdf:type/@rdf:resource');
        foreach ($nodeCollection as $node) {
            $type[] = $node->firstChild->nodeValue;
        }
        //------------------------------------------------------------------------------------------
        // Post process objects...
        // Publication add sequences...
        // possibe relations are isReferencedBy (stated in GenBank record) and references
        // which is stated in publication if we have links via PubMed.
        if (in_array('http://purl.org/ontology/bibo/Article', $type)) {
            $topic_title = get_title($uri);
            // Sequences
            $xml = query_sequences_from_publication($uri);
            append_xml($dom, $xml);
            // Taxa
            // Geography
            $xml = query_localities_from_publication($uri);
            append_xml($dom, $xml);
        }
        // Journal
        if (in_array('http://purl.org/ontology/bibo/Journal', $type)) {
            $topic_title = get_title($uri);
            $xml = query_articles_from_journal($uri);
            append_xml($dom, $xml);
        }
        // Collection
        if (in_array('http://rs.tdwg.org/ontology/voc/Collection#Collection', $type)) {
            $topic_title = get_title($uri);
            $xml = query_specimens_from_collection($uri);
            append_xml($dom, $xml);
        }
        // GenBank: Add specimen if we have it...
        if (in_array('http://purl.uniprot.org/core/Molecule', $type)) {
            $topic_title = get_title($uri);
            $specimen_uri = '';
            $nodeCollection = $xpath->query('//dcterms:relation/@rdf:resource');
            foreach ($nodeCollection as $node) {
                $specimen_uri = $node->firstChild->nodeValue;
            }
            if ($specimen_uri != '') {
                // Fetch RDF
                $r = describe($specimen_uri);
                $index = $r['result'];
                $extraXml = $parser->toRDFXML($index);
                // Load into current DOM
                $extraDom = new DOMDocument();
                $extraDom->loadXML($extraXml);
                $n = $dom->importNode($extraDom->documentElement, true);
                // Append to root node
                $dom->documentElement->appendChild($n);
            }
        }
        // Specimen
        if (in_array('http://rs.tdwg.org/ontology/voc/TaxonOccurrence#TaxonOccurrence', $type)) {
            // Get sequences from this specimen
            $xml = query_sequences_from_specimen($uri);
            append_xml($dom, $xml);
            $xml = query_publications_from_specimen($uri);
            append_xml($dom, $xml);
        }
        // NCBI taxon
        if (in_array('http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept', $type)) {
            $topic_title = get_title($uri, '<http://rs.tdwg.org/ontology/voc/TaxonConcept#nameString>');
            // Get sequences from this specimen
            $xml = query_sequences_from_taxon($uri);
            append_xml($dom, $xml);
            $xml = query_localities_from_taxon($uri);
            append_xml($dom, $xml);
            $xml = query_publications_from_taxon($uri);
            append_xml($dom, $xml);
        }
        // Dbpedia
        if (in_array('http://www.opengis.net/gml/_Feature', $type)) {
            $topic_title = get_title($uri, 'rdfs:label', 'en');
        }
        if (in_array('http://www.w3.org/2002/07/owl#Thing', $type)) {
            $topic_title = get_title($uri, 'rdfs:label', 'en');
        }
        //print_r($type);
        //------------------------------------------------------------------------------------------
        // Display
        // Article
        if (in_array('http://purl.org/ontology/bibo/Article', $type)) {
            $xsl_filename = 'xsl/article.xsl';
        }
        // Journal
        if (in_array('http://purl.org/ontology/bibo/Journal', $type)) {
            $xsl_filename = 'xsl/journal.xsl';
        }
        // Dbpedia thing
        if (in_array('http://www.w3.org/2002/07/owl#Thing', $type)) {
            $xsl_filename = 'xsl/dbpedia.xsl';
        }
        // Dbpedia feature
        if (in_array('http://www.opengis.net/gml/_Feature', $type)) {
            $xsl_filename = 'xsl/dbpedia.xsl';
        }
        // genbank sequence
        if (in_array('http://purl.uniprot.org/core/Molecule', $type)) {
            $xsl_filename = 'xsl/genbank.xsl';
        }
        // taxon concept
        if (in_array('http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept', $type)) {
            $xsl_filename = 'xsl/taxonomy.xsl';
        }
        // Collection
        if (in_array('http://rs.tdwg.org/ontology/voc/Collection#Collection', $type)) {
            $xsl_filename = 'xsl/collection.xsl';
        }
        // Specimen (by itself)
        if (in_array('http://rs.tdwg.org/ontology/voc/TaxonOccurrence#TaxonOccurrence', $type) && !in_array('http://purl.uniprot.org/core/Molecule', $type)) {
            $xsl_filename = 'xsl/occurrence.xsl';
        }
        //------------------------------------------------------------------------------------------
        if ($xsl_filename != '') {
            $xp = new XsltProcessor();
            $xsl = new DomDocument();
            $xsl->load($xsl_filename);
            $xp->importStylesheet($xsl);
            $html = $xp->transformToXML($dom);
        } else {
            $html .= '<p/>';
            $html .= '<div style="padding:10px;background:white;-webkit-border-radius:10px;">';
            $html .= '<pre class="brush:xml">' . htmlentities($dom->saveXML(), ENT_COMPAT, 'UTF-8') . '</pre>';
            $html .= '</div>';
        }
        // Display...
        header("Content-type: text/html; charset=utf-8\n\n");
        echo html_html_open();
        echo html_head_open();
        echo html_title($topic_title);
        echo html_include_css('css/main.css');
        echo html_include_script('js/prototype.js');
        echo html_include_script('js/lookahead.js');
        echo html_include_script('js/browse.js');
        // RDF display
        echo html_include_script('js/shCore.js');
        echo html_include_script('js/shBrushXml.js');
        echo html_include_css('css/shCore.css');
        echo html_include_css('css/shThemeDefault.css');
        echo html_head_close();
        echo html_body_open();
        //echo html_page_header(true, $uri);
        echo '<div id="container">' . "\n";
        echo '   <div id="banner">' . "\n";
        echo html_page_header(true, $uri);
        echo '   </div>' . "\n";
        /*echo '<div id="nav">';
        		echo '   </div>' . "\n";
        		echo '<div id="content">';
        		echo 'xxxxxx';
        		echo '   </div>' . "\n"; */
        /*		echo '<div class="main">';
        		
        		echo '<div class="maincontent">';
        		echo '<div class="maincontent_border">'; */
        if (1) {
            echo $html;
        } else {
            ?>
<div id="nav">
  <div>
    <b>On the Web</b>
    <br>
    <ul type="square">
      <li>
        <a href="http://dx.doi.org/10.1073/pnas.0907926106" target="_new">doi:10.1073/pnas.0907926106</a>
      </li>
    </ul>
    <b>Post to:</b>
    <br>
    <ul type="square">
      <li>Citeulike</li>
      <li>Connotea</li>
      <li>Mendeley</li>
    </ul>
  </div>
</div>
<div id="content">
  <h1>[Article] Bacterial gut symbionts are tightly linked with the evolution of herbivory in ants.</h1>
  <h2>Jacob A Russell, Corrie S Moreau, Benjamin Goldman-Huertas, Mikiko Fujiwara, David J Lohman, Naomi E Pierce</h2>
  <div><span class="internal_link" onclick="lookahead('http://bioguid.info/issn:0027-8424')">Proceedings of the National Academy of Sciences of the United States of America</span> 106: 21236 (2009) doi:10.1073/pnas.0907926106</div>
  <div class="abstract">Ants are a dominant feature of terrestrial ecosystems, yet we know little about the forces that drive their evolution. Recent findings illustrate that their diets range from herbivorous to predaceous, with &amp;quot;herbivores&amp;quot; feeding primarily on exudates from plants and sap-feeding insects. Persistence on these nitrogen-poor food sources raises the question of how ants obtain sufficient nutrition. To investigate the potential role of symbiotic microbes, we have surveyed 283 species from 18 of the 21 ant subfamilies using molecular techniques. Our findings uncovered a wealth of bacteria from across the ants. Notable among the surveyed hosts were herbivorous &amp;quot;turtle ants&amp;quot; from the related genera Cephalotes and Procryptocerus (tribe Cephalotini). These commonly harbored bacteria from ant-specific clades within the Burkholderiales, Pseudomonadales, Rhizobiales, Verrucomicrobiales, and Xanthomonadales, and studies of lab-reared Cephalotes varians characterized these microbes as symbiotic residents of ant guts. Although most of these symbionts were confined to turtle ants, bacteria from an ant-specific clade of Rhizobiales were more broadly distributed. Statistical analyses revealed a strong relationship between herbivory and the prevalence of Rhizobiales gut symbionts within ant genera. Furthermore, a consideration of the ant phylogeny identified at least five independent origins of symbioses between herbivorous ants and related Rhizobiales. Combined with previous findings and the potential for symbiotic nitrogen fixation, our results strongly support the hypothesis that bacteria have facilitated convergent evolution of herbivory across the ants, further implicating symbiosis as a major force in ant evolution.</div>
  <div>
    <ul type="square">
      <li><span class="internal_link" onclick="lookahead('http://bioguid.info/genbank:AF465438')">AF465438</span></li>
    </ul>
  </div>
</div>

	<?php 
        }
        echo '   <div id="footer">' . "\n";
        echo '     <p>About:</p>' . "\n";
        echo '   </div>' . "\n";
        echo '</div>' . "\n";
        // container
        echo '	
<div id="horizon">
	<div id="progress" style="display:none">
        <p>Hello</p>
	</div>
</div>';
        echo '
<script type="text/javascript">
	SyntaxHighlighter.all()
</script>';
        // footer
        echo html_body_close();
        echo html_html_close();
    }
}
Exemplo n.º 12
0
<?php

// list all GBIF datasets
require_once dirname(dirname(__FILE__)) . '/db.php';
require_once dirname(__FILE__) . '/html.php';
header("Content-type: text/html; charset=utf-8\n\n");
echo html_html_open();
echo html_head_open();
echo html_title('GBIF datasets  - ' . $config['site_name']);
echo html_head_close();
echo html_body_open();
echo html_page_header(true);
echo '<h1>GBIF datasets with occurrences in BioStor</h1>';
echo '<table width="50%" cellpadding="2">';
echo '<tr><th>Dataset</th><th>Count</th></tr>';
$sql = 'select count(occurrenceID) as c, datasetID, dataResourceName, providerName 
from rdmp_reference_specimen_joiner 
inner join rdmp_specimen using (occurrenceID) 
inner join rdmp_gbif_dataset USING(datasetID)
group by datasetID 
order by c DESC';
$sql = 'select count(occurrenceID) as c, datasetID
from rdmp_reference_specimen_joiner 
inner join rdmp_specimen using (occurrenceID) 
group by datasetID 
order by c DESC';
$result = $db->Execute($sql);
if ($result == false) {
    die("failed [" . __FILE__ . ":" . __LINE__ . "]: " . $sql);
}
while (!$result->EOF) {
Exemplo n.º 13
0
$page_number = $s_display_options['page_number'];
$filter_per_page = $s_display_options['filter']['per_page'];
$filter_bug_status = $s_display_options['filter']['status'];
$filter_bug_category = $s_display_options['filter']['category'];
$filter_bug_component = $s_display_options['filter']['component'];
$filter_reported_by = $s_display_options['filter']['reported_by'];
$filter_assigned_to = $s_display_options['filter']['assigned_to'];
$filter_assigned_to_dev = $s_display_options['filter']['assigned_to_developer'];
$filter_found_in_rel = $s_display_options['filter']['found_in_release'];
$filter_assigned_to_rel = $s_display_options['filter']['assigned_to_release'];
$filter_view_closed = $s_display_options['filter']['view_closed'];
$filter_search = $s_display_options['filter']['bug_search'];
html_window_title();
html_print_body();
html_page_title("Exercise");
html_page_header($db, "no project");
html_print_menu();
error_report_check($_GET);
print "<br>";
print "<form method='post' action='{$page}' name='bug_form'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
html_print_bug_filter($project_id, $filter_bug_status, $filter_bug_category, $filter_bug_component, $filter_reported_by, $filter_assigned_to, $filter_assigned_to_dev, $filter_found_in_rel, $filter_assigned_to_rel, $filter_per_page, $filter_view_closed, $filter_search, $filter_jump);
print "<br>" . NEWLINE;
util_set_order_by($order_by, $_GET);
util_set_order_dir($order_dir, $_GET);
util_set_page_number($page_number, $_GET);
util_set_order_by($order_by, $_POST);
util_set_order_dir($order_dir, $_POST);
util_set_page_number($page_number, $_POST);
function exercise($project_id, $page_number = 0, $order_by = BUG_ID, $order_dir = "DESC", $bug_status = "", $category = "", $component = "", $reported_by = "", $assigned_to = "", $assigned_to_developer = "", $found_in_release = "", $assigned_to_release = null, $per_page = null, $view_closed = 'No', $search = "", $jump = "", $csv_name = null)
{
Exemplo n.º 14
0
 function DisplayHtmlContent()
 {
     global $config;
     echo html_page_header(true, '', 'name');
     echo '<h1>' . $this->GetTitle() . '</h1>';
     echo '<h2>Identifiers</h2>';
     echo '<ul>';
     if ($this->object->NameBankID != 0) {
         echo '<li>' . 'urn:lsid:ubio.org:namebank:' . $this->object->NameBankID . '</li>';
     }
     echo '</ul>';
     // Taxon name (nomenclators)
     $acts = acts_for_namestring($this->GetTitle());
     $act_refs = references_for_acts_for_namestring($this->GetTitle());
     if (count($acts) > 0) {
         echo '<h2>Taxonomic names</h2>';
         echo '<ul>';
         foreach ($acts as $tn) {
             echo '<li>' . $tn->global_id . '</li>';
         }
         echo '</ul>';
     }
     $col = col_accepted_name_for($this->GetTitle());
     if (isset($col->name)) {
         echo '<h2>Catalogue of Life accepted name</h2>' . "\n";
         echo '<p>';
         echo '<span><a href="' . $config['web_root'] . 'name/' . $col->name . '">' . $col->name . '</a>' . ' ' . $col->author . '</span>';
         echo '</p>' . "\n";
         // Synonyms
         $col_synonyms = col_synonyms_for_namecode($col->name_code);
         if (count($col_synonyms) != 0) {
             echo '<h3>Synonyms</h3>' . "\n";
             echo '<ul>' . "\n";
             foreach ($col_synonyms as $s) {
                 echo '<li><a href="' . $config['web_root'] . 'name/' . $s->name . '">' . $s->name . '</a> ' . $s->author . '</li>' . "\n";
             }
             echo '</ul>' . "\n";
         }
     }
     if (1) {
         /*
         // What pages have this name? (BHL timeline)
         $hits = bhl_name_search($this->object->NameBankID);
         if (count($hits) > 0)
         {
         	echo '<h2>BHL</h2>' . "\n";		
         	echo '<h3>Distribution of name in BHL</h3>';		
         	echo '<div>' . "\n";
         	echo '   <img src="' . sparkline_bhl_name($hits, 360,100) . '" alt="sparkline" />' . "\n";
         	echo '</div>' . "\n";
         }
         else
         {
         	//echo '<p>Name not found in BHL</p>';
         }
         */
         // What articles have this name?
         echo '<hr />';
         echo '<h2>References in BioStor</h2>';
         //		echo '<p><img src="/images/star.png"> indicates reference that publishes a "nomenclatural act", such as publishing the name.</p>';
         echo '<div>';
         echo '<div style="display:inline;border:1px solid rgb(192,192,192);background-color:#D8F3C9;width:20px;height:20px;">&nbsp;&nbsp;&nbsp;&nbsp;</div>';
         echo '&nbsp;Reference contains nomenclatural act, such as publishing the name';
         echo '</div>';
         echo '<p />';
         // Find using BHL bhl_page_name index
         //$refs = bhl_references_with_name($this->object->NameBankID);
         $refs = bhl_references_with_namestring($this->GetTitle());
         // Merge with references from nomenclators
         $refs = array_merge($refs, $act_refs);
         $refs = array_unique($refs);
         //print_r($refs);
         if (count($refs) == 0) {
             echo '<p>[No references]</p>';
         }
         /*		
         		echo '<ul class="reference-list">';
         		foreach($refs as $reference_id)
         		{
         			$reference = db_retrieve_reference ($reference_id);
         			echo '<li ';
         			
         			if (in_array($reference_id, $act_refs))
         			{
         				echo 'class="act"';
         			}
         			else
         			{
         				echo 'class="default"';
         			}
         			echo '>';
         			echo '<a href="' . $config['web_root'] . 'reference/' . $reference_id . '">' . $reference->title . '</a><br/>';
         			echo '<span style="color:green;">' . reference_authors_to_text_string($reference);
         			if (isset($reference->year))
         			{
         				echo ' (' . $reference->year . ')';
         			}
         			echo ' ' . reference_to_citation_text_string($reference) . '</span>';
         			echo ' ' . reference_to_coins($reference);
         			
         			if (0)
         			{
         				echo '<div>';
         				echo bhl_pages_with_name_thumbnails($reference_id,$this->object->NameBankID);	
         				echo '</div>';
         			}
         			echo '</li>';
         		}
         		echo '</ul>';
         */
         echo '<table cellspacing="0" cellpadding="2" width="100%">';
         foreach ($refs as $reference_id) {
             $reference = db_retrieve_reference($reference_id);
             echo '<tr';
             if (in_array($reference_id, $act_refs)) {
                 echo ' style="background-color:#D8F3C9;"';
             }
             echo '>';
             if ($reference->PageID != 0) {
                 $image = bhl_fetch_page_image($reference->PageID);
                 $imageURL = $image->thumbnail->url;
             } else {
                 // if it's an article we could use journal image
                 $imageURL = 'http://bioguid.info/issn/image.php?issn=' . $reference->issn;
             }
             echo '<td valign="top"><img style="border:1px solid rgb(192,192,192);" src="' . $imageURL . '" width="40" />';
             echo '</td>';
             echo '<td valign="top">';
             echo '<a href="' . $config['web_root'] . 'reference/' . $reference_id . '">' . $reference->title . '</a><br/>';
             echo '<span>' . reference_authors_to_text_string($reference);
             if (isset($reference->year)) {
                 echo ' (' . $reference->year . ')';
             }
             echo ' ' . reference_to_citation_text_string($reference) . '</span>';
             echo ' ' . reference_to_coins($reference);
             if (0) {
                 echo '<div>';
                 echo bhl_pages_with_name_thumbnails($reference_id, $this->object->NameBankID);
                 echo '</div>';
             }
             echo '</td>';
             echo '</tr>';
         }
         echo '</table>';
         /*
         $refs = col_references_for_name($this->GetTitle());
         if (count($refs) != 0)
         {
         	echo '<h2>Catalogue of Life Bibliography</h2>';
         	echo '<ol>';
         	foreach($refs as $ref)
         	{
         		echo '<li style="border-bottom:1px dotted rgb(128,128,128);padding:4px;">';
         		echo '<span>';
         		echo '[' . $ref->record_id . '] ';
         		if (isset($ref->reference_type))
         		{
         			echo '[' . $ref->reference_type . '] ';
         		}
         		echo $ref->author;
         		echo ' ';
         		echo $ref->year;
         		echo ' ';
         		echo $ref->title;
         		echo '. ';
         		echo $ref->source;
         		echo '</span>';
         		echo '</li>';
         	}
         	echo '</ol>';
         }
         */
     }
 }
Exemplo n.º 15
0
<?php

/*
 * Downloads Page for ScummVM
 * by Jeremy Newman <*****@*****.**>
 *
 */
// set this for position of this file relative
$file_root = "..";
// load libraries
require $file_root . "/include/" . "incl.php";
// start of html
html_page_header("ScummVM :: Website Revamp contest poll");
//display welcome table
html_content_begin('Website Revamp contest poll');
?>
  <div class="par-item">
    <div class="par-head">
       Website Revamp contest poll
    </div>

    <div class="par-content">
	<h1>Website Revamp contest poll -- closed, draven declared winner</h1>
	
	<p>The three finalists of the website revamp contest can be seen here. The contest was won by draven, you can see the final standings below</p>
	
	<center>
	<table cellpadding="10" cellspacing="10">
	<tr>
	<td align="center"><a href="arturom.jpg" target="_blank"><img src="arturom-thumb.jpg" height="120" width="120" alt="arturom"><br>arturom</a></td>
	<td align="center"><a href="draven.jpg" target="_blank"><img src="draven-thumb.jpg" height="120" width="120" alt="draven"><br>draven</a></td>
Exemplo n.º 16
0
 function DisplayHtmlContent()
 {
     global $config;
     log_access($this->id, 'html');
     echo html_page_header(true, '', 'name');
     // Embed first page of OCR text, added 2011-12-07
     if ($this->in_bhl) {
         $pages = bhl_retrieve_reference_pages($this->id);
         $page_ids = array($pages[0]->PageID);
         $text = bhl_fetch_text_for_pages($page_ids);
         $text = str_replace('\\n', '', $text);
         $text = str_replace('- ', '-', $text);
         $text = str_replace('- ', '-', $text);
         echo "\n<!-- First page of OCR text -->\n";
         echo '<div style="display:none;">' . "\n";
         echo htmlentities($text, ENT_COMPAT, "UTF-8");
         echo '</div>' . "\n";
     }
     echo '<div style="float:right;background-color:rgb(230,242,250);padding:6px">' . "\n";
     echo '<h2>Identifiers</h2>' . "\n";
     echo '<ul class="guid-list">' . "\n";
     echo '<li class="permalink">' . '<div itemscope itemtype="http://schema.org/ScholarlyArticle">' . '<a href="' . $config['web_root'] . 'reference/' . $this->id . '" title="Permalink">' . $config['web_root'] . 'reference/' . $this->id . '</a>' . '</div>' . '</li>' . "\n";
     if ($this->in_bhl) {
         echo '<li class="bhl"><a href="http://www.biodiversitylibrary.org/page/' . $this->object->PageID . '" target="_new" title="BHL page"  onClick="_gaq.push([\'_trackEvent\', \'Outbound Links\', \'bhl\', \'' . $this->object->PageID . '\', 0]);">' . $this->object->PageID . '</a></li>' . "\n";
     }
     if (isset($this->object->doi)) {
         echo '<li class="doi"><a href="http://dx.doi.org/' . $this->object->doi . '" target="_new" title="DOI" onClick="_gaq.push([\'_trackEvent\', \'Outbound Links\', \'doi\', \'' . $this->object->doi . '\', 0]);">' . $this->object->doi . '</a></li>' . "\n";
     }
     if (isset($this->object->url)) {
         echo '<li class="url"><a href="' . $this->object->url . '" target="_new" title="URL">' . trim_string($this->object->url, 30) . '</a></li>' . "\n";
     }
     if (isset($this->object->pdf)) {
         echo '<li class="pdf"><a href="' . $this->object->pdf . '" target="_new" title="PDF">' . trim_string($this->object->pdf, 30) . '</a></li>' . "\n";
     }
     if (isset($this->object->hdl)) {
         echo '<li class="handle"><a href="http://hdl.handle.net/' . $this->object->hdl . '" target="_new" title="Handle">' . $this->object->hdl . '</a></li>' . "\n";
     }
     if (isset($this->object->lsid)) {
         echo '<li class="lsid"><a href="' . $config['web_root'] . $this->object->lsid . '" title="LSID">' . $this->object->lsid . '</a></li>' . "\n";
     }
     if (isset($this->object->pmid)) {
         echo '<li class="pmid"><a href="http://www.ncbi.nlm.nih.gov/pubmed/' . $this->object->pmid . '" target="_new" title="PMID" >' . $this->object->pmid . '</a></li>' . "\n";
     }
     echo '</ul>' . "\n";
     echo '<h2>Export</h2>' . "\n";
     echo '<ul class="export-list">' . "\n";
     // Mendeley
     echo '<li class="mendeley"><a href="http://www.mendeley.com/import/?url=' . urlencode($config['web_root'] . 'reference/' . $this->id) . '" title="Add to Mendeley" target="_new" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'Mendeley\', \'' . $this->id . '\', 0]);">Mendeley</a></li>';
     if ($this->in_bhl) {
         echo '<li class="pdf"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.pdf" title="PDF" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'pdf\', \'' . $this->id . '\', 0]);">PDF</a></li>';
     }
     echo '<li class="xml"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.xml" title="Endnote XML" target="_new" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'Endnote\', \'' . $this->id . '\', 0]);">Endnote XML</a></li>';
     echo '<li class="ris"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.ris" title="RIS" target="_new" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'RIS\', \'' . $this->id . '\', 0]);">Reference manager</a></li>';
     echo '<li class="bibtex"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.bib" title="BibTex" target="_new" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'bibtex\', \'' . $this->id . '\', 0]);">BibTex</a></li>';
     echo '<li class="bibjson"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.bibjson" title="BibJSON" target="_new" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'bibjson\', \'' . $this->id . '\', 0]);">BibJSON</a></li>';
     echo '<li class="wikipedia"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.wikipedia" title="Wikipedia" target="_new" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'Wikipedia\', \'' . $this->id . '\', 0]);">Wikipedia</a></li>';
     if ($this->in_bhl) {
         echo '<li class="text"><a href="' . $config['web_root'] . 'reference/' . $this->id . '.text" title="Text" onClick="_gaq.push([\'_trackEvent\', \'Export\', \'text\', \'' . $this->id . '\', 0]);">Text</a></li>';
     }
     echo '</ul>' . "\n";
     echo '</div>' . "\n";
     //------------------------------------------------------------------------------------------
     echo '<div itemscope itemtype="http://schema.org/ScholarlyArticle">';
     echo '<h1>' . '<div itemprop="name">' . $this->GetTitle() . '</div>' . '</h1>' . "\n";
     //------------------------------------------------------------------------------------------
     // Authors
     echo '<div>' . "\n";
     $count = 0;
     $num_authors = count($this->object->authors);
     if ($num_authors > 0) {
         foreach ($this->object->authors as $author) {
             echo '<a href="' . $config['web_root'] . 'author/' . $author->id . '">';
             echo $author->forename . ' ' . $author->lastname;
             if (isset($author->suffix)) {
                 echo ' ' . $author->suffix;
             }
             echo '</a>';
             $count++;
             if ($count < $num_authors - 1) {
                 echo ', ';
             } else {
                 if ($count < $num_authors) {
                     echo ' and ';
                 }
             }
         }
     }
     echo "\n" . '</div>' . "\n";
     //------------------------------------------------------------------------------------------
     // Metadata and COinS
     echo '<div>' . "\n";
     echo '<div itemprop="description">';
     echo '<span class="journal">';
     // Various options for linking journal.
     if (isset($this->object->issn)) {
         echo '<a href="' . $config['web_root'] . 'issn/' . $this->object->issn . '">';
         echo $this->object->secondary_title;
         echo '</a>';
     } elseif (isset($this->object->oclc)) {
         echo '<a href="' . $config['web_root'] . 'oclc/' . $this->object->oclc . '">';
         echo $this->object->secondary_title;
         echo '</a>';
     } else {
         echo $this->object->secondary_title;
     }
     echo '</span>';
     echo ' ';
     if (isset($this->object->series)) {
         echo ' <span class="volume">(' . $this->object->series . ') </span>';
     }
     echo '<span class="volume">' . $this->object->volume . '</span>';
     if (isset($this->object->issue)) {
         echo '<span class="issue">' . '(' . $this->object->issue . ')' . '</span>';
     }
     echo ':';
     echo ' ';
     echo '<span class="pages">' . $this->object->spage . '</span>';
     if (isset($this->object->epage)) {
         echo '<span class="pages">' . '-' . $this->object->epage . '</span>';
     }
     if (isset($this->object->year)) {
         echo ' ';
         echo '<span class="year">' . '(' . $this->object->year . ')' . '</span>';
     }
     echo reference_to_coins($this->object);
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '</div>';
     // schema
     //------------------------------------------------------------------------------------------
     // When record added and updated
     echo '<p class="explanation">Reference added ';
     echo distanceOfTimeInWords(strtotime($this->object->created), time(), true);
     echo ' ago';
     echo '</p>' . "\n";
     //------------------------------------------------------------------------------------------
     // Social bookmarking
     //		echo '<g:plusone size="tall"></g:plusone>';
     echo '<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="rdmpage" data-related="biostor_org">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>';
     //------------------------------------------------------------------------------------------
     // Export options
     /*		echo '<h2>Export</h2>' . "\n";
     		echo '<div>' . "\n";
     		echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '.xml" title="Endnote XML">Endnote XML</a></span>';
     		echo ' | ';
     		echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '.ris" title="RIS">Reference manager</a></span>';		
     		echo ' | ';
     		echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '.bib" title="BibTex">BibTex</a></span>';	
     		
     		if ($this->in_bhl)
     		{
     			echo ' | ';
     			echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '.text" title="Text">Text</a></span>';
     		}
     		echo '</div>' . "\n";
     */
     //------------------------------------------------------------------------------------------
     // Identifiers
     /*		echo '<h2>Identifiers</h2>' . "\n";
     		echo '<ul>' . "\n";
     		if ($this->in_bhl)
     		{
     			// BHL reference
     			echo '<li><a href="http://www.biodiversitylibrary.org/page/' . $this->object->PageID . '" target="_new">BHL PageID:' . $this->object->PageID . '</a></li>' . "\n";
     		}
     		
     		if (isset($this->object->sici))
     		{
     			echo '<li><a href="' . $config['web_root'] . 'sici/' . $this->object->sici . '">' .  $this->object->sici . '</a></li>' . "\n";
     		}
     		if (isset($this->object->url))
     		{
     			echo '<li><a href="' . $this->object->url . '" target="_new">' .  $this->object->url . '</a></li>' . "\n";
     		}
     		if (isset($this->object->pdf))
     		{
     			echo '<li><a href="' . $this->object->pdf . '" target="_new">' .  $this->object->pdf . '</a></li>' . "\n";
     		}
     		if (isset($this->object->doi))
     		{
     			echo '<li><a href="http://dx.doi.org/' . $this->object->doi . '" target="_new">' .  $this->object->doi . '</a></li>' . "\n";
     		}
     		if (isset($this->object->hdl))
     		{
     			echo '<li><a href="http://hdl.handle.net/' . $this->object->hdl . '" target="_new">' .  $this->object->hdl . '</a></li>' . "\n";
     		}
     		if (isset($this->object->lsid))
     		{
     			echo '<li><a href="' . $config['web_root'] . $this->object->lsid . '">' . $this->object->lsid . '</a></li>' . "\n";
     		}
     		if (isset($this->object->pmid))
     		{
     			echo '<li><a href="http://www.ncbi.nlm.nih.gov/pubmed/' . $this->object->pmid . '" target="_new">' . $this->object->pmid . '</a></li>' . "\n";
     		}
     		echo '</ul>' . "\n";*/
     //------------------------------------------------------------------------------------------
     // Linking
     /*
     echo '<div>' . "\n";
     echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '/backlinks" title="References">Cites (' . num_cites($this->id) . ')</a></span>';
     echo ' | ';
     echo '<span><a href="' . $config['web_root'] . 'reference/' . $this->id . '/forwardlinks" title="Forward links">Cited by (' . num_cited_by($this->id) . ')</a></span>';
     echo '</div>' . "\n";
     */
     //------------------------------------------------------------------------------------------
     if ($this->in_bhl) {
         //--------------------------------------------------------------------------------------
         echo '<h2>Viewer</h2>';
         echo '<p id="viewer_status"></p>' . "\n";
         echo '<table width="100%" >';
         echo '<tr  valign="top"><td>';
         echo bhl_reference_viewer($this->id, $this->page);
         echo '</td>';
         echo '<td>';
         echo $this->DisplayEditForm();
         echo '</td></tr>';
         echo '</table>';
         if (0) {
             //--------------------------------------------------------------------------------------
             $tag_cloud = name_tag_cloud($this->taxon_names);
             if ($tag_cloud != '') {
                 echo '<h2>Taxon name tag cloud</h2>';
                 echo '<p class="explanation">Taxonomic names extracted from OCR text for document using uBio tools.</p>';
                 echo $tag_cloud;
                 echo '<h2>Taxonomic classification</h2>';
                 if ($config['use_gbif']) {
                     echo '<p class="explanation">GBIF classification for taxonomic names in document</p>';
                 } else {
                     echo '<p class="explanation">Catalogue of Life classification for taxonomic names in document</p>';
                 }
                 echo '<div id="taxon_names"></div>';
                 echo '<script type="text/javascript">make_tag_tree();</script>';
             }
         }
         //--------------------------------------------------------------------------------------
         if (count($this->localities) != 0) {
             echo '<h2>Localities</h2>';
             echo '<p class="explanation">Localities extracted from OCR text.</p>';
             echo '<div id="map_canvas" style="width: 600px; height: 300px"></div>';
         }
         //--------------------------------------------------------------------------------------
         if (count($this->specimens) != 0) {
             echo '<h2>Specimens</h2>';
             echo '<p class="explanation">Specimen codes extracted from OCR text.</p>';
             echo '<ul style="-moz-column-width: 13em; -webkit-column-width: 13em; -moz-column-gap: 1em; -webkit-column-gap: 1em;">';
             foreach ($this->specimens as $occurrence) {
                 echo '<li';
                 if (isset($occurrence->occurrenceID)) {
                     //echo $occurrence->occurrenceID;
                     echo ' class="gbif"';
                 } else {
                     echo ' class="blank"';
                 }
                 echo '>';
                 echo '<a href="specimen/' . rawurlencode($occurrence->code) . '">' . $occurrence->code . '</a>';
                 echo '</li>';
             }
             echo '</ul>';
         }
     } else {
         echo '<table width="100%" >';
         echo '<tr><td valign="top" width="600">';
         $have_content = false;
         // PDF displayed using Google Docs
         if (!$have_content) {
             // If we have a PDF display it using Google Docs Viewer http://docs.google.com/viewer
             if ($this->object->url) {
                 if (preg_match('/\\.pdf$/', $this->object->url)) {
                     echo '<iframe src="http://docs.google.com/viewer?url=';
                     echo urlencode($this->object->url) . '&embedded=true" width="600" height="700" style="border: none;">' . "\n";
                     echo '</iframe>' . "\n";
                     $have_content = true;
                 }
             }
         }
         if (!$have_content) {
             if (isset($this->object->abstract)) {
                 echo '<h3>Abstract</h3>' . "\n";
                 echo '<div>' . $this->object->abstract . '</div>' . "\n";
                 $have_content = true;
             }
         }
         if (!$have_content) {
             echo '<span>[No text or abstract to display]</span>';
         }
         echo '</td>';
         echo '<td>';
         echo $this->DisplayEditForm();
         echo '</td></tr>';
         echo '</table>';
     }
     /*
     //------------------------------------------------------------------------------------------
     // Nomenclature (experimental)
     $acts = acts_in_publication($this->id);
     if (count($acts) > 0)
     {
     	echo '<h2>Names published</h2>' . "\n";
     	echo '<p class="explanation">New names or combinations published in this reference.</p>' . "\n";
     	echo '<table cellspacing="0" cellpadding="2">' . "\n";
     	echo '<tr><th>Name</th><th>Identifier</th></tr>' . "\n";
     	foreach ($acts as $tn)
     	{
     		echo '<tr>';
     		echo '<td style="border-bottom:1px solid rgb(228,228,228);"><a href="' . $config['web_root'] . 'name/' . urlencode($tn->ToHTML()) . '">' . $tn->ToHTML() . '</td>';
     		
     		echo '<td style="border-bottom:1px solid rgb(228,228,228);">' . $tn->global_id . '</td>';
     		
     		echo '</tr>' . "\n";
     	}
     	echo '</table>' . "\n";
     }
     */
 }