public function home() { $rights = User_Right::getRights($this->session->userdata('access_level')); $menu_data = array(); $menus = array(); $counter = 0; foreach ($rights as $right) { $menu_data['menus'][$right->Menu] = $right->Access_Type; $menus['menu_items'][$counter]['url'] = $right->Menu_Item->Menu_Url; $menus['menu_items'][$counter]['text'] = $right->Menu_Item->Menu_Text; $menus['menu_items'][$counter]['offline'] = $right->Menu_Item->Offline; $counter++; } $this->session->set_userdata($menu_data); $this->session->set_userdata($menus); //Check if the user is a pharmacist. If so, update his/her local envirinment with current values if ($this->session->userdata('user_indicator') == "pharmacist") { $facility_code = $this->session->userdata('facility'); //Retrieve the Totals of the records in the master database that have clones in the clients! $today = date('m/d/Y'); $timestamp = strtotime($today); $data['scheduled_patients'] = Patient_Appointment::getAllScheduled($timestamp); } //Get CCC Stores if they exist $ccc_stores = CCC_store_service_point::getAllActive(); $this->session->set_userdata('ccc_store', $ccc_stores); $data['title'] = "webADT | System Home"; $data['content_view'] = "home_v"; $data['banner_text'] = "Home"; $data['link'] = "home"; $data['user'] = $this->session->userdata['full_name']; $this->load->view("template", $data); }
public function update($table = "") { $id = $this->input->post("source_id"); $name = $this->input->post("source_name"); if ($table == "transaction_type") { $desc = $this->input->post("desc"); $effect = $this->input->post("effect"); $data_array = array("name" => $name, "effect" => $effect, "`desc`" => $desc); } else { $data_array = array("name" => $name); } $this->db->where('id', $id); $this->db->update($table, $data_array); $ccc_stores = CCC_store_service_point::getAllActive(); $this->session->set_userdata('ccc_store', $ccc_stores); $this->session->set_userdata('msg_success', $this->input->post('source_name') . ' was Updated!'); $this->session->set_flashdata('filter_datatable', $this->input->post('source_name')); $this->session->set_userdata("link_id", "listing/" . $table); $this->session->set_userdata("linkSub", "settings/listing/" . $table); //Filter datatable redirect('settings_management'); }
public function index() { $ccc_stores = CCC_store_service_point::getAllActive(); $this->session->set_userdata('ccc_store', $ccc_stores); $this->listing(); }