PROD SMS ISSUE 2 FIXED
This commit is contained in:
parent
1c958600a6
commit
08e97c3c56
@ -102,8 +102,10 @@ class StatusUpdation_model extends CI_Model {
|
||||
//If condition for Check ANSWERBOOKLET_STATUS, If it is null or 'Issued to Student' for do not send sms.
|
||||
|
||||
$answerBookletStatus = $this->getAnswerBookletStatus($arr[0]['StudentID'],$arr[0]['CourseID'],$arr[0]['BranchCode'],$arr[0]['Sem']);
|
||||
//print_r($answerBookletStatus);die();
|
||||
//echo "COURSE ====$arr[0]['CourseID']";
|
||||
// echo "PARENT -- $answerBookletStatus";
|
||||
if($answerBookletStatus == 0 )
|
||||
if($answerBookletStatus['isIssueToStudentExist'] == 0 && $answerBookletStatus['statusCount'] != 0)
|
||||
{
|
||||
//echo "SEND SMS";
|
||||
if ($this->get_ListCode_status($arr[0]['ListCode'])) {
|
||||
@ -540,7 +542,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
$mobile = implode(',', $number);
|
||||
$message = urlencode($msg);
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APOLLO&Message=" . $message . "&ServiceName=TEMPLATE_BASED");
|
||||
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APODEC&Message=" . $message . "&ServiceName=TEMPLATE_BASED");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
@ -820,7 +822,9 @@ class StatusUpdation_model extends CI_Model {
|
||||
$this->db->where("T_AnswerBookletStatus.Sem",$Sem);
|
||||
$res = $this->db->get();
|
||||
// print_r($res->result());
|
||||
$isIssueToStudentExist = 0;
|
||||
$data['isIssueToStudentExist'] = 0;
|
||||
$data['statusCount'] = 0;
|
||||
$data['statusCount'] = count($res->result());
|
||||
foreach($res->result() as $status)
|
||||
{
|
||||
$isExist = strcasecmp(trim($status->ListName),'ISSUED TO STUDENT');
|
||||
@ -830,7 +834,8 @@ class StatusUpdation_model extends CI_Model {
|
||||
}
|
||||
}
|
||||
|
||||
return $isIssueToStudentExist;
|
||||
|
||||
return $data;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user