修复在线数据的下载问题
This commit is contained in:
parent
3af3b545ee
commit
63bed29856
|
@ -1283,7 +1283,8 @@ class DataController extends Zend_Controller_Action
|
||||||
function downloadAction()
|
function downloadAction()
|
||||||
{
|
{
|
||||||
$uuid=$this->_request->getParam('uuid');
|
$uuid=$this->_request->getParam('uuid');
|
||||||
$onlineappid=$this->_request->getParam('onlineappid');
|
$onlineappid=$this->_request->getParam('onlineappid');
|
||||||
|
$this->view->pageID = "account-dataorder";
|
||||||
|
|
||||||
if (empty($uuid)) $this->_redirect('/data');
|
if (empty($uuid)) $this->_redirect('/data');
|
||||||
|
|
||||||
|
@ -1329,7 +1330,9 @@ class DataController extends Zend_Controller_Action
|
||||||
$updateftp=$updateftp1=false;
|
$updateftp=$updateftp1=false;
|
||||||
$this->view->md=$data;
|
$this->view->md=$data;
|
||||||
$this->view->userpass=md5('westdc'.rand(1000,9999));
|
$this->view->userpass=md5('westdc'.rand(1000,9999));
|
||||||
$this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week'));
|
$this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week'));
|
||||||
|
$sql=$this->db->quoteInto("select * from ftpuser where userid=?",$userid);
|
||||||
|
$row=$this->db->fetchRow($sql);
|
||||||
$datacount=$row['datacount'];
|
$datacount=$row['datacount'];
|
||||||
if ($data['host']=='ftp.westgis.ac.cn')
|
if ($data['host']=='ftp.westgis.ac.cn')
|
||||||
{
|
{
|
||||||
|
@ -1398,7 +1401,7 @@ class DataController extends Zend_Controller_Action
|
||||||
|
|
||||||
//设置输出
|
//设置输出
|
||||||
//if ($updateftp || $updateftp1) $this->view->userpass=$password;
|
//if ($updateftp || $updateftp1) $this->view->userpass=$password;
|
||||||
$this->view->ftpurls=$ftpurl;
|
$this->view->ftpurl=$ftpurl;
|
||||||
//更新下载记录
|
//更新下载记录
|
||||||
//todo: 尝试添加一个RULE:若有对应数据存在,则不插入( userid,uuid,status=0,ts_approved:null)
|
//todo: 尝试添加一个RULE:若有对应数据存在,则不插入( userid,uuid,status=0,ts_approved:null)
|
||||||
/*$sql="select * from dataorder where userid=? and uuid=? and status=0 and (ts_approved is null)";
|
/*$sql="select * from dataorder where userid=? and uuid=? and status=0 and (ts_approved is null)";
|
||||||
|
|
|
@ -3,51 +3,38 @@
|
||||||
$this->headTitle($this->config->title->data);
|
$this->headTitle($this->config->title->data);
|
||||||
$this->headTitle('下载');
|
$this->headTitle('下载');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/download.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$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(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="download">
|
<div class="row">
|
||||||
|
<div class="span3">
|
||||||
|
<div class="well sidebar-nav">
|
||||||
|
<?= $this->partial('account/left.phtml'); ?>
|
||||||
|
</div><!--/.well -->
|
||||||
|
</div><!--/span-->
|
||||||
|
<div class="span9">
|
||||||
<h1><?php echo $this->md['title']; ?>(<?php echo $this->md['filesize']; ?>MB)</h1>
|
<h1><?php echo $this->md['title']; ?>(<?php echo $this->md['filesize']; ?>MB)</h1>
|
||||||
<div id="thumb"><img src="/service/thumb/id/<?php echo $this->md['id'];?>" /></div>
|
|
||||||
<div id="ftpurl">
|
|
||||||
<fieldset><legend>FTP下载地址</legend>
|
<fieldset><legend>FTP下载地址</legend>
|
||||||
<ul>
|
<ul>
|
||||||
<?php if ($this->ftpurls) : ?>
|
<?php if ($this->ftpurl) : ?>
|
||||||
<?php foreach($this->ftpurls as $ftp) : ?>
|
<li><a href="<?php echo $this->ftpurl; ?>"><?php echo $this->ftpurl; ?></a></li>
|
||||||
<li><a href="<?php echo $ftp; ?>"><?php echo $ftp; ?></a></li>
|
<?php endif;?>
|
||||||
<?php endforeach; endif;?>
|
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
|
||||||
<div id="link">
|
|
||||||
<?php if ($this->links) : ?>
|
|
||||||
<fieldset><legend>其他在线资源</legend>
|
|
||||||
<ul><?php foreach($this->links as $link) : ?>
|
|
||||||
<li><a href="<?php echo $link['linkage']; ?>">
|
|
||||||
<?php
|
|
||||||
if (!empty($link['name']))
|
|
||||||
echo $link['name'];
|
|
||||||
elseif (!empty($link['description']))
|
|
||||||
echo $link['description'];
|
|
||||||
else
|
|
||||||
echo $link['linkage'];
|
|
||||||
?></a></li>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
<?php endif; ?>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div id="ftpinfo">
|
|
||||||
<fieldset><legend>FTP使用说明</legend>
|
<fieldset><legend>FTP使用说明</legend>
|
||||||
帐号信息如下:<ul><li>FTP的用户名:<?php echo $this->username; ?></li>
|
帐号信息如下:<ul><li>FTP的用户名:<?php echo $this->username; ?></li>
|
||||||
<li>FTP的密码:<?php echo $this->userpass; ?></li>
|
<li>FTP的密码:<?php echo $this->userpass; ?></li>
|
||||||
<li>密码有效期限:<?php echo $this->ftptime; ?></li>
|
<li>密码有效期限:<?php echo $this->ftptime; ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>FTP是一种常用的文件传输协议,西部数据中心推荐您使用使用开源的<a href="http://filezilla-project.org">FileZilla</a>软件来进行数据下载,您可以使用您自己喜欢的FTP客户端来进行数据下载。</p>
|
<?php if ($this->md['host']=='ftp.westgis.ac.cn') : ?>
|
||||||
|
<p class="text-error">请注意,此FTP需要在登陆后手工输入目录地址!</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<p>FTP是一种常用的文件传输协议,西部数据中心推荐您使用使用开源的<a href="http://filezilla-project.org">FileZilla</a>软件来进行数据下载,您也可以使用您自己喜欢的FTP客户端来进行数据下载。</p>
|
||||||
|
<p>在使用FTP中遇到问题,可以参考:<a href="/archives/news/localnews/archive-7.html">数据的FTP下载问题</a></p>
|
||||||
<img src="/images/filezilla-westdc.png" alt="以FileZilla演示如何下载数据" />
|
<img src="/images/filezilla-westdc.png" alt="以FileZilla演示如何下载数据" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue