diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index f1bf37e9..99339025 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -463,5 +463,6 @@ $route['getUnmatchedFormIdFeesDetails'] = 'Receive_Enrolment_Fees_Univ_Controlle $route['addToAccountStateList'] = 'Receive_Enrolment_Fees_Univ_Controller/addToAccountStateList'; $route['addUniversityPaymentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/addUniversityPaymentDetails'; $route['updateUniversityPaymentDetails'] = 'Receive_Enrolment_Fees_Univ_Controller/updateUniversityPaymentDetails'; +$route['testsmsandmailflow'] = 'Student_Controller/testsmsandmailflow'; diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index c62f7074..1de349ca 100755 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -132,7 +132,8 @@ class Call_Tracking_Controller extends REST_Controller { $leadDetails = $this->Calltracking_model->addleadDetails($AssignedTo,$lead_details,$tracking_details,$tracking_followup_details,$message); - // Check if the users data store contains users (in case the database result returns NULL) + // Check if the users data store contains users (in case the database result returns NULL) + if ($leadDetails) { $leadDetails['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php index 17dc9e09..cde55a88 100755 --- a/Apollo/api/application/controllers/Student_Controller.php +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -873,7 +873,19 @@ class Student_Controller extends REST_Controller { } } - +public function testsmsandmailflow_get(){ + $studentAdd = $this->student_model->testsmsandmailflow(); + if ($studentAdd) { + $studentAdd['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } else { + // Set the response and exit + $this->response(['message' => 'No users were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + + } +} public function getEmployeeDetailsBranch_post() { $data = $this->post('data'); $loginUserId = $data['localUserID']; diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index f4d58784..1ecbdb3c 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -417,7 +417,9 @@ class Calltracking_model extends CI_Model { // $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education College for the course '.$CourseName.'. Pls feel free to call us for more information at '.$Sname.'- '.$SMobileno.''; -$msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education College for the course '.$CourseName.'. Pls feel free to call '.$Sname.' for more information at '.$SMobileno.'.'; +$msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education College for the course '.$CourseName.'. Pls feel free to call '.$Sname.' for more information at '.$SMobileno.'. APOLLO DEC'; + + //echo $msg; $messa = urlencode($msg); //echo $messa ; diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index 0d39d6df..b4c19e00 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -567,7 +567,8 @@ class Fees_status_model extends CI_Model $dayBookEntry = $this->insertDayBookMaster($feesPaidDetails,$feesPayedID,$courseID,$feesName); // set message content - $message='Thanks for the payment of Rs.'.$feesPaidDetails['BillAmount'].',BillNo-'. $feesPaidDetails['BillNO'].' for '. strtolower($smsDetails['FeesName']).' your balance fees is Rs.'.$smsDetails['CurrentBalance'].'.'; + // $message='Thanks for the payment of Rs.'.$feesPaidDetails['BillAmount'].',BillNo-'. $feesPaidDetails['BillNO'].' for '. strtolower($smsDetails['FeesName']).' your balance fees is Rs.'.$smsDetails['CurrentBalance'].'.'; + $message='Thanks for the payment of Rs.'.$feesPaidDetails['BillAmount'].',BillNo-'. $feesPaidDetails['BillNO'].' for '. strtolower($smsDetails['FeesName']).' your balance fees is Rs.'.$smsDetails['CurrentBalance'].'. APOLLO DEC'; $studentDetails = $this->get_registered_mobile($feesPaidDetails['StudentID']); $this->smssend($studentDetails->MobileNumber,$message); } @@ -1684,7 +1685,7 @@ class Fees_status_model extends CI_Model if($row->Amount > $getStudentPaiDetails[0]->BillAmount){ $studentDetails = $this->get_registered_mobile($row->StudentID); - $message ="Dear ". strtolower($studentDetails->Firstname)." your ". strtolower($row->Name)." installment due is on $row->DueDate.Please clear the dues."; + $message ="Dear ". strtolower($studentDetails->Firstname)." your ". strtolower($row->Name)." installment due is on $row->DueDate.Please clear the dues. APOLLO DEC"; $this->smssend($studentDetails->MobileNumber,$message); } @@ -1712,7 +1713,7 @@ class Fees_status_model extends CI_Model $getStudentPaiDetails1 = $this->db->get()->result(); if($row1->Amount > $getStudentPaiDetails1[0]->BillAmount){ $studentDetails1 = $this->get_registered_mobile($row1->StudentID); - $message1 ="Dear ". strtolower($studentDetails1->Firstname)." your ". strtolower($row1->Name)." installment due is on $row1->DueDate.Please clear the dues."; + $message1 ="Dear ". strtolower($studentDetails1->Firstname)." your ". strtolower($row1->Name)." installment due is on $row1->DueDate.Please clear the dues. APOLLO DEC"; $this->smssend($studentDetails1->MobileNumber,$message1); } @@ -1747,7 +1748,8 @@ class Fees_status_model extends CI_Model $this->updateFeesStatusInCallTrack($row2->StudentID,$row2->CourseID); // send notification to student $getStudentPaiDetails2 = $this->get_registered_mobile($row2->StudentID); - $message2 ="Dear ". strtolower($getStudentPaiDetails2->Firstname)." your ". strtolower($row2->Name)." installment date is overdue.Please clear this immediately.Ignore if already paid."; + // $message2 ="Dear ". strtolower($getStudentPaiDetails2->Firstname)." your ". strtolower($row2->Name)." installment date is overdue.Please clear this immediately.Ignore if already paid."; + $message2 ="Dear ". strtolower($getStudentPaiDetails2->Firstname)." your ". strtolower($row2->Name)." installment date is overdue.Please clear this immediately.Ignore if already paid. APOLLO DEC"; $this->smssend($getStudentPaiDetails2->MobileNumber,$message2); } diff --git a/Apollo/api/application/models/Forgot_model.php b/Apollo/api/application/models/Forgot_model.php index 263d2aa7..b631bdaa 100755 --- a/Apollo/api/application/models/Forgot_model.php +++ b/Apollo/api/application/models/Forgot_model.php @@ -89,7 +89,8 @@ class Forgot_model extends CI_Model { // echo $mobile; // echo $messa; // die(); - $message ="Your new password for logging into Apollo student portal is $messa. Please change the password as soon as you login."; + // $message ="Your new password for logging into Apollo student portal is $messa. Please change the password as soon as you login."; + $message ="Your new password for logging into Apollo student portal is $messa. Please change the password as soon as you login. APOLLO DEC"; $mobile = "91$mobile"; $message = urlencode($message); diff --git a/Apollo/api/application/models/Login_model.php b/Apollo/api/application/models/Login_model.php index b7b0db5a..c98259fb 100755 --- a/Apollo/api/application/models/Login_model.php +++ b/Apollo/api/application/models/Login_model.php @@ -204,12 +204,14 @@ class Login_model extends CI_Model foreach($searchDetails->result() as $mo) { $contact = $mo->MobileNumber; + // $contact = "9092279559"; + // $contact = "6369084112"; } $string2 = str_shuffle('1234567890'); $otp = substr($string2,0,6); - //$otp = '431528'; + // $otp = '431528'; $save['OTP'] = $otp; $save['UpdatedOn'] = date('Y-m-d H:i:s'); @@ -222,6 +224,7 @@ class Login_model extends CI_Model if($query == 1) { + $sms = $this->smssend($mobileno,$otp); } @@ -765,7 +768,8 @@ class Login_model extends CI_Model //echo $mobile; - $message ="Your One Time Password to Login to apollodec.com is $OTP. This is valid for 10 minutes."; + // $message ="Your One Time Password to Login to apollodec.com is $OTP. This is valid for 10 minutes."; + $message ="Your One Time Password to Login to apollodec.com is $OTP. This is valid for 10 minutes. APOLLO DEC"; $mobile = "91$mobile"; $message = urlencode($message); // echo $message;die; diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index b35e1e42..662856d3 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -208,7 +208,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se WHERE c.ID IN (SELECT max(ID) FROM T_CertificationStatus GROUP BY StudentID,CourseID,BranchCode,Sem) GROUP BY sid,sem,cid,lcode,branch) AS sms - ON sfs.sid=sms.sid AND sms.cid=sfs.ftype + ON sfs.sid=sms.sid AND sms.cid=sfs.ftype and sms.branch ='".$br."' LEFT JOIN (SELECT StudentID AS sid,FeesId AS fid,BillDate AS bdate,sum(BillAmount) AS bamount,BillNO AS billno FROM T_Students_Fees_PaidDetails diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index 07c88f8e..90b9c64f 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -72,7 +72,7 @@ class StatusUpdation_model extends CI_Model { $getSemYearMsg = $this->get_couser_name($arr[0]['CourseID']); $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."; + $mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC"; $this->smssend($arr, $mesg); $this->mailsend($arr, $mesg, $cerNamtToMsg); } else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') { @@ -81,7 +81,7 @@ class StatusUpdation_model extends CI_Model { $getSemYearMsg = $this->get_couser_name($arr[0]['CourseID']); $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."; + $mesg = "$cerNamtToMsg Despatch - Dear $studentName, Your $getSemYearANDType had been despatched against ($CmntToMsg $statuToMsg) on $dateToMsg. APOLLO DEC"; $this->smssend($arr, $mesg); $this->mailsend($arr, $mesg, $cerNamtToMsg); } else { @@ -235,7 +235,7 @@ class StatusUpdation_model extends CI_Model { $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $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."; + $mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC"; $this->smssend($arr, $mesg); $this->mailsend($arr, $mesg, $cerNamtToMsg); @@ -526,7 +526,7 @@ class StatusUpdation_model extends CI_Model { $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $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."; + $mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it. APOLLO DEC"; $this->smssend($arr, $mesg); $this->mailsend($arr, $mesg, $cerNamtToMsg); } else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') { @@ -534,7 +534,7 @@ class StatusUpdation_model extends CI_Model { $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $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."; + $mesg = "$cerNamtToMsg Despatch - Dear $studentName, Your $getSemYearANDType had been despatched against ($CmntToMsg $statuToMsg) on $dateToMsg. APOLLO DEC"; $this->smssend($arr, $mesg); $this->mailsend($arr, $mesg, $cerNamtToMsg); } else { diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index eacb498a..9abee9e9 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -1077,43 +1077,40 @@ if(count($qry)>0) public function add_student($Arr, $courseArr, $imagename, $imageSource, $size) { // print_r($courseArr);die(); -$Enrollment = $courseArr['EnrollmentID']; + $Enrollment = $courseArr['EnrollmentID']; - if($Enrollment !='') - { + if($Enrollment !='') + { -$this->db->select('*'); -$this->db->from('T_Student_CourseDetails'); -$this->db->where('EnrollmentID',$Enrollment); -$this->db->where('UniversityID',$courseArr['UniversityID']); -$qry=$this->db->get(); -$qry=$qry->result(); + $this->db->select('*'); + $this->db->from('T_Student_CourseDetails'); + $this->db->where('EnrollmentID',$Enrollment); + $this->db->where('UniversityID',$courseArr['UniversityID']); + $qry=$this->db->get(); + $qry=$qry->result(); -//print_r($this->db->last_query());die(); + //print_r($this->db->last_query());die(); -//echo count($qry);die(); + //echo count($qry);die(); -if(count($qry)>0) -{ - $result['addStudentStatus'] = false; - $result['message'] = "EnrollmentID Already Exists"; + if(count($qry)>0) + { + $result['addStudentStatus'] = false; + $result['message'] = "EnrollmentID Already Exists"; - return $result; + return $result; - -} -} + } + } - - - // echo $this->getBranchActiveStatusforStuAdd($courseArr['BranchID'])['branch_active_status'];exit(); - if ($this->getBranchActiveStatusforStuAdd($courseArr['BranchID']) ['branch_active_status'] === '1') { + // echo $this->getBranchActiveStatusforStuAdd($courseArr['BranchID'])['branch_active_status'];exit(); + if ($this->getBranchActiveStatusforStuAdd($courseArr['BranchID']) ['branch_active_status'] === '1') { // echo 'in';exit(); - if ($imageSource == '') { // add employee without image + if ($imageSource == '') { // add employee without image $imageNameDb = 'default.jpeg'; $Arr['ProfilePicPath'] = "student/" . $imageNameDb; // print_r($Arr); @@ -1144,7 +1141,7 @@ if(count($qry)>0) $userId = $Arr['MobileNumber']; $getUnivName = $this->getUnivName($courseArr['UniversityID'], $courseArr['BranchID']); $getCourseName = $this->getCourseName($courseArr['CourseID'], $courseArr['BranchID']); - $msg = "Thanks for registering with us for Course $getCourseName -$getUnivName. For more details, please login to www.apollodec.com. User ID :$userId, Password :abc123"; + $msg = "Thanks for registering with us for Course $getCourseName -$getUnivName. For more details, please login to www.apollodec.com. User ID :$userId, Password :abc123 APOLLO DEC"; $arr = $userId; $this->smssend($arr, $msg); $emailId = $Arr['EmailID']; @@ -1197,7 +1194,7 @@ if(count($qry)>0) $getUnivName = $this->getUnivName($courseArr['UniversityID'], $courseArr['BranchID']); $getCourseName = $this->getCourseName($courseArr['CourseID'], $courseArr['BranchID']); - $msg = "Thanks for registering with us for Course $getCourseName -$getUnivName. For more details, please login to www.apollodec.com. User ID :$userId, Password :abc123"; + $msg = "Thanks for registering with us for Course $getCourseName -$getUnivName. For more details, please login to www.apollodec.com. User ID :$userId, Password :abc123 APOLLO DEC"; $arr = $userId; $this->smssend($arr, $msg); $emailId = $Arr['EmailID']; @@ -1228,7 +1225,15 @@ if(count($qry)>0) } - +public function testsmsandmailflow(){ + $msg = "Thanks for registering with us for Course"; + $arr = "6369084112"; + $result['message'] = $this->smssend($arr, $msg); + $emailId = "sanjeev.p@venbainfotech.com"; + $sub = ' Apollo - test'; + $result['message2'] = $this->mailsend($emailId, $msg, $sub); + return $result; +} // check existing data while update public function check_update_exist($exceptId, $datas, $checkFor) { if ($checkFor == 'mobileNumber') {