load->library('session'); $this->load->library('form_validation'); $this->load->model('home/home_model'); if (!$this->ion_auth->in_group(array('admin'))) { if(!$this->ion_auth->coordinator_permission('master_icd')){ redirect('home/permission'); } } } public function index() { $designation="caregiver"; $company="Hospital Management System"; $emaildata['emaildata'] = array( 'name' => "Ujjwal", 'email' => "ujjwalbinary@gmail.com", 'password' => "123456", 'designation' => $designation, 'link' => base_url(), 'company' => $company ); $message= $this->load->view('email_template_management/email_caregiver',$emaildata,TRUE); // $from = array( // 'name' => 'HMS Admin', // 'email' => 'admin@hms.com' // ); //echo $message;die; $subject ='Caregiver Account confirmation'; send_email('ujjwal@sentientgeeks.com','ujjwal@sentientgeeks.com',$subject,$message); die; // $ssc="123-45-6789"; // $ssc_arr=explode("-",$ssc); // pre($ssc_arr); // echo "XXX-XX-".$ssc_arr[2]; // echo $ssc;die; $data = array(); // $data=address_info('1700 W Blancke St','07036'); // echo '
';print_r($data); echo '';die; //$this->load->helper('docExpireDate_helper'); //$output=docExpireDate(3,'rn_license','2020/12/12','2020/12/12'); // $output=getDocExpireDate(1,'lic'); // $output=count(NotificationView()); // pre($output); // die; $this->load->model('Master_icd_model'); $data['sdata'] = $this->Master_icd_model->name_list(); $this->load->view('home/dashboard',$data); // just the header file $this->load->view('namelist',$data); $this->load->view('home/master_assets'); $this->load->view('home/footer'); // just the header file } public function addnew() { // $this->load->library('form_validation'); $this->form_validation->set_rules('slot_name', 'Slot Name', 'trim|required|min_length[2]|max_length[100]|xss_clean'); if ($this->form_validation->run() == FALSE) { redirect("master_icd"); } else{ $this->load->model('Master_icd_model'); $this->Master_icd_model->save_name($_POST); $this->load->library('session'); $this->session->set_flashdata('added','The name is successfully updated'); redirect("master_icd"); } } public function deleteName() { $id = $_GET['id']; $this->load->model('Master_icd_model'); $this->Master_icd_model->delete_name($id); $this->load->library('session'); $this->session->set_flashdata('deleted','The name is successfully updated'); redirect("master_icd"); } public function editName(){ // echo $this->input->post($this->security->get_csrf_token_name());die; $data = array(); $user_id=$this->session->userdata('user_id'); $data=$this->home_model->get_menu($user_id); //var_dump($_POST); if(isset($_POST) && $_POST['submit']=='editSlot'){ // echo 7; $id = $_GET['id']; $this->load->model('Master_icd_model'); $this->Master_icd_model->edit_name($_POST,$id); $this->load->library('session'); $this->session->set_flashdata('edited','The name is successfully updated'); redirect("master_icd"); } $rwid=$_GET['id']; $data['id'] = $_GET['id']; $this->load->model('Master_icd_model'); $fldval = $this->Master_icd_model->getWherevalue($rwid); $data['value'] = $fldval[0]->name; //echo ''; print_r($data); echo '';die; $this->load->view('home/dashboard',$data); //$this->load->view('home/master_assets'); // just the header file $this->load->view('editname',$data); $this->load->view('home/footer'); // just the header file } public function duplicateCheck() { $this->load->model('Master_icd_model'); $res = $this->Master_icd_model->duplicate_entry($_POST); echo $res; } public function statusChange(){ $this->load->model('Master_icd_model'); $res = $this->Master_icd_model->status_change($_POST); echo $res; } public function getList() { $this->load->model('Master_icd_model'); //echo 'test';die; //echo ''; print_r($_REQUEST); echo '';die; $requestData = $_REQUEST; $start = $requestData['start']; $limit = $requestData['length']; $orderColumn=$requestData['order'][0]['column']; $orderType=$requestData['order'][0]['dir']; $search = $this->input->post('search')['value']; if (!empty($search)) { $data['name'] = $this->Master_icd_model->getNameByLimitBySearch($limit, $start, $search,$orderColumn, $orderType); } else { $data['name'] = $this->Master_icd_model->getNameByLimit($limit, $start, $orderColumn, $orderType); } $listCount = sizeof($data['name']); foreach ($data['name'] as $data) { static $slno = 1; $statusChk = ''; if($data->status == "0"){ $statusChk = ''; }else{ $statusChk = 'checked'; } $options1 = '' . lang('edit') .' '; // $options2 = ' ' . lang('delete') .''; $switch = ''; $info[] = array( $slno, $data->name, $switch, $options1 . ' ' . $options2 ); $slno++; } $csrf_name = $this->security->get_csrf_token_name(); $csrf_hash = $this->security->get_csrf_hash(); if ($listCount > 0) { $output = array( "draw" => intval($requestData['draw']), "recordsTotal" => count($this->Master_icd_model->name_list()), "recordsFiltered" => count($this->Master_icd_model->name_list()), "data" => $info ); } else { $output = array( // "draw" => 1, "recordsTotal" => 0, "recordsFiltered" => 0, "data" => [] ); $output[$csrf_name] = $csrf_hash; } echo json_encode($output); } } /* End of file accountant.php */ /* Location: ./application/modules/accountant/controllers/accountant.php */