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