issues fixed : ps
This commit is contained in:
parent
b4b6342627
commit
b9ff784dbe
@ -60,6 +60,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
// echo APPLICATION_STATUS;
|
||||
// print_r($arr);die();
|
||||
$this->db->insert_batch(APPLICATION_STATUS, $arr);
|
||||
$msgId = "";
|
||||
if ($this->db->affected_rows() >= 1) {
|
||||
if ($this->get_ListCode_status($arr[0]['ListCode'])) {
|
||||
$dateToMsg = $arr[0]['AppDate'];
|
||||
@ -73,7 +74,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||
$mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC";
|
||||
$this->smssend($arr, $mesg);
|
||||
$msgId = $this->smssend($arr, $mesg);
|
||||
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
||||
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
|
||||
@ -82,7 +83,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||
$mesg = "$cerNamtToMsg Despatch - Dear $studentName, Your $getSemYearANDType had been despatched against ($CmntToMsg $statuToMsg) on $dateToMsg. APOLLO DEC";
|
||||
$this->smssend($arr, $mesg);
|
||||
$msgId = $this->smssend($arr, $mesg);
|
||||
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||
} else {
|
||||
}
|
||||
@ -94,6 +95,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
}
|
||||
$this->updateDocumentStatusInCallTrack($arr, $reqDetails);
|
||||
$result['addStatus'] = true;
|
||||
$result['SMSstatus'] = $msgId;
|
||||
$result['message'] = "Successfully Documents Status Updated";
|
||||
} else {
|
||||
$result['addStatus'] = false;
|
||||
@ -515,6 +517,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
// update study material status
|
||||
public function update_semyear($arr) {
|
||||
$this->db->insert_batch(STUDY_MATERIAL_STATUS, $arr);
|
||||
$msgId = "";
|
||||
if ($this->db->affected_rows() >= 1) {
|
||||
if ($this->get_ListCode_status($arr[0]['ListCode']) == true) {
|
||||
$dateToMsg = $arr[0]['SDate'];
|
||||
@ -528,7 +531,7 @@ class StatusUpdation_model extends CI_Model {
|
||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||
$mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC";
|
||||
$this->smssend($arr, $mesg);
|
||||
$msgId = $this->smssend($arr, $mesg);
|
||||
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
||||
$cerNamtToMsg = 'Study Material';
|
||||
@ -536,12 +539,13 @@ class StatusUpdation_model extends CI_Model {
|
||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||
$mesg = "$cerNamtToMsg Despatch - Dear $studentName, Your $getSemYearANDType had been despatched against ($CmntToMsg $statuToMsg) on $dateToMsg. APOLLO DEC";
|
||||
$this->smssend($arr, $mesg);
|
||||
$msgId = $this->smssend($arr, $mesg);
|
||||
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
$result['addStatus'] = true;
|
||||
$result['SMSstatus'] = $msgId;
|
||||
$result['message'] = "Successfully Study Material Status Updated";
|
||||
} else {
|
||||
$result['addStatus'] = false;
|
||||
@ -743,7 +747,8 @@ class StatusUpdation_model extends CI_Model {
|
||||
|
||||
|
||||
$ch = curl_init();
|
||||
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_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=".$mobile."&SenderID=APODEC&Message=".$message."&ServiceName=TEMPLATE_BASED");
|
||||
echo "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);
|
||||
@ -780,15 +785,27 @@ class StatusUpdation_model extends CI_Model {
|
||||
|
||||
|
||||
// return $output;
|
||||
$res = $this->db->insert_batch('T_BroadcastStatus', $data);
|
||||
|
||||
if(!$res)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
if($msgId){
|
||||
$res = $this->db->insert_batch('T_BroadcastStatus', $data);
|
||||
if(!$res)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
return $error;
|
||||
return $error;
|
||||
return $error;
|
||||
return $error;
|
||||
return $error;
|
||||
return $error;
|
||||
return $error;
|
||||
}else{
|
||||
return ($msgId ? true : false);
|
||||
}
|
||||
}else{
|
||||
return $msgId;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function mailsend($arr, $msg, $sub) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user