Server IP : 103.191.208.50 / Your IP : 216.73.216.53 Web Server : LiteSpeed System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64 User : celkcksm ( 1031) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, popen, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/celkcksm/banking.ncriptech.com/application/models/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php class Languages_model extends CI_Model{ public function add_language($data){ return $this->db->insert('ci_language', $data); } public function get_all_languages(){ $query = $this->db->get('ci_language'); return $result = $query->result_array(); } public function edit_language($data, $id){ $this->db->where('id', $id); $this->db->update('ci_language', $data); return true; } public function get_language_by_id($id){ $query = $this->db->get_where('ci_language', array('id' => $id)); return $result = $query->row_array(); } public function delete_language($id) { $this->db->delete('ci_language', array('id' => $id)); return true; } public function set_default_language($id){ $language = $this->get_language_by_id($id); $this->db->update('ci_general_settings', array('default_language' => $language['directory_name'])); // setting in General settings table $this->db->update('ci_language', array('is_default' => 0)); // setting all previous to 0 $this->db->where('id', $id); $this->db->update('ci_language', array('is_default' => 1)); return true; } } ?>