heihe view中增加了给我推荐的元数据列表
This commit is contained in:
parent
907230b3fc
commit
897b6de6a9
|
@ -589,6 +589,11 @@ class DataController extends Zend_Controller_Action
|
||||||
//数据限制信息
|
//数据限制信息
|
||||||
$sql="select u.* from uselimit u left join mdlimit m on u.id=m.lid where m.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));
|
$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 (";
|
$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)
|
foreach($this->view->keys as $k)
|
||||||
|
|
|
@ -266,6 +266,11 @@ endforeach;
|
||||||
</div>
|
</div>
|
||||||
<div id="recommend">
|
<div id="recommend">
|
||||||
<p>申请了本条数据的用户,通常他们还申请了:</p>
|
<p>申请了本条数据的用户,通常他们还申请了:</p>
|
||||||
|
<?php
|
||||||
|
foreach($this->downlists as $v){
|
||||||
|
echo "<li><a href=\"/data/".$v->uuid."\">".$v->title.'</a> (下载人数:'.$v->downtimes.')</li>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div id="comments">
|
<div id="comments">
|
||||||
<hr />
|
<hr />
|
||||||
|
|
Loading…
Reference in New Issue