diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php
index e4b302c8..664809e2 100755
--- a/application/default/controllers/AccountController.php
+++ b/application/default/controllers/AccountController.php
@@ -129,7 +129,17 @@ class AccountController extends Zend_Controller_Action
$flashMessenger->setNamespace('actionErrors');
$flashMessenger->addMessage($message);
$this->_redirect('/account/login');
- } else $this->_redirect($this->_request->getParam('return'));
+ } else
+ {
+ $tohref = $this->_request->getParam('href');
+ if(!empty($tohref))
+ {
+ $this->_redirect($tohref);
+ }else{
+ $this->_redirect($this->_request->getParam('return'));
+ }
+
+ }
} else {
//$formData['redirect'] = $redirect;
//$form->populate($formData);
@@ -205,7 +215,7 @@ class AccountController extends Zend_Controller_Action
$db=$ut->getAdapter();
$form = new LostpwdForm();
$key=$this->_request->getParam('key');
- $login=$this->_request->getParam('login');
+ $login=$this->_request->getParam('login');
if (empty($key) && empty($login)) {
$this->view->form = $form;
if ($this->_request->isPost()) {
diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php
index 12ce84e8..9b153062 100755
--- a/application/default/controllers/DataController.php
+++ b/application/default/controllers/DataController.php
@@ -707,11 +707,28 @@ class DataController extends Zend_Controller_Action
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
-
+
$uuid = $this->_request->getParam('uuid');
$ft = $this->_request->getParam('ft');
- if (empty($uuid)) $this->_redirect('/data');
+ if (empty($uuid))
+ {
+ echo "请按正确的下载步骤进行下载
+ 如果页面没有自动跳转,请点击这里
+ ";
+ exit();
+ }
+
+ $auth = Zend_Auth::getInstance();
+ if (!$auth->hasIdentity())
+ {
+ echo "您需要登录才能下载
+ 如果页面没有自动跳转,请点击这里进入登录页面
+ ";
+ exit();
+ }
+
+ $userid=Zend_Auth::getInstance()->getIdentity()->id;
$datas = array();
$submited = $this->_request->getParam('submited');
@@ -723,7 +740,7 @@ class DataController extends Zend_Controller_Action
$datas['email'] = $this->_request->getParam('email');
$datas['project'] = $this->_request->getParam('project');
- $userid=Zend_Auth::getInstance()->getIdentity()->id;
+
$form=$this->creatform($datas);
@@ -822,18 +839,13 @@ class DataController extends Zend_Controller_Action
$uuid=$this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/data');
$userid=Zend_Auth::getInstance()->getIdentity()->id;
- /*
- * 判断用户是否浑水摸鱼的去下载
-
- $testsql="select id from onlineapp where userid='$userid' and uuid='$uuid'";
- $result=$this->db->query($sql,$id);
+ $testsql="select id from onlineapp where userid='$userid' and uuid='$uuid' order by id desc";
+ $result=$this->db->query($testsql);
$rows = $result->fetch();
if (empty($rows['id']))
{
$this->_redirect('/data/'.$uuid);
}
- */
- // block end!
$this->view->username='westdc'.Zend_Auth::getInstance()->getIdentity()->id;
$sql=$this->db->quoteInto("select o.* from onlineresource o left join metadata m on o.uuid=m.uuid where m.datatype=0 and m.uuid=?",$uuid);
$rows=$this->db->fetchAll($sql);