forked from BioKIC/Symbiota
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathresourcetab.php
52 lines (47 loc) · 1.72 KB
/
resourcetab.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
include_once('../config/symbini.php');
include_once($SERVER_ROOT.'/content/lang/taxa/index.'.$LANG_TAG.'.php');
include_once($SERVER_ROOT.'/classes/TaxonProfile.php');
Header('Content-Type: text/html; charset='.$CHARSET);
$tid = $_REQUEST['tid'];
$taxAuthId = array_key_exists('taxauthid',$_REQUEST)?$_REQUEST['taxauthid']:1;
//Sanitation
if(!is_numeric($tid)) $tid = 0;
$taxonManager = new TaxonProfile();
$taxonManager->setTid($tid);
/*
$isEditor = false;
if($SYMB_UID){
if($IS_ADMIN || array_key_exists('TaxonProfile',$USER_RIGHTS)){
$isEditor = true;
}
}
*/
?>
<div id="tab-resource" class="sptab">
<?php
echo '<div class="resource-title">'.(isset($LANG['INTERNAL_RESOURCES'])?$LANG['INTERNAL_RESOURCES']:'Internal Resources').'</div>';
echo '<ul>';
$occNum = $taxonManager->getOccTaxonInDbCnt();
if($occNum > -1){
$occMsg = number_format($occNum).' '.(isset($LANG['OCCURRENCES'])?'occurrences':'');
if($occNum){
$occHref = '../collections/list.php?usethes=1&taxa='.$tid;
$occMsg = '<a class="btn" href="'.$occHref.'" target="_blank">'.$occMsg.'</a>';
}
echo '<li>'.$occMsg.'</li>';
}
echo '<li><a href="taxonomy/taxonomydynamicdisplay.php?target='.$tid.'" target="_blank">Taxonomic Tree</a></li>';
echo '</ul>';
//TODO: list other internal resources such as Taxon Traits, etc
if($linkArr = $taxonManager->getLinkArr()){
echo '<div class="resource-title">'.(isset($LANG['EXTERNAL_RESOURCES'])?$LANG['EXTERNAL_RESOURCES']:'External Resources').'</div>';
echo '<ul>';
foreach($linkArr as $linkObj){
echo '<li><a href="'.$linkObj['url'].'" target="_blank">'.$linkObj['title'].'</a></li>';
if($linkObj['notes']) echo '<li style="margin-left:10px">'.$linkObj['notes'].'</li>';
}
echo '</ul>';
}
?>
</div>