|
@@ -71,9 +71,9 @@ class Notices{
|
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
|
$sms_content = array(
|
|
|
"workorder_id"=>$workorder['workorder_id'],
|
|
|
- "workorder_name"=>strlen($workorder['workorder_name'])<=18?$workorder['workorder_name']:substr($workorder['workorder_name'],0,18)."..",
|
|
|
+ "workorder_name"=>mb_strlen($workorder['workorder_name'],'utf-8')<=18?$workorder['workorder_name']:mb_substr($workorder['workorder_name'],0,18,'utf-8')."..",
|
|
|
"workorder_type"=>$workorder['type'],
|
|
|
- "remark_content"=>strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'])<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18).".."
|
|
|
+ "remark_content"=>mb_strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],'utf-8')<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:mb_substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18,'utf-8').".."
|
|
|
);
|
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][0],$sms_content);
|
|
|
if($resp['Code'] == 'OK'){
|
|
@@ -184,10 +184,10 @@ class Notices{
|
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
|
$sms_content = array(
|
|
|
"workorder_id"=>$workorder['workorder_id'],
|
|
|
- "workorder_name"=>strlen($workorder['workorder_name'])<=18?$workorder['workorder_name']:substr($workorder['workorder_name'],0,18)."..",
|
|
|
+ "workorder_name"=>mb_strlen($workorder['workorder_name'],'utf-8')<=18?$workorder['workorder_name']:mb_substr($workorder['workorder_name'],0,18,'utf-8')."..",
|
|
|
"workorder_type"=>$workorder['type'],
|
|
|
"receive_user_name"=>$receive_user['name'],
|
|
|
- "remark_content"=>strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'])<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18).".."
|
|
|
+ "remark_content"=>mb_strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],'utf-8')<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:mb_substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18,'utf-8').".."
|
|
|
);
|
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][1],$sms_content);
|
|
|
if($resp['Code'] == 'OK'){
|
|
@@ -298,10 +298,10 @@ class Notices{
|
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
|
$sms_content = array(
|
|
|
"workorder_id"=>$workorder['workorder_id'],
|
|
|
- "workorder_name"=>strlen($workorder['workorder_name'])<=18?$workorder['workorder_name']:substr($workorder['workorder_name'],0,18)."..",
|
|
|
+ "workorder_name"=>mb_strlen($workorder['workorder_name'],'utf-8')<=18?$workorder['workorder_name']:mb_substr($workorder['workorder_name'],0,18,'utf-8')."..",
|
|
|
"workorder_type"=>$workorder['type'],
|
|
|
"receive_user_name"=>$receive_user['name'],
|
|
|
- "remark_content"=>strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'])<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18).".."
|
|
|
+ "remark_content"=>mb_strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],'utf-8')<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:mb_substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18,'utf-8').".."
|
|
|
);
|
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][2],$sms_content);
|
|
|
if($resp['Code'] == 'OK'){
|
|
@@ -417,14 +417,15 @@ class Notices{
|
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
|
$sms_content = array(
|
|
|
"workorder_id"=>$workorder['workorder_id'],
|
|
|
- "workorder_name"=>strlen($workorder['workorder_name'])<=18?$workorder['workorder_name']:substr($workorder['workorder_name'],0,18)."..",
|
|
|
+ "workorder_name"=>mb_strlen($workorder['workorder_name'],'utf-8')<=18?$workorder['workorder_name']:mb_substr($workorder['workorder_name'],0,18,'utf-8')."..",
|
|
|
"workorder_type"=>$workorder['type'],
|
|
|
"receive_user_name"=>$receive_user['name'],
|
|
|
- "remark_content"=>strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'])<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18).".."
|
|
|
+ "remark_content"=>mb_strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],'utf-8')<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:mb_substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18,'utf-8').".."
|
|
|
);
|
|
|
$resp = $this->Aliyunsms->sendSms($notices_log['mobile'],$this->setting['template_codes'][3],$sms_content);
|
|
|
if($resp['Code'] == 'OK'){
|
|
|
$notices_log['status'] = "1";
|
|
|
+ $info['sms_code'] = "OK";
|
|
|
}else{
|
|
|
$notices_log['status'] = "0";
|
|
|
$info['sms_msg'] = $resp['Message'];
|
|
@@ -522,9 +523,9 @@ class Notices{
|
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
|
$sms_content = array(
|
|
|
"workorder_id"=>$workorder['workorder_id'],
|
|
|
- "workorder_name"=>strlen($workorder['workorder_name'])<=18?$workorder['workorder_name']:substr($workorder['workorder_name'],0,18)."..",
|
|
|
+ "workorder_name"=>mb_strlen($workorder['workorder_name'],'utf-8')<=18?$workorder['workorder_name']:mb_substr($workorder['workorder_name'],0,18,'utf-8')."..",
|
|
|
"workorder_type"=>$workorder['type'],
|
|
|
- "remark_content"=>strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'])<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18).".."
|
|
|
+ "remark_content"=>mb_strlen($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],'utf-8')<=18?$workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content']:mb_substr($workorder['remark_list'][count($workorder['remark_list'])-1]['remark_content'],0,18,'utf-8').".."
|
|
|
);
|
|
|
$resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
|
|
|
if($resp['Code'] == 'OK'){
|
|
@@ -617,10 +618,10 @@ class Notices{
|
|
|
}elseif($this->setting['sms_type'] == '20' ){
|
|
|
$sms_content = array(
|
|
|
"workorder_id"=>$workorder['workorder_id'],
|
|
|
- "workorder_name"=>strlen($workorder['workorder_name'])<=18?$workorder['workorder_name']:substr($workorder['workorder_name'],0,18)."..",
|
|
|
+ "workorder_name"=>mb_strlen($workorder['workorder_name'],'utf-8')<=18?$workorder['workorder_name']:mb_substr($workorder['workorder_name'],0,18,'utf-8')."..",
|
|
|
"workorder_type"=>$workorder['type']
|
|
|
);
|
|
|
- $resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][4],$sms_content);
|
|
|
+ $resp = $this->Aliyunsms->sendSms($receive_user['mobile'],$this->setting['template_codes'][5],$sms_content);
|
|
|
if($resp['Code'] == 'OK'){
|
|
|
$notices_log['status'] = "1";
|
|
|
$info['sms_code'] = "OK";
|