diff --git a/application/config.ini b/application/config.ini
index 42762c9c..239b5cdc 100755
--- a/application/config.ini
+++ b/application/config.ini
@@ -3,7 +3,7 @@ db.adapter = PDO_PGSQL
db.params.host = localhost
db.params.username = gis
db.params.password = gispassword
-db.params.dbname = wdsmetadata
+db.params.dbname = metadata
geonetwork.url=http://wdscar.westgis.ac.cn/geonetwork/
geonetwork.adapter = PDO_PGSQL
diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php
index 40dd9b20..78487b85 100755
--- a/application/default/controllers/AccountController.php
+++ b/application/default/controllers/AccountController.php
@@ -374,15 +374,6 @@ class AccountController extends Zend_Controller_Action
view::Post($this,"登录成功,正在跳转",$tohref);
return true;
}
-
- if($options['module']=="default" && $options['controller'] == "account" && $options['action'] == "login")
- {
- view::Post($this,"登录成功,正在跳转",'/');
- return true;
- }else{
- view::Post($this,"登录成功,正在跳转",$_SERVER['REQUEST_URI']);
- return true;
- }
}
}else{
$this->setCaptcha($captcha);
diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php
index fb4354a2..f7d14005 100755
--- a/application/default/controllers/DataController.php
+++ b/application/default/controllers/DataController.php
@@ -24,62 +24,32 @@ class DataController extends Zend_Controller_Action
function indexAction()
{
//序列
- $state=$this->db->query('select s.id,s.name,count(*) as count from series s,dataseries d where d.sid=s.id and length(s.name)>2 group by s.id,s.name order by count desc limit 15');
+ $state=$this->db->query('select s.id,s.name,count(*) as count from en.series s,en.dataseries d where d.sid=s.id and length(s.name)>2 group by s.id,s.name order by count desc limit 15');
$this->view->serie=$state->fetchAll();
//分类
- $state=$this->db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
+ $state=$this->db->query('select c.code,name,name_zh,count(*) from en.category c,en.categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
$this->view->category=$state->fetchAll();
//关键词
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='place' group by keyword order by count desc limit 20");
+ $state=$this->db->query("select keyword,count(*) from en.keyword right join en.normalmetadata on keyword.id=normalmetadata.id where keytype='place' group by keyword order by count desc limit 20");
$k1=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='theme' group by keyword order by count desc limit 20");
+ $state=$this->db->query("select keyword,count(*) from en.keyword right join en.normalmetadata on keyword.id=normalmetadata.id where keytype='theme' group by keyword order by count desc limit 20");
//$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
$k2=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='discipline' group by keyword order by count desc limit 20");
+ $state=$this->db->query("select keyword,count(*) from en.keyword right join en.normalmetadata on keyword.id=normalmetadata.id where keytype='discipline' group by keyword order by count desc limit 20");
$k3=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='stratum' group by keyword order by count desc limit 20");
+ $state=$this->db->query("select keyword,count(*) from en.keyword right join en.normalmetadata on keyword.id=normalmetadata.id where keytype='stratum' group by keyword order by count desc limit 20");
$k4=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='temporal' group by keyword order by count desc limit 20");
+ $state=$this->db->query("select keyword,count(*) from en.keyword right join en.normalmetadata on keyword.id=normalmetadata.id where keytype='temporal' group by keyword order by count desc limit 20");
//$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='temporal' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
$k5=$state->fetchAll();
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
//最新10个入库数据
- $state=$this->db->query('select id,uuid,title from normalmetadata order by id desc limit 10');
+ $state=$this->db->query('select id,uuid,title from en.normalmetadata order by id desc limit 10');
$this->view->metadata = $state->fetchAll();
//特色数据
//服务
- $l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
- $this->view->newsletter=$l->getLast();
- $name=basename($this->view->newsletter,'.pdf');
- list(,$this->view->newsletterno)=explode("_",$name);
-
- $this->view->addHelperPath('helper','Zend_View_Helper_');
- $form=new MaillistForm();
- $form->submit->setLabel('输入邮件地址,订阅数据通讯列表');
-
- $this->view->form=$form;
- if ($this->_request->isPost()) {
- //发送邮件
- $formData=$this->_request->getPost();
- if ($form->isValid($formData)) {
- $mail=new WestdcMailer($this->view->config->smtp);
- $mail->setFrom($formData['email']);
- $mail->setBodyText(".");
- $mail->setSubject('subscribe');
- $mail->addTo($this->view->config->reportemail);
- $mail->send();
- $this->messenger->addMessage('订阅成功,请检查您的邮件!');
- $this->_redirect('/data/');
- }
- } else {
- $auth = Zend_Auth::getInstance();
- if ($auth->hasIdentity()) {
- $user=$auth->getIdentity();
- $formData['email']=$user->email;
- $form->populate($formData);
- }
- }
+
$searchform=new SearchForm();
$this->view->searchform=$searchform;
@@ -546,8 +516,8 @@ class DataController extends Zend_Controller_Action
function viewAction()
{
$id = (int)$this->_request->getParam('id');
- $sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.author_en,i.publisher_en, date_part('year',i.ts_published) as publish_year from normalmetadata m left join mdstatus s on m.uuid=s.uuid
- left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where ";
+ $sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.author_en,i.publisher_en, date_part('year',i.ts_published) as publish_year from en.normalmetadata m left join en.mdstatus s on m.uuid=s.uuid
+ left join en.thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where ";
if (empty($id)) {
$uuid = $this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/data');
@@ -617,175 +587,175 @@ class DataController extends Zend_Controller_Action
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=4 order by m.place";
$sql=$this->db->quoteInto($sql,$uuid);
$this->view->themeref=$this->db->fetchAll($sql);
- //用户发表文献
- $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1";
- $sql=$this->db->quoteInto($sql,$uuid);
- $this->view->userref=$this->db->fetchAll($sql);
- //多篇引用形式:hiwater
- $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=3 order by m.place";
- $sql=$this->db->quoteInto($sql,$uuid);
- $this->view->mcitation=$this->db->fetchAll($sql);
- //相关用户
- $sql="select p.email,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,r.id";
- $this->view->authors=$this->db->fetchAll($sql,array($uuid));
- //数据限制信息
- $sql="select u.* from uselimit u left join mdlimit m on u.id=m.lid where m.uuid=?";
- $this->view->uselimits=$this->db->fetchAll($sql,array($uuid));
- //相关下载
- $sql = "select d.uuid,count(distinct(d.userid)) as downtimes,m.title from dataorder d left join metadata m on d.uuid=m.uuid where d.userid in (
- select distinct(userid) from dataorder where uuid=? and status in (0,5)
- ) and d.uuid<>? and length(m.title)>2 group by d.uuid,m.title order by count(distinct(d.userid)) desc limit 10;";
- $this->view->downlists = $this->db->fetchAll($sql,array($uuid,$uuid));
- //相关文献
- $sql="select a.*,array_to_string(array(select author from knl_author t where t.item_id=a.item_id order by place asc),'; ') as author from knl_article a where (";
- foreach($this->view->keys as $k)
- {
- if ($k['keytype']=='theme')
- {
- $sql.=" a.title like '%".$k['keyword']."%' or ";
- }
- }
- $sql.=" 1<>1) order by a.ts_created desc limit 10";
- $this->view->literature=$this->db->fetchAll($sql);
- //相关元数据,根据同名关键词实现
- $sql="select distinct(md.uuid),md.title from keyword kw left join normalmetadata 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";
- $this->view->related=$this->db->fetchAll($sql,array($id,$id));
- //用户下载记录
- $sql = "select o.ts_created,m.uuid,u.realname,u.unit,oa.project as onlineproject, fa.project as offlineproject
- from dataorder as o left join metadata as m on o.uuid = m.uuid left join users as u on o.userid=u.id
- left join onlineapp oa on o.onlineappid=oa.id left join offlineapp fa on o.offlineappid=fa.id
- where m.uuid = '$uuid' and (o.status=0 or o.status=5) and u.realname IS NOT NULL order by o.ts_created desc limit 10";
- $this->view->downhistory=$this->db->fetchAll($sql);
- //数据附件
- $sql = $this->db->quoteInto("select m.id,a.realname from mdattach m left join attachments a on m.id=a.id where m.uuid=?",$uuid);
- $this->view->attachments = $this->db->fetchAll($sql);
- //数据版本
- $sql = "SELECT count(id) as c FROM mdversion WHERE uuid=? AND changelog IS NOT NULL";
- $sth = $this->db->prepare($sql);
- $sth->execute(array($uuid));
- $row = $sth->fetch();
- $this->view->version = $row;
- $archives = new Archive($this->db);
- $data_archives = $archives->getArchiveByUUID($uuid);
- if(!empty($data_archives))
- {
- foreach($data_archives as $k=>$v)
- {
- $data_archives[$k]['url'] = $archives->getArchiveUrlByCid($v['id']);
- }
- }
- $this->view->data_archives = $data_archives;
- //支持项目
- include_once("data/Fund.php");
- $fund = new Fund($this->db);
- $this->view->fund = $fund->fetch($uuid);
-
- //判断特殊数据服务
- $this->view->dataService= $this->checkDataService($uuid);
-
- //自动跳转
- $sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
- $row=$this->db->fetchRow($this->db->quoteInto($sql,$uuid));
- $jump=$this->_request->getParam('jump');
- if ($jump=="") $jump=1;//默认跳转
- if (@$row->has_pages && ($jump==1))
- {
- $this->_helper->viewRenderer($row->code.'/view',null,true);
- }
- } //viewAction
-
- //检查特殊数据服务是否存在
- private function checkDataService($uuid)
- {
- $order = new \Order\mount\OrderOperate();
- $service = $order->getDataService($uuid);
-
- if(empty($service))
- {
- return NULL;
- }else{
- if($order->checkOrderHas($uuid))
- {
- return NULL;
- }else{
- return $service;
- }
- }
- }//checkDataService
-
- //特殊数据服务
- public function dataserviceAction()
- {
-
- $uuid = $this->_getParam('uuid');
-
- if(empty($uuid))
- {
- $this->jsonexit(array("error"=>"参数错误"));
- }
-
- $dataservice = new \data\DataService();
- $info = $dataservice->get($uuid);
-
-
- //暂时只有wsn
- {
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender();
-
- $data = array(
- "type"=>"wsn", //服务类型
- "info"=>$info, //信息 dataservice 表中的字段
- "callback"=>"westdc.dataservice.wsn.request()", //成功后的js回调函数
- );
-
- $data['data'] = $dataservice->getWsnData("site",$uuid);
-
- if(empty($data['data']))
- {
- $this->jsonexit(array("error"=>'数据接口错误,请联系管理员'));
- return true;
- }
-
- if(!is_array($data['data']))
- {
- $this->jsonexit(array("error"=>$data['data']));
- return true;
- }
-
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender();
-
- $this->jsonexit($data);
- }
- // WSN end
-
- }
-
- public function wsnAction()
- {
- $this->_helper->layout->disableLayout();
- $this->_helper->viewRenderer->setNoRender();
-
- $type = $this->_getParam('type');
- $uuid = $this->_getParam("uuid");
-
- $dataservice = new DataService();
-
- if($type == 'var')
- {
- $sites = array(
- "chk"=>$this->_getParam("siteid")
- );
-
- $info = $dataservice->get($uuid);
-
- $data = array(
- "type"=>"wsn", //服务类型
- "info"=>$info, //信息 dataservice 表中的字段
- "callback"=>"westdc.dataservice.wsn.Submit()", //成功后的js回调函数
- );
-
+ //用户发表文献
+ $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1";
+ $sql=$this->db->quoteInto($sql,$uuid);
+ $this->view->userref=$this->db->fetchAll($sql);
+ //多篇引用形式:hiwater
+ $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=3 order by m.place";
+ $sql=$this->db->quoteInto($sql,$uuid);
+ $this->view->mcitation=$this->db->fetchAll($sql);
+ //相关用户
+ $sql="select p.email,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,r.id";
+ $this->view->authors=$this->db->fetchAll($sql,array($uuid));
+ //数据限制信息
+ $sql="select u.* from uselimit u left join mdlimit m on u.id=m.lid where m.uuid=?";
+ $this->view->uselimits=$this->db->fetchAll($sql,array($uuid));
+ //相关下载
+ $sql = "select d.uuid,count(distinct(d.userid)) as downtimes,m.title from dataorder d left join metadata m on d.uuid=m.uuid where d.userid in (
+ select distinct(userid) from dataorder where uuid=? and status in (0,5)
+ ) and d.uuid<>? and length(m.title)>2 group by d.uuid,m.title order by count(distinct(d.userid)) desc limit 10;";
+ $this->view->downlists = $this->db->fetchAll($sql,array($uuid,$uuid));
+ //相关文献
+ $sql="select a.*,array_to_string(array(select author from knl_author t where t.item_id=a.item_id order by place asc),'; ') as author from knl_article a where (";
+ foreach($this->view->keys as $k)
+ {
+ if ($k['keytype']=='theme')
+ {
+ $sql.=" a.title like '%".$k['keyword']."%' or ";
+ }
+ }
+ $sql.=" 1<>1) order by a.ts_created desc limit 10";
+ $this->view->literature=$this->db->fetchAll($sql);
+ //相关元数据,根据同名关键词实现
+ $sql="select distinct(md.uuid),md.title from keyword kw left join heihemetadata 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";
+ $this->view->related=$this->db->fetchAll($sql,array($id,$id));
+ //用户下载记录
+ $sql = "select o.ts_created,m.uuid,u.realname,u.unit,oa.project as onlineproject, fa.project as offlineproject
+ from dataorder as o left join metadata as m on o.uuid = m.uuid left join users as u on o.userid=u.id
+ left join onlineapp oa on o.onlineappid=oa.id left join offlineapp fa on o.offlineappid=fa.id
+ where m.uuid = '$uuid' and (o.status=0 or o.status=5) and u.realname IS NOT NULL order by o.ts_created desc limit 10";
+ $this->view->downhistory=$this->db->fetchAll($sql);
+ //数据附件
+ $sql = $this->db->quoteInto("select m.id,a.realname from mdattach m left join attachments a on m.id=a.id where m.uuid=?",$uuid);
+ $this->view->attachments = $this->db->fetchAll($sql);
+ //数据版本
+ $sql = "SELECT count(id) as c FROM mdversion WHERE uuid=? AND changelog IS NOT NULL";
+ $sth = $this->db->prepare($sql);
+ $sth->execute(array($uuid));
+ $row = $sth->fetch();
+ $this->view->version = $row;
+ $archives = new Archive($this->db);
+ $data_archives = $archives->getArchiveByUUID($uuid);
+ if(!empty($data_archives))
+ {
+ foreach($data_archives as $k=>$v)
+ {
+ $data_archives[$k]['url'] = $archives->getArchiveUrlByCid($v['id']);
+ }
+ }
+ $this->view->data_archives = $data_archives;
+ //支持项目
+ include_once("data/Fund.php");
+ $fund = new Fund($this->db);
+ $this->view->fund = $fund->fetch($uuid);
+
+ //判断特殊数据服务
+ $this->view->dataService= $this->checkDataService($uuid);
+
+ //自动跳转
+ $sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
+ $row=$this->db->fetchRow($this->db->quoteInto($sql,$uuid));
+ $jump=$this->_request->getParam('jump');
+ if ($jump=="") $jump=1;//默认跳转
+ if (@$row->has_pages && ($jump==1))
+ {
+ $this->_helper->viewRenderer($row->code.'/view',null,true);
+ }
+ } //viewAction
+
+ //检查特殊数据服务是否存在
+ private function checkDataService($uuid)
+ {
+ $order = new \Order\Mount\OrderOperate();
+ $service = $order->getDataService($uuid);
+
+ if(empty($service))
+ {
+ return NULL;
+ }else{
+ if($order->checkOrderHas($uuid))
+ {
+ return NULL;
+ }else{
+ return $service;
+ }
+ }
+ }//checkDataService
+
+ //特殊数据服务
+ public function dataserviceAction()
+ {
+
+ $uuid = $this->_getParam('uuid');
+
+ if(empty($uuid))
+ {
+ $this->jsonexit(array("error"=>"参数错误"));
+ }
+
+ $dataservice = new \data\DataService();
+ $info = $dataservice->get($uuid);
+
+
+ //暂时只有wsn
+ {
+ $this->_helper->layout->disableLayout();
+ $this->_helper->viewRenderer->setNoRender();
+
+ $data = array(
+ "type"=>"wsn", //服务类型
+ "info"=>$info, //信息 dataservice 表中的字段
+ "callback"=>"westdc.dataservice.wsn.request()", //成功后的js回调函数
+ );
+
+ $data['data'] = $dataservice->getWsnData("site",$uuid);
+
+ if(empty($data['data']))
+ {
+ $this->jsonexit(array("error"=>'数据接口错误,请联系管理员'));
+ return true;
+ }
+
+ if(!is_array($data['data']))
+ {
+ $this->jsonexit(array("error"=>$data['data']));
+ return true;
+ }
+
+ $this->_helper->layout->disableLayout();
+ $this->_helper->viewRenderer->setNoRender();
+
+ $this->jsonexit($data);
+ }
+ // WSN end
+
+ }
+
+ public function wsnAction()
+ {
+ $this->_helper->layout->disableLayout();
+ $this->_helper->viewRenderer->setNoRender();
+
+ $type = $this->_getParam('type');
+ $uuid = $this->_getParam("uuid");
+
+ $dataservice = new DataService();
+
+ if($type == 'var')
+ {
+ $sites = array(
+ "chk"=>$this->_getParam("siteid")
+ );
+
+ $info = $dataservice->get($uuid);
+
+ $data = array(
+ "type"=>"wsn", //服务类型
+ "info"=>$info, //信息 dataservice 表中的字段
+ "callback"=>"westdc.dataservice.wsn.Submit()", //成功后的js回调函数
+ );
+
$data['data'] = $dataservice->getWsnData("var",$uuid,$sites);
diff --git a/application/default/controllers/IndexController.php b/application/default/controllers/IndexController.php
index de4dec15..dc3ddb1a 100755
--- a/application/default/controllers/IndexController.php
+++ b/application/default/controllers/IndexController.php
@@ -10,13 +10,8 @@ class IndexController extends Zend_Controller_Action
$this->view->main_nav_pageID = "index";
}
- function indexAction()
- {
- //数据通讯
- $l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
- $this->view->newsletter=$l->getLast();
- $name=basename($this->view->newsletter,'.pdf');
- list(,$this->view->newsletterno)=explode("_",$name);
+ function indexAction()
+ {
//统计数据
$sql='select (select count(*) from users) as usernum,(select count(*) from normalmetadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
$row=$this->db->fetchRow($sql);
@@ -35,17 +30,11 @@ class IndexController extends Zend_Controller_Action
else
$this->view->onlinesize=$row['sum'];
}
- //特色推荐
- $sql="select * from datafeature order by id desc";
- $this->view->feature=$this->db->fetchRow($sql);
- //特色数据集
- $sql="select * from datasetcd order by random()";
- $this->view->datasetcd=$this->db->fetchRow($sql);
//下载最多数据(top 5)
- $sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
+ $sql="select uuid,title,id from en.normalmetadata where id in (select m.id from en.normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
$this->view->mdtop=$this->db->fetchAll($sql);
- $sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
+ $sql="select uuid,title,id from en.normalmetadata where id in (select m.id from en.normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
$this->view->offlinemdtop=$this->db->fetchAll($sql);
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where length(t.data)>2 order by random()";
$this->view->mdrandom=$this->db->fetchRow($sql);
@@ -58,7 +47,7 @@ class IndexController extends Zend_Controller_Action
$News = new Archive($this->db);
$time = date("Y-m-d H:i:s",time());
- $sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<'$time' AND image!='' and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
+ $sql = "SELECT * FROM en.archive WHERE is_pub=true AND ts_published<'$time' AND image!='' and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
@@ -71,7 +60,7 @@ class IndexController extends Zend_Controller_Action
$this->view->news = $rows;
//$time = date("Y-m-d H:i:s",time());
- $sql = "SELECT * FROM archive WHERE is_pub=true AND ts_publisheddb->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
@@ -85,7 +74,7 @@ class IndexController extends Zend_Controller_Action
$this->view->list_news = $rows;
- $sql="select d.*,m.ts_published as publish_year from datadoi d right join metadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4";
+ $sql="select d.*,m.ts_published as publish_year from datadoi d right join en.metadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4";
$sth = $this->db->query($sql);
$this->view->dois = $sth->fetchAll();
diff --git a/application/default/views/scripts/account/login.phtml b/application/default/views/scripts/account/login.phtml
index e53bd83d..963e4e81 100755
--- a/application/default/views/scripts/account/login.phtml
+++ b/application/default/views/scripts/account/login.phtml
@@ -1,9 +1,9 @@
headTitle($this->config->title->site);
- $this->headTitle('用户登录');
+ $this->headTitle('login');
$this->headTitle()->setSeparator(' - ');
- $this->breadcrumb('首页');
- $this->breadcrumb('用户登录');
+ $this->breadcrumb('Home');
+ $this->breadcrumb('Login');
$this->breadcrumb()->setSeparator(' > ');
?>
= $this->render('breadcrumbs.phtml'); ?>
metadata;if ($md):?>
-