db = \Zend_Registry::get('db'); }else{ $this->db = $db; } $this->config = \Zend_Registry::get('config'); } //申请成功提交之后 public function received(\Zend_EventManager_Event $e) { $id = $e->getParam('id'); try{ $OM = new Offlineapp(); $data = $OM->getOneAppInfo($id); $emailkeys = array( "user"=>$data[0]['username'], "datalist"=>str_replace(";","\n",$data[0]['datalist']), ); $mail = new Mail(); $mail->loadTemplate("offline-start",$emailkeys); $mail->addTo($data[0]['email'],$data[0]['username']); $mail->send(); }catch(Exception $e) { return $e->getMessage(); } return true; } //申请表重置 public function appFormReseted(\Zend_EventManager_Event $e) { $id = $e->getParam('id'); try{ $OM = new Offlineapp(); $data = $OM->getOneAppInfo($id); $emailkeys = array( "user"=>$data[0]['username'], "link"=> view::getHostLink() . '/data/order/ac/offline2' ); $mail = new Mail(); $mail->loadTemplate("offline-appformreseted",$emailkeys); $mail->addTo($data[0]['email'],$data[0]['username']); $mail->send(); }catch(Exception $e) { return $e->getMessage(); } return true; } //专题数据集 public function checkDataSource() { } }