diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php
index eede4257..e85882c8 100644
--- a/application/default/controllers/ServiceController.php
+++ b/application/default/controllers/ServiceController.php
@@ -18,6 +18,7 @@ class ServiceController extends Zend_Controller_Action
{
$this->db=Zend_Registry::get('db');
$this->view->config = $this->config = Zend_Registry::get('config');
+ $this->submd = 'normalmetadata';
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
//$this->view->messages = $this->messenger->getMessages();
}
@@ -189,16 +190,16 @@ class ServiceController extends Zend_Controller_Action
function feedAction()
{
$feedArray = array(
- 'title' => '中国西部环境与生态科学数据中心',
- 'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/feed',
- 'description' => '共享西部计划产生的数据',
+ 'title' => '三江源生态监测综合服务平台',
+ 'link' => 'http://'.$_SERVER['SERVER_NAME'].'/service/feed',
+ 'description' => '管理、共享三江源生态监测数据',
'language' => 'zh-CN',
'charset' => 'utf-8',
'published' => time(),
//'generator' => 'Zend Framework Zend_Feed',
'entries' => array()
);
- $sql="select * from normalmetadata order by ts_created desc";
+ $sql="select * from $this->submd order by ts_created desc";
$rs=$this->db->fetchAll($sql);
$feedArray['published']=strtotime($rs[0]['ts_created']);
foreach($rs as $r)
@@ -334,7 +335,7 @@ class ServiceController extends Zend_Controller_Action
{
$fund.='
'.$refer['fund_type'].':'.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")";
}
- if (empty($fund)) $fund=$row['suppinfo'];
+ if (empty($fund) && !empty($row['suppinfo'])) $fund=$row['suppinfo'];
}
@@ -356,7 +357,7 @@ class ServiceController extends Zend_Controller_Action
$xslt->setParameter('','projection',$projection);
$xslt->setParameter('','reference',$reference);
$xslt->setParameter('','citation',$citation);
- $xslt->setParameter('','fund',$fund);
+ if ($fund) $xslt->setParameter('','fund',$fund);
$XSL = new DOMDocument();
$XSL->load( '../data/doc.xsl', LIBXML_NOCDATA);
$xslt->importStylesheet($XSL);
@@ -540,7 +541,7 @@ class ServiceController extends Zend_Controller_Action
$pdf->metadata=$row;
$pdf->Draw();
$pdf->setTitle($row['title'],true);
- $pdf->setAuthor('寒区旱区科学数据中心',true);
+ $pdf->setAuthor('三江源生态监测综合服务平台',true);
$this->getResponse()->setHeader('Content-Type', 'application/pdf');
//->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"');
$pdf->Output($row['title'].'.pdf','I');
@@ -729,8 +730,8 @@ class ServiceController extends Zend_Controller_Action
}
}
@$odf->setVars('citation',$cit,true,'utf-8');
- @$odf->setVars('reference',$row['reference'],true,'utf-8');
- @$odf->setVars('doi',$row['doi'],true,'utf-8');
+ //@$odf->setVars('reference',$row['reference'],true,'utf-8');
+ //@$odf->setVars('doi',$row['doi'],true,'utf-8');
@$odf->setVars('north',$row['north'],true,'utf-8');
@$odf->setVars('south',$row['south'],true,'utf-8');
@@ -738,18 +739,18 @@ class ServiceController extends Zend_Controller_Action
@$odf->setVars('east',$row['east'],true,'utf-8');
if (!$ac=='simple')
{
- @$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('bigthumb', 'http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$row['uuid']);
+ @$odf->setImage('thumb', 'http://'.$_SERVER['SERVER_NAME'].'/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('suppinfo',$row['suppinfo'],true,'utf-8');
@$odf->setVars('contacts',$row['contacts'],true,'utf-8');
} else {
- @$odf->setImage('qrcode', 'http://westdc.westgis.ac.cn/service/qrcode/uuid/'.$row['uuid']);
+ @$odf->setImage('qrcode', 'http://'.$_SERVER['SERVER_NAME'].'/service/qrcode/uuid/'.$row['uuid']);
}
$odf->exportAsAttachedFile($row['title'].'.odt');
@@ -1793,7 +1794,7 @@ class ServiceController extends Zend_Controller_Action
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$uuid = $this->getRequest()->getParam('uuid');
- $code_params = array('text' => 'http://westdc.westgis.ac.cn/data/'.$uuid,
+ $code_params = array('text' => 'http://'.$_SERVER['SERVER_NAME'].'/data/'.$uuid,
'backgroundColor' => '#FFFFFF',
'foreColor' => '#000000',
'padding' => 4, //array(10,5,10,5),
diff --git a/application/models/MetadataPDF.php b/application/models/MetadataPDF.php
index 32670194..55b971de 100644
--- a/application/models/MetadataPDF.php
+++ b/application/models/MetadataPDF.php
@@ -25,10 +25,10 @@ class MetadataPDF extends PDF_Unicode
function DrawTitlePage()
{
$this->AddPage();
- $this->Image('http://westdc.westgis.ac.cn/images/westdc_logo_white.gif',80,30,0,0,'','http://westdc.westgis.ac.cn/');
+ $this->Image('http://www.sanjiangyuan.org.cn/images/logo.png',80,30,0,0,'','http://www.sanjiangyuan.org.cn/');
$this->SetFont('uGB','B',20);
$this->setXY(0,70);
- $this->Cell(0,0,'寒区旱区科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/');
+ $this->Cell(0,0,'三江源生态监测综合服务平台',0,2,'C',false,'http://'.$_SERVER['SERVER_NAME']);
$imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid'];
$imgsize=getimagesize($imgurl);
if ($this->metadata['filetype'] && $imgsize)
@@ -44,7 +44,7 @@ class MetadataPDF extends PDF_Unicode
//$this->setFont('Arial','',12);
$this->ln(10);
$this->SetFont('uGB','B',12);
- $this->Cell(0,0,'UUID: '.$this->metadata['uuid'],0,2,'C',false,'http://westdc.westgis.ac.cn/data/'.$this->metadata['uuid']);
+ $this->Cell(0,0,'UUID: '.$this->metadata['uuid'],0,2,'C',false,'http://'.$_SERVER['SERVER_NAME'].'/data/'.$this->metadata['uuid']);
}
function DrawContent()
diff --git a/data/doc.xsl b/data/doc.xsl
index 53882637..02fa4eb4 100644
--- a/data/doc.xsl
+++ b/data/doc.xsl
@@ -11,11 +11,11 @@
- http://westdc.westgis.ac.cn/images/westdc-logo-1.png
+ http://www.sanjiangyuan.org.cn/images/logo.png
@@ -159,7 +159,7 @@
-
+
diff --git a/data/metadata-template-simple.odt b/data/metadata-template-simple.odt
index f5dab071..5db0a17d 100644
Binary files a/data/metadata-template-simple.odt and b/data/metadata-template-simple.odt differ
diff --git a/data/metadata-template.odt b/data/metadata-template.odt
index f6121259..341a142f 100644
Binary files a/data/metadata-template.odt and b/data/metadata-template.odt differ