在review中加入附件下载判断,修改目标窗口位置
This commit is contained in:
parent
9e0973104a
commit
5c80a790a3
|
@ -910,11 +910,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$this->_redirect($redirect);
|
||||
}
|
||||
|
||||
$sql = "select r.id,r.uuid,r.mdcomment,r.datacomment,r.editorcomment,u.realname,md.title,att.filename,r.ts_created,r.conclusion,ratt.attachid as attid from mdreview r
|
||||
$sql = "select r.*,md.title,u.realname,u.id as uid from mdreview r
|
||||
left join metadata md on md.uuid=r.uuid
|
||||
left join users u on u.id=r.userid
|
||||
left join mdreviewattach ratt on ratt.reviewid=r.id
|
||||
left join attachments att on att.id=ratt.attachid
|
||||
where r.id='$id'
|
||||
";
|
||||
|
||||
|
@ -922,9 +920,19 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
|
||||
$row = $rs->fetch();
|
||||
|
||||
if(!empty($row['attid']))
|
||||
$sql = "select att.realname,att.id from attachments att
|
||||
left join mdreviewattach ratt on att.id=ratt.attachid
|
||||
where ratt.reviewid=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
|
||||
$row['attid'] = "";
|
||||
if(!empty($rows))
|
||||
{
|
||||
$row['attid'] = '<a href="/admin/data/attachments/down/'.$row['attid'].'">下载</a>';
|
||||
foreach($rows as $v)
|
||||
{
|
||||
$row['attid'] .= '<li>'.$v['realname'].'<a href="/admin/data/attachments/down/'.$v['id'].'">下载</a></li>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue