diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 1b9aa5f4..ad4a7289 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -464,7 +464,7 @@ class ServiceController extends Zend_Controller_Action //error_reporting(1); if (!empty($uuid)) { - $sql="select g.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,date(m.timebegin) as timebegin,date(m.timeend) as timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype + $sql="select g.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.ts_created,m.south,m.east,m.west,m.north,date(m.timebegin) as timebegin,date(m.timeend) as timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype from metadata m left join thumbnail t on m.id=t.id left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid); $row=$this->db->fetchRow($sql); @@ -502,8 +502,10 @@ class ServiceController extends Zend_Controller_Action { $resource.=($k+1).". ".$r['name'].' '.$r['linkage']."\n"; } - $row['resources']=$resource; - $sql="select r.role,s.* from role r left join responsible s on r.resid=s.id left join metadata m on m.uuid=r.uuid where m.uuid=? order by r.role,r.id"; + $row['resources']=$resource; + $sql="select r.role,s.* from role r left join responsible s on r.resid=s.id left join metadata m on m.uuid=r.uuid where m.uuid=? order by r.role,r.id"; + if ($ac=='simple') + $sql="select r.role,s.* from role r left join responsible s on r.resid=s.id left join metadata m on m.uuid=r.uuid where r.role in ('resourceProvider','owner','pointOfContact') and m.uuid=? order by r.role,r.id"; $sql=$this->db->quoteInto($sql,$uuid); $contact=$this->db->fetchAll($sql); $contacts=""; @@ -580,17 +582,17 @@ class ServiceController extends Zend_Controller_Action $odf->setVars('title',$row['title'],true,'utf-8'); @$odf->setVars('title_en',$row['title_en'],true,'utf-8'); @$odf->setVars('uuid',$row['uuid'],true,'utf-8'); - $odf->setVars('datetime',date('Y-m-d')); + $odf->setVars('datetime',date('Y-m-d',strtotime($row['ts_created']))); $odf->setVars('abstract',$row['description'],true,'utf-8'); @$odf->setVars('theme_keyword',$row['keyword']['theme'],true,'utf-8'); @$odf->setVars('place_keyword',$row['keyword']['place'],true,'utf-8'); @$odf->setVars('temporal_keyword',empty($row['keyword']['temporal'])?'':$row['keyword']['temporal'],true,'utf-8'); @$odf->setVars('discipline_keyword',$row['keyword']['discipline'],true,'utf-8'); - @$odf->setVars('stratum_keyword',$row['keyword']['stratum'],true,'utf-8'); + @$odf->setVars('category',$row['category'].' '.$row['category_zh'],true,'utf-8'); - @$odf->setVars('rfdenom',$row['rfdenom'],true,'utf-8'); - @$odf->setVars('resolution',$row['resolution'],true,'utf-8'); - @$odf->setVars('projection',$row['projection'],true,'utf-8'); + + + @$odf->setVars('filesize',$row['filesize'],true,'utf-8'); @$odf->setVars('fileformat',$row['fileformat'],true,'utf-8'); @$odf->setVars('timebegin',$row['timebegin'],true,'utf-8'); @@ -598,10 +600,7 @@ class ServiceController extends Zend_Controller_Action @$odf->setVars('citation',$row['citation'],true,'utf-8'); @$odf->setVars('reference',$row['reference'],true,'utf-8'); @$odf->setVars('doi',$row['doi'],true,'utf-8'); - @$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8'); - @$odf->setVars('uselimits',$row['uselimits'],true,'utf-8'); - @$odf->setVars('resources',$row['resources'],true,'utf-8'); - @$odf->setVars('contacts',$row['contacts'],true,'utf-8'); + @$odf->setVars('north',$row['north'],true,'utf-8'); @$odf->setVars('south',$row['south'],true,'utf-8'); @$odf->setVars('west',$row['west'],true,'utf-8'); @@ -610,6 +609,14 @@ class ServiceController extends Zend_Controller_Action { @$odf->setImage('bigthumb', 'http://westdc.westgis.ac.cn/service/bigthumb/uuid/'.$row['uuid']); @$odf->setImage('thumb', 'http://westdc.westgis.ac.cn/service/thumb/uuid/'.$row['uuid']); + @$odf->setVars('projection',$row['projection'],true,'utf-8'); + @$odf->setVars('resolution',$row['resolution'],true,'utf-8'); + @$odf->setVars('rfdenom',$row['rfdenom'],true,'utf-8'); + @$odf->setVars('stratum_keyword',$row['keyword']['stratum'],true,'utf-8'); + @$odf->setVars('uselimits',$row['uselimits'],true,'utf-8'); + @$odf->setVars('resources',$row['resources'],true,'utf-8'); + @$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8'); + @$odf->setVars('contacts',$row['contacts'],true,'utf-8'); }