diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php index 32f3a034..96e92cb2 100755 --- a/application/default/controllers/AccountController.php +++ b/application/default/controllers/AccountController.php @@ -356,6 +356,14 @@ class AccountController extends Zend_Controller_Action if(!empty($submit)) { + $captchaword = trim($this->_request->getParam('captcha')); + if($captcha->isValid($captchaword) !== true) + { + $this->view->error = view::Error("验证码错误"); + $this->view->captcha = $captcha->setCaptcha(); + return true; + } + $data = array( 'username' => $this->_getParam('username'), 'password' => $this->_getParam('password') diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index eede4257..4467822a 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 = $this->view->config->sub->metadata; //$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/default/views/scripts/archives/index.phtml b/application/default/views/scripts/archives/index.phtml index 75ef2954..308ae5cd 100644 --- a/application/default/views/scripts/archives/index.phtml +++ b/application/default/views/scripts/archives/index.phtml @@ -31,19 +31,17 @@ $this->theme->AppendPlus($this,'masonry');
    -

    新闻列表

    -
      lists as $v) {?> 0) {?> - +

      +
      1. []
      2. - - -
      +
    +
    -

    数据最近更新

    +

    数据最近更新

    -

    最多浏览数据集

    +

    最多浏览数据集

    diff --git a/application/default/views/scripts/data/map.phtml b/application/default/views/scripts/data/map.phtml index 8460daf8..95d930ae 100755 --- a/application/default/views/scripts/data/map.phtml +++ b/application/default/views/scripts/data/map.phtml @@ -3,23 +3,19 @@ $this->headTitle($this->config->title->site); $this->headTitle($this->config->title->data); $this->headTitle("空间浏览"); $this->headTitle()->setSeparator(' - '); -$this->theme->AppendPlus($this,'jquery_ui'); -//$this->theme->AppendPlus($this,'google_map_v3'); -$this->theme->AppendPlus($this,'colorbox'); -$this->headLink()->appendStylesheet('/js/theme/default/style.css'); +$this->theme->AppendPlus($this,'tianditu'); $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航'); ?>
    - render('breadcrumbs.phtml'); ?> partial('data/tools.phtml'); ?>

    将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据

    @@ -43,103 +39,59 @@ $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
    pageID)) {?> diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 3944e3e0..918d3c86 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -54,7 +54,7 @@
    - \ No newline at end of file + + \ No newline at end of file diff --git a/application/default/views/scripts/search/advance.phtml b/application/default/views/scripts/search/advance.phtml index af5cde54..4157a038 100644 --- a/application/default/views/scripts/search/advance.phtml +++ b/application/default/views/scripts/search/advance.phtml @@ -2,185 +2,115 @@ $this->headTitle($this->config->title->site); $this->headTitle($this->config->title->data); $this->headTitle('高级搜索'); -if (!empty($this->codename)) $this->headTitle($this->codename); $this->headTitle()->setSeparator(' - '); -$this->headLink()->appendStylesheet('/css/metadata.css'); $this->breadcrumb('首页'); $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb('高级搜索'); $this->breadcrumb()->setSeparator(' > '); -$this->theme->AppendPlus($this,'google_map_v3'); -$this->theme->AppendPlus($this,'google_map_keydragzone'); +$this->theme->AppendPlus($this,'tianditu'); $this->theme->AppendPlus($this,'jquery_ui'); -$this->theme->AppendPlus($this,'colorbox'); ?>
    partial('data/tools.phtml'); ?>
    -metadata)) : - echo $this->page->getNavigation();?> -
    - -metadata as $md) : ?> -
    -
    -

    escape($md['title']);?> -

    - 400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?> -
    - -page->getNavigation();?> - -
    -
    -
    - -
    +
    +
    + +
    -
    -
    搜索说明
    • 关键词:您可以使用一个关键词,比如“沙漠”,也可以使用多个关键词,中间用空格分开。
    • -
    • 空间范围:这是以度为单位的十进制数字。比如,东经125度30分,可以输入为125.5。您也可以通过下面的在线地图工具直接在图上拉框选择一个范围,空间坐标会自动转换到文本框中。
    • -
    • 时间范围:指数据的时间范围,从开始时间到结束时间。开始时间与结束时间可以为空,若仅填写开始时间,则含义为选择大于开始时间的数据。若仅填写结束时间,则含义为选择小于结束时间的数据。时间格式为YYYY-MM-DD。
    • -
    • 还不清楚?您可以到论坛提问。
    • -
    -
    - - - - \ No newline at end of file + \ No newline at end of file diff --git a/application/layouts/layout.phtml b/application/layouts/layout.phtml index 271e7700..ec2b2833 100755 --- a/application/layouts/layout.phtml +++ b/application/layouts/layout.phtml @@ -29,12 +29,11 @@ headStyle() ?> - + render('header.phtml') ?> - layout()->content ?> render('footer.phtml') ?> 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/application/models/data/Metadata.php b/application/models/data/Metadata.php index 41dddaa7..8345e414 100644 --- a/application/models/data/Metadata.php +++ b/application/models/data/Metadata.php @@ -4,11 +4,13 @@ class Metadata private $db; //传入PDO对象. //使用到的公共变量 - public $tbl_metadata = "metadata"; + public $tbl_metadata; function __construct($db) { $this->db = $db; + $config = \Zend_Registry::get('config'); + $this->tbl_metadata=$config->sub->metadata; } function view($uuid) 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