#430 在线下载邮件通知

This commit is contained in:
Li Jianxuan 2012-12-06 03:16:43 +00:00
parent e3c233010a
commit d7fe98efae
1 changed files with 29 additions and 9 deletions

View File

@ -1102,7 +1102,14 @@ class DataController extends Zend_Controller_Action
$onlineappid=$this->_request->getParam('onlineappid');
if (empty($uuid)) $this->_redirect('/data');
$userid=Zend_Auth::getInstance()->getIdentity()->id;
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$userid = $user->id;
}
$testsql="select id from onlineapp where userid='$userid' and uuid='$uuid' order by id desc";
$result=$this->db->query($testsql);
$rows = $result->fetch();
@ -1240,6 +1247,19 @@ class DataController extends Zend_Controller_Action
$sql="insert into dataorder (userid,uuid,ts_created) values(?,?,now())";
$this->db->query($sql,array($userid,$uuid));
}*/
$data = array(
"url"=> "http://" . $_SERVER['HTTP_HOST']."/data/download/uuid/fecdec71-77d1-43c2-b472-8b1c729874cb/onlineappid/5475",
"username"=>$this->view->username,
"password"=>$this->view->userpass,
"time"=>$this->view->ftptime,
);
$mailtp=new EmailText($this->db,'onlineapp-download',$data);
$mail=new WestdcMailer($this->view->config->smtp);
$mail->setBodyText($mailtp->getBody());
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->addTo($user->email);
$mail->setSubject($mailtp->getSubject());
$mail->send();
}
/*
* 离线申请(可以包括在线数据),在无数据参数时,则显示已有列表