GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.17.154.144 Web Server : Apache System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : jnclnmuac ( 1026) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/jnclnmuac/public_html/web/../grievance/application/logs/../models/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php /** * Model Class For Handling All DB Operations Related To Institutes * * @author Softpro India Pvt. Ltd. */ defined('BASEPATH') OR exit('No direct script access allowed'); class InstituteManagement extends CI_Model { function __construct() { parent::__construct(); $this->load->database(); } function getInstituteInfoById($clg_id) { $this->db->select('CLGM.clg_id,CLGM.clg_name,CLGM.clg_code,CLGM.clg_email,CLGM.clg_mobile,CLGM.clg_website_url,CLGM.clg_subdomain,' . 'CLGM.clg_logo_url,CLGM.clg_active_status,CLGM.clg_delete_status,CLGM.clg_updated_on_sa,CLGM.clg_addr_line_one,' . 'CLGM.clg_addr_line_two,CLGM.clg_addr_line_three,CLGM.clg_pincode,CLGM.clg_landmark,CLGM.clg_landline,' . 'CLGM.clg_alt_landline,CLGM.clg_alt_mobile,CLGM.clg_alt_email,CLGM.clg_added_on,CLGM.clg_updated_on_ca,' . 'CM.id cityId, CM.name cityName, SM.id stateId, SM.name as stateName,SAA.sa_name addedByAdmin, SAU.sa_name updatedByAdmin'); $this->db->from('college_mst CLGM'); $this->db->join('cities_mst CM', 'CLGM.clg_city=CM.id'); $this->db->join('states_mst SM', 'CM.state_id=SM.id'); $this->db->join('system_admin SAA', 'CLGM.clg_added_by=SAA.sa_id'); $this->db->join('system_admin SAU', 'CLGM.clg_updated_by_sa=SAU.sa_id'); $this->db->where('CLGM.clg_id', $clg_id); return $this->db->get(); } function updateInstituteInfo(array $instituteUpdatedInfo) { $this->db->where('clg_id', $instituteUpdatedInfo['clg_id']); return $this->db->update('college_mst', $instituteUpdatedInfo); } function getInstituteInfoByCode($code) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_code', $code); return $this->db->get(); } function getInstituteInfoByMobileNumber($instMobile) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_mobile', $instMobile); return $this->db->get(); } function getInstituteInfoByEmail($instEmail) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_email', $instEmail); return $this->db->get(); } function getInstituteInfoWebsiteURL($instWebsiteURL) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_website_url', $instWebsiteURL); return $this->db->get(); } function getInstituteInfoBySubdomain($instSubdomain) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_subdomain', $instSubdomain); return $this->db->get(); } function getInstituteInfoByURI($instFullURI) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where("clg_subdomain LIKE '%" . $instFullURI . "%'"); return $this->db->get(); } function isEmailSafeUpdate($instId, $instEmail) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_email', $instEmail); $this->db->where('clg_id != ' . $instId); $result = $this->db->get()->result(); if (sizeof($result)) { return FALSE; } else { return TRUE; } } function isMobileSafeUpdate($instId, $instMobile) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_mobile', $instMobile); $this->db->where('clg_id != ' . $instId); $result = $this->db->get()->result(); if (sizeof($result)) { return FALSE; } else { return TRUE; } } function isInstituteCodeSafeUpdate($instId, $instCode) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_code', $instCode); $this->db->where('clg_id != ' . $instId); $result = $this->db->get()->result(); if (sizeof($result)) { return FALSE; } else { return TRUE; } } function isSubDomainSafeUpdate($instId, $instSubdomain) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_subdomain', $instSubdomain); $this->db->where('clg_id != ' . $instId); $result = $this->db->get()->result(); if (sizeof($result)) { return FALSE; } else { return TRUE; } } function isWebsiteURLSafeUpdate($instId, $instWebsite) { $this->db->select("*"); $this->db->from('college_mst'); $this->db->where('clg_website_url', $instWebsite); $this->db->where('clg_id != ' . $instId); $result = $this->db->get()->result(); if (sizeof($result)) { return FALSE; } else { return TRUE; } } }