Commit f8807205 by Phạm Văn Đoan

tổ chức lại module

parent 646acfe5
...@@ -1065,6 +1065,9 @@ class Admin extends CI_Controller ...@@ -1065,6 +1065,9 @@ class Admin extends CI_Controller
$this->crud_model->sort_question($question_json); $this->crud_model->sort_question($question_json);
} }
/**
* Module Đơn vị/Tổ chức
*/
public function organization($param1 = "", $param2 = "") public function organization($param1 = "", $param2 = "")
{ {
if ($this->session->userdata('admin_login') != true) { if ($this->session->userdata('admin_login') != true) {
...@@ -1084,7 +1087,7 @@ class Admin extends CI_Controller ...@@ -1084,7 +1087,7 @@ class Admin extends CI_Controller
$this->session->set_flashdata('flash_message', get_phrase('data_deleted')); $this->session->set_flashdata('flash_message', get_phrase('data_deleted'));
redirect(site_url('admin/organization'), 'refresh'); redirect(site_url('admin/organization'), 'refresh');
} }
$page_data['page_name'] = 'organization'; $page_data['page_name'] = 'organization/organization';
$page_data['organization'] = get_phrase('organization'); $page_data['organization'] = get_phrase('organization');
$page_data['organization'] = $this->crud_model->get_organization($param2); $page_data['organization'] = $this->crud_model->get_organization($param2);
$this->load->view('backend/index', $page_data); $this->load->view('backend/index', $page_data);
...@@ -1096,12 +1099,12 @@ class Admin extends CI_Controller ...@@ -1096,12 +1099,12 @@ class Admin extends CI_Controller
redirect(site_url('login'), 'refresh'); redirect(site_url('login'), 'refresh');
} }
if ($param1 == "add_organ") { if ($param1 == "add_organ") {
$page_data['page_name'] = 'organ_add'; $page_data['page_name'] = 'organization/organ_add';
$page_data['organization'] = $this->crud_model->get_organization()->result_array(); $page_data['organization'] = $this->crud_model->get_organization()->result_array();
$page_data['page_title'] = get_phrase('add_organ'); $page_data['page_title'] = get_phrase('add_organ');
} }
if ($param1 == "edit_organ") { if ($param1 == "edit_organ") {
$page_data['page_name'] = 'organ_edit'; $page_data['page_name'] = 'organization/organ_edit';
$page_data['page_title'] = get_phrase('edit_organ'); $page_data['page_title'] = get_phrase('edit_organ');
$page_data['organization'] = $this->crud_model->get_organization()->result_array(); $page_data['organization'] = $this->crud_model->get_organization()->result_array();
$page_data['organ_id'] = $param2; $page_data['organ_id'] = $param2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment