loginpage
This commit is contained in:
parent
7f5e9613e3
commit
e4817da7eb
@ -191,6 +191,7 @@ $route['filterYear'] = 'Dashboard_Controller/filterYear';
|
||||
/*login page announcement*/
|
||||
$route['getLoginAnnouncementDetails'] = 'Login_Controller/getLoginAnnouncementDetails';
|
||||
$route['VerifyEmpOTP'] = 'Login_Controller/VerifyEmpOTP';
|
||||
$route['mailto'] = 'Login_Controller/mailto';
|
||||
|
||||
|
||||
/* status */
|
||||
|
||||
@ -30,6 +30,7 @@ class Login_Controller extends REST_Controller {
|
||||
$this->methods['login_post']['limit'] = 100; // 100 requests per hour per user/key
|
||||
$this->methods['login_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||
$this->load->model('Login_model', 'login_model');
|
||||
|
||||
$this->load->model('Announcement_model', 'announcement_model');
|
||||
|
||||
}
|
||||
@ -164,7 +165,31 @@ class Login_Controller extends REST_Controller {
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
public function mailto_post(){
|
||||
// echo('hi');
|
||||
$firstname = $this->post('firstname');
|
||||
$Comments =$this->post('Comments');
|
||||
$emailId =$this->post('emailId');
|
||||
$primaryPhone =$this->post('primaryPhone');
|
||||
|
||||
$getstudent = $this->login_model->mailto($firstname,$primaryPhone,$emailId,$Comments);
|
||||
|
||||
if ($getstudent)
|
||||
{
|
||||
// $getstudent['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getstudent, 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 changePasswordLogin_post()
|
||||
{
|
||||
|
||||
@ -947,7 +947,7 @@ BalFees.semyr');
|
||||
|
||||
//attendance save data start
|
||||
|
||||
$this->saveDataForExamAttendance($UID,$courseID=null,$batch,$requestedBy,$branchId,$center,$data,$Course_array,$result_array);
|
||||
// $this->saveDataForExamAttendance($UID,$courseID=null,$batch,$requestedBy,$branchId,$center,$data,$Course_array,$result_array);
|
||||
|
||||
//attendance end
|
||||
|
||||
|
||||
@ -452,7 +452,40 @@ class Login_model extends CI_Model
|
||||
}
|
||||
|
||||
|
||||
public function mailto($firstname,$primaryPhone,$emailId,$Comments){
|
||||
|
||||
// echo('SEND');
|
||||
$this->load->library('email');
|
||||
//SMTP & mail configuration
|
||||
$config = array(
|
||||
'protocol' => 'smtp',
|
||||
'smtp_host' => 'smtp.sendgrid.net',
|
||||
'smtp_port' => 587,
|
||||
'smtp_user' => 'apikey',
|
||||
'smtp_pass' => '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',
|
||||
'mailtype' => 'html',
|
||||
'charset' => 'utf-8'
|
||||
);
|
||||
$this->email->initialize($config);
|
||||
$this->email->set_mailtype("html");
|
||||
$this->email->set_newline("\r\n");
|
||||
|
||||
$htmlContent ='Name'.' '.$firstname.'<br>'. 'ContactNumber'.' '. $primaryPhone .'<br> '.'EmailID' .' '.$emailId .'<br>'.'Comments'.' '.$Comments;
|
||||
|
||||
$this->email->to('rajasamy1991@gmail.com');
|
||||
$this->email->from($emailId);
|
||||
$subj = 'Student Enquiry';
|
||||
$this->email->subject($subj);
|
||||
$this->email->message($htmlContent);
|
||||
//Send email 1
|
||||
$result = $this->email->send();
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function Emplogin($EmpID,$OTP,$Password)
|
||||
|
||||
@ -1252,7 +1252,9 @@ T_Students_Fees_PaidDetails.FeesId=T_Registration_Details.Student_Fee_Status_Id
|
||||
T_Students_Fees_PaidDetails.Installment='1'
|
||||
|
||||
left JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Registration_Details.BatchCode
|
||||
left JOIN T_StaffDetails ON T_StaffDetails.StaffID = T_StudentDetails.AdmittedBy
|
||||
|
||||
left join T_Login on T_Login.id =T_Students_Fees_PaidDetails.CreatedBy
|
||||
left JOIN T_StaffDetails ON T_StaffDetails.StaffID =T_Login.StaffID
|
||||
left JOIN T_Course_Fees_Details on T_Course_Fees_Details.ID=T_Registration_Details.FeeType and T_Course_Fees_Details.CourseID=T_Registration_Details.CourseID
|
||||
WHERE T_Registration_Details.RegistrationType = '".$regconst."' and T_Registration_Details.RegistrationMode='1' and T_Registration_Details.BranchCode= '".$branch."'";
|
||||
|
||||
@ -1294,8 +1296,8 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y'));
|
||||
|
||||
|
||||
$searchDetails =$query->result();
|
||||
//print_r( $this->db->last_query());
|
||||
//die();
|
||||
// print_r( $this->db->last_query());
|
||||
// die();
|
||||
|
||||
//print_r($searchDetails);die();
|
||||
|
||||
|
||||
BIN
Apollo/assets/images/ksou.jpg
Normal file
BIN
Apollo/assets/images/ksou.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
Apollo/assets/images/ksou1.jpg
Normal file
BIN
Apollo/assets/images/ksou1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
Apollo/assets/images/ku.jpg
Normal file
BIN
Apollo/assets/images/ku.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
Apollo/assets/images/ku1.jpg
Normal file
BIN
Apollo/assets/images/ku1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
@ -435,10 +435,65 @@ $scope.EmpLogin=function(myModel)
|
||||
}
|
||||
|
||||
}
|
||||
// $scope.tempModel = "default";
|
||||
// $scope.mailto = function(data)
|
||||
// {
|
||||
// console.log("hi");
|
||||
// console.log(data);
|
||||
// }
|
||||
|
||||
$scope.mailto = function(data){
|
||||
// console.log('hi');
|
||||
// console.log(data);
|
||||
|
||||
var firstname = data.firstname;
|
||||
var primaryPhone = data.primaryPhone;
|
||||
var emailId = data.emailId;
|
||||
var Comments =data.Comments;
|
||||
if((firstname == undefined)||(primaryPhone =="")||(emailId == undefined)||(Comments == undefined))
|
||||
{
|
||||
|
||||
swal("Please Enter all the Fields");
|
||||
}
|
||||
else{
|
||||
// swal("submit");
|
||||
var reg = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'mailto/',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
data: {firstname:firstname,primaryPhone:primaryPhone,emailId:emailId,Comments:Comments}
|
||||
// console.los(data);
|
||||
};
|
||||
}
|
||||
|
||||
$http(reg).then(function (response) {
|
||||
|
||||
console.log(response.data)
|
||||
|
||||
|
||||
if(response.data.updateStatus == true)
|
||||
{
|
||||
swal("Success",response.data.message, "success");
|
||||
}
|
||||
// swal(" Success", message, "success");
|
||||
// form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
firstname: "",
|
||||
primaryPhone: "",
|
||||
emailId: "",
|
||||
Comments:""
|
||||
};
|
||||
|
||||
swal("Success",response.data.message, "success");
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user