增加了通过邮件模板表示服判断的逻辑

This commit is contained in:
Li Jianxuan 2011-10-13 07:52:05 +00:00
parent 14ca43e49b
commit ea5116216e
1 changed files with 4 additions and 1 deletions

View File

@ -7,7 +7,7 @@ class EmailText{
function __construct() function __construct()
{ {
if(!is_numeric($this->tmpid)||empty($this->tmpid)) if(empty($this->tmpid))
{ {
$this->tmpid = 0; $this->tmpid = 0;
} }
@ -19,7 +19,10 @@ class EmailText{
{ {
return false; return false;
}else{ }else{
if(is_numeric($this->tmpid))
$sql = "select id,body from emailtext where id='".$this->tmpid."'"; $sql = "select id,body from emailtext where id='".$this->tmpid."'";
else
$sql = "select id,body from emailtext where template='".$this->tmpid."'";
$rs = $this->db->query($sql); $rs = $this->db->query($sql);
$c = $rs->fetch(); $c = $rs->fetch();