load->database(); } function getbasicInfo(){ $query = $this->db->get('website_settings')->row(); return $query; } function savebasicInfo($post){ if($post['title']!=""){ $data['title']=$post['title']; } if($post['address']!=""){ $data['address']=$post['address']; } if($post['phone']!=""){ $data['phone']=$post['phone']; } if($post['fax']!=""){ $data['fax']=$post['fax']; } if($post['emergency']!=""){ $data['emergency']=$post['emergency']; } if($post['support']!=""){ $data['support']=$post['support']; } if($post['email']!=""){ $data['email']=$post['email']; } if($post['late_fee_charge']!=""){ $data['late_fee_charge']=$post['late_fee_charge']; } if($post['damage_fee']!=""){ $data['damage_fee']=$post['damage_fee']; } if($post['facebook_id']!=""){ $data['facebook_id']=$post['facebook_id']; } if($post['twitter_id']!=""){ $data['twitter_id']=$post['twitter_id']; } if($post['google_id']!=""){ $data['google_id']=$post['google_id']; } if($post['youtube_id']!=""){ $data['youtube_id']=$post['youtube_id']; } if($post['skype_id']!=""){ $data['skype_id']=$post['skype_id']; } if($post['about_us']!=""){ $data['about_us']=$post['about_us']; } //pre($data);die; $this->db->where('id', '1'); $this->db->update('website_settings', $data); return $this->db->affected_rows(); } function getBannerList(){ $this->db->where('status', '1'); $query = $this->db->get('website_banner')->result(); return $query; } function getBannerByid($id){ $this->db->where('id', $id); $this->db->where('status', '1'); $query = $this->db->get('website_banner')->row(); return $query; } function addBanner($data){ $this->db->insert('website_banner', $data); return $this->db->insert_id(); } function updateBanner($data,$id){ $this->db->where('id', $id); $this->db->update('website_banner', $data); return $this->db->affected_rows(); } function addContent($data){ $this->db->insert('website_content', $data); return $this->db->insert_id(); } function getContentList(){ $this->db->where('status', '1'); $query = $this->db->get('website_content')->result(); return $query; } function getContentByid($id){ $this->db->where('id', $id); $this->db->where('status', '1'); $query = $this->db->get('website_content')->row(); return $query; } function updateContent($data,$id){ $this->db->where('id', $id); $this->db->update('website_content', $data); return $this->db->affected_rows(); } function saveContactMessage($data){ $this->db->insert('website_contact_message', $data); return $this->db->insert_id(); } function caregiver_skill_list(){ $this->db->where('status','1'); $this->db->order_by('list_order', 'ASC'); $query = $this->db->get('master_cg_skills'); return $query->result(); } /* | our specialities section */ function getSpecialitiesList(){ $this->db->where('status', '1'); $query = $this->db->get('our_specialities')->result(); return $query; } function getSpecialitiesByid($id) { $this->db->where('id', $id); $this->db->where('status', '1'); $query = $this->db->get('our_specialities')->row(); return $query; } function updateSpecialities($data,$id){ $this->db->where('id', $id); $update=$this->db->update('our_specialities', $data); if($update) { return true; } else { return false; } } function getTopNursesList(){ $this->db->where('status', '1'); $query = $this->db->get('website_nurses')->result(); return $query; } function getTopNursesByid($id){ $this->db->where('id', $id); $this->db->where('status', '1'); $query = $this->db->get('website_nurses')->row(); return $query; } function updateTopNurses($data,$id){ $this->db->where('id', $id); $update=$this->db->update('website_nurses', $data); if($update){ return true; }else{ return false; } } //______________________OLD______________________________// /* function name_list(){ $this->db->order_by('id', 'DESC'); $query = $this->db->get('master_icd'); return $query->result(); } function save_name($post) { $slot_name = $post['slot_name']; $data = array( 'name' => $slot_name, ); $this->db->insert('master_icd', $data); } function delete_name($id) { $this->db->where('id', $id); $this->db->delete('master_icd'); } function edit_name($post,$id){ $data = array( 'name' => $post['slotEditname'], ); $this->db->where('id', $id); $this->db->update('master_icd', $data); } function duplicate_entry($post) { $val = $post['val']; if (isset($post['currId'])) { $currId = $post['currId']; $query1 = $this->db->get_where('master_icd', array('id' => $currId)); $exceptVal = $query1->result()[0]->name; // SELECT * FROM `master_access_assessment` WHERE name='12Hours' AND name!='vatibra' $this->db->where('name', $val); $this->db->where('name !=', $exceptVal); $query = $this->db->get('master_icd'); } else{ $query = $this->db->get_where('master_icd', array('name' => $val)); } if($query->num_rows() > 0) { return 'exist'; } else{ return 'notexist'; } } function status_change($post){ $id = $post['id']; $stat = $post['val']; $this->db->set('status', $stat); $this->db->where('id', $id); $this->db->update('master_icd'); if($stat == '1') { return 'Status set active'; } else{ return 'Status set deactive'; } } function getWherevalue($id){ $this->db->where('id', $id); $query = $this->db->get('master_icd'); return $query->result(); } function getNameBysearch($search,$orderColumn, $orderType) { if($orderColumn==0) $this->db->order_by('id', $orderType); else if($orderColumn==1) $this->db->order_by('name', $orderType); else if($orderColumn==2) $this->db->order_by('status', $orderType); $this->db->like('id', $search); $this->db->or_like('name', $search); $this->db->or_like('status', $search); $query = $this->db->get('master_icd'); return $query->result(); } function getNameByLimit($limit, $start, $orderColumn, $orderType) { if($orderColumn==0) $this->db->order_by('id', $orderType); else if($orderColumn==1) $this->db->order_by('name', $orderType); else if($orderColumn==2) $this->db->order_by('status', $orderType); $this->db->limit($limit, $start); $query = $this->db->get('master_icd'); return $query->result(); } function getNameByLimitBySearch($limit, $start, $search) { $this->db->like('id', $search); $this->db->order_by('id', 'desc'); $this->db->or_like('name', $search); $this->db->or_like('status', $search); $this->db->limit($limit, $start); $query = $this->db->get('master_icd'); return $query->result(); } */ }