增加了分析和输出下载附件链接的功能
This commit is contained in:
parent
be60b440c9
commit
1c1c6dea61
|
@ -617,6 +617,18 @@ class DataController extends Zend_Controller_Action
|
|||
}
|
||||
$sql.=" 1<>1 limit 10";
|
||||
$this->view->literature=$this->db->fetchAll($sql);
|
||||
//数据附件
|
||||
$sql = "select id from mdattach where uuid='$uuid'";
|
||||
$re = $this->db->query($sql);
|
||||
$row = $re->fetch();
|
||||
if(empty($row['id']))
|
||||
{
|
||||
$this->view->attachment = "无";
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->attachment = "<a href='/data/attach/uuid/$uuid'>有可下载的附件</a>";
|
||||
}
|
||||
//数据评论
|
||||
$sql="select * from comments where uuid=? order by id desc";
|
||||
$this->view->comments=$this->db->fetchAll($sql,array($uuid));
|
||||
|
@ -1292,13 +1304,13 @@ class DataController extends Zend_Controller_Action
|
|||
else
|
||||
{
|
||||
$this->messenger->addMessage('您没有权限下载该附件');
|
||||
$this->_redirect("/data");
|
||||
$this->_redirect("/data/$uuid");
|
||||
}//未登陆
|
||||
}//end if
|
||||
else
|
||||
{
|
||||
$this->messenger->addMessage('您没有权限下载该附件');
|
||||
$this->_redirect("/data");
|
||||
$this->_redirect("/data/$uuid");
|
||||
}//无权限
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,7 @@
|
|||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||
$this->breadcrumb('查看元数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
//http://westdc.westgis.ac.cn
|
||||
$this->headScript()->appendFile('http://maps.google.com/maps?file=api&v=2&key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg');
|
||||
//$this->headScript()->appendFile('http://maps.google.com/maps?file=api&v=2&key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA');
|
||||
|
||||
$this->headScript()->appendFile('/js/prototype.js');
|
||||
$this->headScript()->appendFile('/js/OpenLayers.js');
|
||||
$this->headScript()->appendFile('/js/window.js');
|
||||
|
@ -92,6 +89,7 @@ else
|
|||
}else{
|
||||
echo $this->doc;
|
||||
}?>">数据说明文档</a></li>
|
||||
<li>附件:<?php echo $this->attachment;?></li>
|
||||
<?php endif; ?>
|
||||
<li id="datatype">数据共享方式:<?php if ($md->datatype) print "离线"; else print "在线(可直接下载)";?> <a href="#" id="show-list" rel="<?php echo $md->uuid;?>">文件列表</a></li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue