From aaba16dee64299bc6d018ed2b01f9227ff243cb0 Mon Sep 17 00:00:00 2001 From: wlx Date: Sat, 19 May 2012 14:15:10 +0000 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=8F=B0=E5=85=83=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=95=B0=E6=8D=AE=E7=94=A8=E6=88=B7=E6=96=87?= =?UTF-8?q?=E7=8C=AE=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 8 ++++++-- application/default/views/scripts/data/view.phtml | 13 +++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 687c23bc..a80a2835 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -580,9 +580,13 @@ class DataController extends Zend_Controller_Action $sql=$this->db->quoteInto($sql,$uuid); $this->view->resources=$this->db->fetchAll($sql); //建议参考文献 - $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?"; + $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=0"; $sql=$this->db->quoteInto($sql,$uuid); - $this->view->ref=$this->db->fetchAll($sql); + $this->view->ref=$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); //相关用户 $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)); diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index dcf15c75..d13fc66e 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -180,7 +180,20 @@ endforeach; endforeach; ?> + +userref) : ?> +

数据用户发表文献

+
    + userref as $ref) : + if (empty($ref->link)) + echo '
  1. '.$ref->reference.'
  2. '; + else + echo '
  3. '.$ref->reference.' 下载
  4. '; + endforeach; + ?> +
+

数据使用声明

uselimits) :