parent
bd7392f5d1
commit
43434c27f2
|
@ -302,22 +302,24 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
$update = "update mdstatus set status=2 where uuid='$uuid'";
|
$update = "update mdstatus set status=2 where uuid='$uuid'";
|
||||||
@$this->db->exec($update);
|
@$this->db->exec($update);
|
||||||
}
|
}
|
||||||
$mailtp=new EmailText();
|
|
||||||
$mailtp->db = $this->db;
|
$mailtp=new EmailText(); //实例化EmailText
|
||||||
$mailtp->tmpid = "expinvite";
|
$mailtp->db = $this->db; //传入PDO类型数据库对象
|
||||||
$mailtp->data = array(
|
$mailtp->tmpid = "expinvite"; //传入模板ID或标示符,传入ID是使用int类型
|
||||||
'user' => $expinfo['realname'],
|
$mailtp->data = array( //传入要替换的数据
|
||||||
'uuid' => $uuid,
|
'user' => $expinfo['realname'], //用户名 {user}
|
||||||
'title' => $md['title']
|
'uuid' => $uuid, //uuid {uuid}
|
||||||
|
'title' => $md['title'] //元数据标题 {title}
|
||||||
);
|
);
|
||||||
$body = $mailtp->loadtmp();
|
$body = $mailtp->loadtmp(); //加载模板
|
||||||
|
$subject = $mailtp->tmpinfo['subject']; //标题(顺序不能变,必须先加载模板后调用标题,减少数据库查询的次数)
|
||||||
|
|
||||||
if($body === false)
|
if($body === false)
|
||||||
{
|
{
|
||||||
$this->messenger->addMessage('模板加载失败');
|
$this->messenger->addMessage('模板加载失败');
|
||||||
$this->_redirect("/admin/review/invite/?id=$id");
|
$this->_redirect("/admin/review/invite/?id=$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = "西部数据中心-元数据评审邀请函";
|
|
||||||
$email = "la5c@qq.com";
|
$email = "la5c@qq.com";
|
||||||
|
|
||||||
$mail=new WestdcMailer($this->view->config->smtp);
|
$mail=new WestdcMailer($this->view->config->smtp);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<a class="" href="/admin/sys/emailtext/ac/add">创建新模板</a>
|
<a class="" href="/admin/sys/emailtext/ac/add">创建新模板</a>
|
||||||
|
<a class="" href="/admin/sys/emailtext/ac/help">查看邮件模板编写说明</a>
|
||||||
<table><thead><tr>
|
<table><thead><tr>
|
||||||
<th>模板标识</th>
|
<th>模板标识</th>
|
||||||
<th width="30%">邮件主题</th>
|
<th width="30%">邮件主题</th>
|
||||||
|
|
Loading…
Reference in New Issue