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;
|
// echo APPLICATION_STATUS;
|
||||||
// print_r($arr);die();
|
// print_r($arr);die();
|
||||||
$this->db->insert_batch(APPLICATION_STATUS, $arr);
|
$this->db->insert_batch(APPLICATION_STATUS, $arr);
|
||||||
|
$msgId = "";
|
||||||
if ($this->db->affected_rows() >= 1) {
|
if ($this->db->affected_rows() >= 1) {
|
||||||
if ($this->get_ListCode_status($arr[0]['ListCode'])) {
|
if ($this->get_ListCode_status($arr[0]['ListCode'])) {
|
||||||
$dateToMsg = $arr[0]['AppDate'];
|
$dateToMsg = $arr[0]['AppDate'];
|
||||||
@ -73,7 +74,7 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||||
$mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC";
|
$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);
|
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||||
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
||||||
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
|
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
|
||||||
@ -82,7 +83,7 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||||
$mesg = "$cerNamtToMsg Despatch - Dear $studentName, Your $getSemYearANDType had been despatched against ($CmntToMsg $statuToMsg) on $dateToMsg. APOLLO DEC";
|
$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);
|
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
@ -94,6 +95,7 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
}
|
}
|
||||||
$this->updateDocumentStatusInCallTrack($arr, $reqDetails);
|
$this->updateDocumentStatusInCallTrack($arr, $reqDetails);
|
||||||
$result['addStatus'] = true;
|
$result['addStatus'] = true;
|
||||||
|
$result['SMSstatus'] = $msgId;
|
||||||
$result['message'] = "Successfully Documents Status Updated";
|
$result['message'] = "Successfully Documents Status Updated";
|
||||||
} else {
|
} else {
|
||||||
$result['addStatus'] = false;
|
$result['addStatus'] = false;
|
||||||
@ -515,6 +517,7 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
// update study material status
|
// update study material status
|
||||||
public function update_semyear($arr) {
|
public function update_semyear($arr) {
|
||||||
$this->db->insert_batch(STUDY_MATERIAL_STATUS, $arr);
|
$this->db->insert_batch(STUDY_MATERIAL_STATUS, $arr);
|
||||||
|
$msgId = "";
|
||||||
if ($this->db->affected_rows() >= 1) {
|
if ($this->db->affected_rows() >= 1) {
|
||||||
if ($this->get_ListCode_status($arr[0]['ListCode']) == true) {
|
if ($this->get_ListCode_status($arr[0]['ListCode']) == true) {
|
||||||
$dateToMsg = $arr[0]['SDate'];
|
$dateToMsg = $arr[0]['SDate'];
|
||||||
@ -528,7 +531,7 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||||
$mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC";
|
$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);
|
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||||
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
||||||
$cerNamtToMsg = 'Study Material';
|
$cerNamtToMsg = 'Study Material';
|
||||||
@ -536,12 +539,13 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||||
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
|
||||||
$mesg = "$cerNamtToMsg Despatch - Dear $studentName, Your $getSemYearANDType had been despatched against ($CmntToMsg $statuToMsg) on $dateToMsg. APOLLO DEC";
|
$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);
|
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result['addStatus'] = true;
|
$result['addStatus'] = true;
|
||||||
|
$result['SMSstatus'] = $msgId;
|
||||||
$result['message'] = "Successfully Study Material Status Updated";
|
$result['message'] = "Successfully Study Material Status Updated";
|
||||||
} else {
|
} else {
|
||||||
$result['addStatus'] = false;
|
$result['addStatus'] = false;
|
||||||
@ -744,6 +748,7 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
|
|
||||||
$ch = curl_init();
|
$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);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
@ -780,15 +785,27 @@ class StatusUpdation_model extends CI_Model {
|
|||||||
|
|
||||||
|
|
||||||
// return $output;
|
// return $output;
|
||||||
|
if($msgId){
|
||||||
$res = $this->db->insert_batch('T_BroadcastStatus', $data);
|
$res = $this->db->insert_batch('T_BroadcastStatus', $data);
|
||||||
|
|
||||||
if(!$res)
|
if(!$res)
|
||||||
{
|
{
|
||||||
$error = $this->db->error();
|
$error = $this->db->error();
|
||||||
return $error;
|
return $error;
|
||||||
|
return $error;
|
||||||
|
return $error;
|
||||||
|
return $error;
|
||||||
|
return $error;
|
||||||
|
return $error;
|
||||||
|
return $error;
|
||||||
}else{
|
}else{
|
||||||
return $msgId;
|
return ($msgId ? true : false);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mailsend($arr, $msg, $sub) {
|
public function mailsend($arr, $msg, $sub) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user