在数据外审中添加了数据同步功能

This commit is contained in:
wlx 2013-04-22 15:45:56 +00:00
parent e2c2cfe776
commit b10488a813
1 changed files with 8 additions and 0 deletions

View File

@ -2333,6 +2333,10 @@ class Admin_DataController extends Zend_Controller_Action
} }
else if ($row['status']==2 || $row['status']==3 || $row['status']==4)//已发送过外审邮件,需由编辑告知变化信息 else if ($row['status']==2 || $row['status']==3 || $row['status']==4)//已发送过外审邮件,需由编辑告知变化信息
{ {
//同步元数据
$iso=new ISO19115();
$iso->saveDB($this->db,$row['xml']);
//email to admin //email to admin
$mail=new WestdcMailer($this->view->config->smtp); $mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
@ -2394,6 +2398,10 @@ class Admin_DataController extends Zend_Controller_Action
)); ));
$mail->setBodyText($mailtp->getBody()); $mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject()); $mail->setSubject($mailtp->getSubject());
$filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/data/doc/review/1/uuid/'.$uuid);
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.doc');
$filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/pdf/uuid/'.$uuid);
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf');
if($this->debug==0) if($this->debug==0)
{ {
$mail->addTo($user->email); $mail->addTo($user->email);