diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index aa808675..40532b08 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -322,7 +322,7 @@ class Admin_ReviewController extends Zend_Controller_Action $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->addTo($expinfo['email']); $mail->setSubject($mailtp->getSubject()); - $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/admin/review/doc/uuid/'.$uuid); + $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, $md['title'].'.doc'); if($mail->send()) { @@ -779,95 +779,6 @@ class Admin_ReviewController extends Zend_Controller_Action }//列表 - }//expertsAction 专家库 - - /* - * 转换元数据为WORD DOC格式,并附加评审意见表和评审说明 - */ - public function docAction() - { - $this->_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setNoRender(); - $ua = $_SERVER["HTTP_USER_AGENT"]; - $uuid=$this->_request->getParam('uuid'); - if (!empty($uuid)) - { - $sql="select x.data,m.title,m.description,g.id,m.projection from xml x left join metadata m on m.id=x.id left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid); - $row=$this->db->fetchRow($sql); - $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?"; - $sql=$this->db->quoteInto($sql,$uuid); - $ref=$this->db->fetchAll($sql); - $reference='
',$abs); - $abs=str_replace("'","'",$abs);//not needed? - $id = $row['id']; - $thumburl=sprintf('%05d',floor(($id+0.1)/100)*100).'-'.sprintf('%05d',ceil(($id+0.1)/100)*100-1)."/".$id; - $xslt = new XSLTProcessor(); - $xslt->registerPHPFunctions(); - $xslt->setParameter('', 'thumburl', $thumburl); - $xslt->setParameter('', 'abstract', $abs); - $xslt->setParameter('','projection',$projection); - $xslt->setParameter('','reference',$reference); - $XSL = new DOMDocument(); - $XSL->load( '../data/doc.xsl', LIBXML_NOCDATA); - $xslt->importStylesheet($XSL); - $content=' -
'; - $content.='