parent
39a9ae5372
commit
0ad5649b04
|
@ -548,7 +548,7 @@ class DataController extends Zend_Controller_Action
|
|||
$row=$db->fetchRow($sql);
|
||||
if ($row) $this->view->doc=$row['linkage'];
|
||||
//相关用户
|
||||
$sql="select p.individual,p.organisation,r.role from role r left join responsible p on r.resid=p.id where r.uuid=?";
|
||||
$sql="select p.individual,p.organisation,r.role from role r left join responsible p on r.resid=p.id where r.uuid=? order by r.role,p.individual";
|
||||
$this->view->authors=$db->fetchAll($sql,array($uuid));
|
||||
//相关元数据,根据同名关键词实现
|
||||
//$sql="select distinct(md.uuid),md.title from keyword kw left join metadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>? limit 10";
|
||||
|
|
|
@ -83,10 +83,22 @@ else
|
|||
<ul>
|
||||
<?php
|
||||
$party_zh=array('resourceProvider'=>'资源提供者','custodian'=>'维护者','owner'=>'拥有者','user'=>'用户','distributor'=>'分发者','originator'=>'创建者','pointOfContact'=>'联系人','principalInvestigator'=>'调查者','processor'=>'处理者','publisher'=>'发布者','author'=>'元数据作者');
|
||||
foreach($this->authors as $author) :
|
||||
$r='';
|
||||
$i=0;
|
||||
foreach($this->authors as $k=>$author) :
|
||||
if ($author['role']!=$r)
|
||||
{
|
||||
$r=$author['role'];
|
||||
$i=0;
|
||||
if ($k>0) echo '</li>';
|
||||
echo '<li>'.$party_zh[$author['role']].':';
|
||||
}
|
||||
if ($i>0) echo ',';
|
||||
$i+=1;
|
||||
echo '<strong title='.$author['organisation'].'>'.$author['individual'].'</strong>';
|
||||
if ($k+1==count($this->authors)) echo '</li>';
|
||||
endforeach;
|
||||
?>
|
||||
<li title="<?php echo $author['organisation'];?>"><?php echo $party_zh[$author['role']]; ?>:<strong><?php echo $author['individual']; ?></strong></li>
|
||||
<?php endforeach; ?>
|
||||
</ul><h2>其他信息</h2><ul>
|
||||
<li>元数据更新时间:<?php print date('Y-m-d',strtotime($md->ts_created)); ?></li>
|
||||
<li><a href="/data/detail/id/<?php echo $md->id;?>">详细元数据</a></li>
|
||||
|
|
|
@ -183,7 +183,6 @@ class ISO19115
|
|||
@$this->projection=$this->dom->getElementsByTagName('identCode')->item(0)->nodeValue;
|
||||
//数据作者
|
||||
$authors=$this->dom->getElementsByTagName('citRespParty');
|
||||
$cnt=count($authors);
|
||||
foreach($authors as $k=>$author)
|
||||
{
|
||||
$this->author[$k]['individual']=$author->getElementsByTagName('rpIndName')->item(0)->nodeValue;
|
||||
|
@ -198,37 +197,37 @@ class ISO19115
|
|||
$this->author[$k]['country']=$author->getElementsByTagName('country')->item(0)->nodeValue;
|
||||
$this->author[$k]['role']=$author->getElementsByTagName('RoleCd')->item(0)->attributes->getNamedItem('value')->nodeValue;
|
||||
}
|
||||
$cnt=$k+1;
|
||||
$authors=$this->dom->getElementsByTagName('mdContact');
|
||||
$cnt+=count($authors);
|
||||
foreach($authors as $j=>$author)
|
||||
{
|
||||
$this->author[$cnt+$j+1]['individual']=$author->getElementsByTagName('rpIndName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['organisation']=$author->getElementsByTagName('rpOrgName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['position']=$author->getElementsByTagName('rpPosName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['delivery']=$author->getElementsByTagName('delPoint')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['phone']=$author->getElementsByTagName('voiceNum')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['email']=$author->getElementsByTagName('eMailAdd')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['postal']=$author->getElementsByTagName('postCode')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['city']=$author->getElementsByTagName('city')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['administrative']=$author->getElementsByTagName('adminArea')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['country']=$author->getElementsByTagName('country')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j+1]['role']=$author->getElementsByTagName('RoleCd')->item(0)->attributes->getNamedItem('value')->nodeValue;
|
||||
$this->author[$cnt+$j]['individual']=$author->getElementsByTagName('rpIndName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['organisation']=$author->getElementsByTagName('rpOrgName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['position']=$author->getElementsByTagName('rpPosName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['delivery']=$author->getElementsByTagName('delPoint')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['phone']=$author->getElementsByTagName('voiceNum')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['email']=$author->getElementsByTagName('eMailAdd')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['postal']=$author->getElementsByTagName('postCode')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['city']=$author->getElementsByTagName('city')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['administrative']=$author->getElementsByTagName('adminArea')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['country']=$author->getElementsByTagName('country')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$j]['role']=$author->getElementsByTagName('RoleCd')->item(0)->attributes->getNamedItem('value')->nodeValue;
|
||||
}
|
||||
$cnt+=$j+1;
|
||||
$authors=$this->dom->getElementsByTagName('distorCont');
|
||||
$cnt+=count($authors);
|
||||
foreach($authors as $m=>$author)
|
||||
{
|
||||
$this->author[$cnt+$m+2]['individual']=$author->getElementsByTagName('rpIndName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['organisation']=$author->getElementsByTagName('rpOrgName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['position']=$author->getElementsByTagName('rpPosName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['delivery']=$author->getElementsByTagName('delPoint')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['phone']=$author->getElementsByTagName('voiceNum')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['email']=$author->getElementsByTagName('eMailAdd')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['postal']=$author->getElementsByTagName('postCode')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['city']=$author->getElementsByTagName('city')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['administrative']=$author->getElementsByTagName('adminArea')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['country']=$author->getElementsByTagName('country')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m+2]['role']=$author->getElementsByTagName('RoleCd')->item(0)->attributes->getNamedItem('value')->nodeValue;
|
||||
$this->author[$cnt+$m]['individual']=$author->getElementsByTagName('rpIndName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['organisation']=$author->getElementsByTagName('rpOrgName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['position']=$author->getElementsByTagName('rpPosName')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['delivery']=$author->getElementsByTagName('delPoint')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['phone']=$author->getElementsByTagName('voiceNum')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['email']=$author->getElementsByTagName('eMailAdd')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['postal']=$author->getElementsByTagName('postCode')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['city']=$author->getElementsByTagName('city')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['administrative']=$author->getElementsByTagName('adminArea')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['country']=$author->getElementsByTagName('country')->item(0)->nodeValue;
|
||||
$this->author[$cnt+$m]['role']=$author->getElementsByTagName('RoleCd')->item(0)->attributes->getNamedItem('value')->nodeValue;
|
||||
}
|
||||
/*
|
||||
foreach($authors as $author)
|
||||
|
|
Loading…
Reference in New Issue