fix ticket #66:修正邮件类错误,FPDF类要求错误模式不能为strict。
This commit is contained in:
parent
a2586e97ab
commit
39f35c4765
|
@ -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=?";
|
$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']));
|
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$row['id']));
|
||||||
} else {
|
} 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->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
|
||||||
$pdf = new ApplicantPDF();
|
$pdf = new ApplicantPDF();
|
||||||
$pdf->template=$this->view->config->offline->template;
|
$pdf->template=$this->view->config->offline->template;
|
||||||
$pdf->data = $formData;
|
$pdf->data = $formData;
|
||||||
$pdf->drawWestdc();
|
$pdf->drawWestdc();
|
||||||
$this->_helper->layout->disableLayout();
|
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
|
||||||
header("Content-Disposition: inline; filename=result.pdf");
|
header("Content-Disposition: inline; filename=result.pdf");
|
||||||
header("Content-Type:application/pdf");
|
header("Content-Type:application/pdf");
|
||||||
//header("Content-Length: " . strlen($pdfstring));
|
//header("Content-Length: " . strlen($pdfstring));
|
||||||
echo $pdf->Output('数据申请.pdf','S');
|
echo $pdf->Output('westdc-data-apply.pdf','S');
|
||||||
exit;
|
die();
|
||||||
|
//exit;
|
||||||
} elseif ($formData['submit']) {
|
} elseif ($formData['submit']) {
|
||||||
//提交
|
//提交
|
||||||
//生成PDF
|
//生成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=?";
|
$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']));
|
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn,$row['id']));
|
||||||
} else {
|
} 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));
|
$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=?";
|
$sql="update dataorder set status=3 where status=2 and userid=?";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class WestdcMailer extends Zend_Mail {
|
class WestdcMailer extends Zend_Mail {
|
||||||
private tr; //smtp class
|
private $tr; //smtp class
|
||||||
function __construct($smtp)){
|
function __construct($smtp){
|
||||||
$this->tr=new Zend_Mail_Transport_Smtp($smtp->host,
|
$this->tr=new Zend_Mail_Transport_Smtp($smtp->host,
|
||||||
array('ssl' => $smtp->ssl,
|
array('ssl' => $smtp->ssl,
|
||||||
'auth'=>$smtp->auth,
|
'auth'=>$smtp->auth,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL|E_STRICT);
|
//error_reporting(E_ALL|E_STRICT);
|
||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
date_default_timezone_set('Asia/Shanghai');
|
date_default_timezone_set('Asia/Shanghai');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue