change simple odt

This commit is contained in:
wlx 2013-06-11 10:34:59 +00:00
parent ac5b0eeb89
commit eb001f9ecd
1 changed files with 19 additions and 12 deletions

View File

@ -464,7 +464,7 @@ class ServiceController extends Zend_Controller_Action
//error_reporting(1); //error_reporting(1);
if (!empty($uuid)) 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 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); left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
$row=$this->db->fetchRow($sql); $row=$this->db->fetchRow($sql);
@ -504,6 +504,8 @@ class ServiceController extends Zend_Controller_Action
} }
$row['resources']=$resource; $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"; $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); $sql=$this->db->quoteInto($sql,$uuid);
$contact=$this->db->fetchAll($sql); $contact=$this->db->fetchAll($sql);
$contacts=""; $contacts="";
@ -580,17 +582,17 @@ class ServiceController extends Zend_Controller_Action
$odf->setVars('title',$row['title'],true,'utf-8'); $odf->setVars('title',$row['title'],true,'utf-8');
@$odf->setVars('title_en',$row['title_en'],true,'utf-8'); @$odf->setVars('title_en',$row['title_en'],true,'utf-8');
@$odf->setVars('uuid',$row['uuid'],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('abstract',$row['description'],true,'utf-8');
@$odf->setVars('theme_keyword',$row['keyword']['theme'],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('place_keyword',$row['keyword']['place'],true,'utf-8');
@$odf->setVars('temporal_keyword',empty($row['keyword']['temporal'])?'':$row['keyword']['temporal'],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('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('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('filesize',$row['filesize'],true,'utf-8');
@$odf->setVars('fileformat',$row['fileformat'],true,'utf-8'); @$odf->setVars('fileformat',$row['fileformat'],true,'utf-8');
@$odf->setVars('timebegin',$row['timebegin'],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('citation',$row['citation'],true,'utf-8');
@$odf->setVars('reference',$row['reference'],true,'utf-8'); @$odf->setVars('reference',$row['reference'],true,'utf-8');
@$odf->setVars('doi',$row['doi'],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('north',$row['north'],true,'utf-8');
@$odf->setVars('south',$row['south'],true,'utf-8'); @$odf->setVars('south',$row['south'],true,'utf-8');
@$odf->setVars('west',$row['west'],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('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->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');
} }