fix ticket #66:修正邮件类错误,FPDF类要求错误模式不能为strict。

This commit is contained in:
wlx 2009-03-13 02:41:26 +00:00
parent a2586e97ab
commit 39f35c4765
3 changed files with 10 additions and 9 deletions

View File

@ -746,21 +746,22 @@ class DataController extends Zend_Controller_Action
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now() where id=?";
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$row['id']));
} else {
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist) values(?,?,?,?,?,?,?)";
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist) values(?,?,?,?,?,?,?,?,?)";
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist));
}
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
//生成PDF
$pdf = new ApplicantPDF();
$pdf->template=$this->view->config->offline->template;
$pdf->data = $formData;
$pdf->drawWestdc();
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
header("Content-Disposition: inline; filename=result.pdf");
header("Content-Type:application/pdf");
//header("Content-Length: " . strlen($pdfstring));
echo $pdf->Output('数据申请.pdf','S');
exit;
echo $pdf->Output('westdc-data-apply.pdf','S');
die();
//exit;
} elseif ($formData['submit']) {
//提交
//生成PDF
@ -779,7 +780,7 @@ class DataController extends Zend_Controller_Action
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now(),pdflink=? where id=?";
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn,$row['id']));
} else {
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist,pdflink) values(?,?,?,?,?,?,?,?)";
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist,pdflink) values(?,?,?,?,?,?,?,?,?,?)";
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn));
}
$sql="update dataorder set status=3 where status=2 and userid=?";

View File

@ -1,7 +1,7 @@
<?php
class WestdcMailer extends Zend_Mail {
private tr; //smtp class
function __construct($smtp)){
private $tr; //smtp class
function __construct($smtp){
$this->tr=new Zend_Mail_Transport_Smtp($smtp->host,
array('ssl' => $smtp->ssl,
'auth'=>$smtp->auth,

View File

@ -1,5 +1,5 @@
<?php
error_reporting(E_ALL|E_STRICT);
//error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
date_default_timezone_set('Asia/Shanghai');