105 lines
3.6 KiB
PHP
105 lines
3.6 KiB
PHP
<?php
|
|
/**
|
|
* Created by Viual Studio.
|
|
* User: sriram
|
|
* Date: 3/19/18
|
|
* Time: 7:48 PM
|
|
*/
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Reregister_model extends CI_Model
|
|
{
|
|
|
|
|
|
public function getUniversityBatchDetails($branchId)
|
|
{
|
|
$this->db->select('UniversityID,UniversityName');
|
|
$this->db->where('IsActive','1');
|
|
$this->db->where('BranchCode',$branchId);
|
|
$this->db->order_by('UniversityID','ASC');
|
|
$unviversityDetails = $this->db->get(UNIVERSITY);
|
|
|
|
if($unviversityDetails->result()){
|
|
$result_university = array();
|
|
$result_university['universityStatus'] = true;
|
|
foreach ($unviversityDetails->result() as $row)
|
|
{
|
|
|
|
$university_array['universityID'] = $row->UniversityID;
|
|
$university_array['universityName'] = $row->UniversityName;
|
|
//$university_array['courseDetails']= $this->getCourseDetails($row->UniversityID,$branchId);
|
|
$university_array['batchDetails']= $this->getBatchDetails($row->UniversityID,$branchId);
|
|
$result_array[]=$university_array;
|
|
}
|
|
$result_university['univerSityDetails']= $result_array;
|
|
//$result_university['centerDetails'] = $this->getCenterDetails($branchId);
|
|
}
|
|
else {
|
|
$result_university['universityStatus'] = false;
|
|
$result_university['message'] = "No records found!";
|
|
$result_university['universityID'] = "";
|
|
$result_university['universityName'] = "";
|
|
$result_university['courseDetails']= "";
|
|
}
|
|
|
|
|
|
return $result_university;
|
|
|
|
}
|
|
|
|
public function getBatchDetails($UniversityID,$branchId)
|
|
{
|
|
$this->db->select("BatchID,BatchCode,BatchName,str_to_date( BatchDate,'%d-%m-%Y') as BD");
|
|
$this->db->from('T_BatchMaster');
|
|
$this->db->where('UniversityID',$UniversityID);
|
|
$this->db->where('IsActive',1);
|
|
$this->db->where('BranchCode',$branchId);
|
|
$this->db->order_by("BD","DESC");
|
|
$res = $this->db->get();
|
|
return $res->result();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getStudentListForPromoteBatchmodal($UID,$batch,$branchId)
|
|
{
|
|
$this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID');
|
|
$this->db->from('T_Students_Fees_Status');
|
|
$this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID and T_StudentDetails.IsActive = 1');
|
|
$this->db->join('T_Course_Fees_Details','T_Students_Fees_Status.CourseID = T_Course_Fees_Details.CourseID and T_Students_Fees_Status.FeesType = T_Course_Fees_Details.ID and T_Course_Fees_Details.ProgramType = "Y001" and T_Course_Fees_Details.FeesType = "F002" and T_StudentDetails.IsActive = 1' );
|
|
$this->db->where('T_Students_Fees_Status.BatchCode',$batch);
|
|
$this->db->where('T_Students_Fees_Status.BranchCode',$branchId);
|
|
|
|
|
|
$res = $this->db->get();
|
|
$data = $res->result();
|
|
return $data;
|
|
// $result_array = array();
|
|
// if(count($data) > 0)
|
|
// {
|
|
// $result_array = array();
|
|
// $prestu = "";
|
|
// foreach($data as $r)
|
|
// {
|
|
// if($prestu != $r->StudentID)
|
|
// {
|
|
// $studetdetails['StudentID'] = $r->StudentID;
|
|
// $studetdetails['MobileNumber'] = $r->MobileNumber;
|
|
// $studetdetails['Firstname'] = $r->Firstname;
|
|
// $studetdetails['Lastname'] = $r->Lastname;
|
|
// $studetdetails['EmailID'] = $r->EmailID;
|
|
// $studetdetails['ProfilePicPath'] = $r->ProfilePicPath;
|
|
// $studetdetails['EnrollmentID'] = $r->EnrollmentID;
|
|
// $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$courseID);
|
|
// $result_array[] = $studetdetails;
|
|
// $prestu = $r->StudentID;
|
|
// }
|
|
// }
|
|
|
|
// }
|
|
// return $result_array;
|
|
|
|
}
|
|
} |