diff --git a/application/controllers/Welcome.php b/application/controllers/Welcome.php index 042fe44..e5841ee 100644 --- a/application/controllers/Welcome.php +++ b/application/controllers/Welcome.php @@ -87,10 +87,10 @@ class Welcome extends CI_Controller { { $defaultId=$_POST['defaultId']; $data=$_POST['data']; - $hidd=$_POST['hidd']; + //$hidd=$_POST['hidd']; $this->session->set_userdata('dateYear',$data); - $this->session->set_userdata('dataId',$hidd); + $this->session->set_userdata('dataId',$defaultId); $getDepartment=$this->WelcomeModel->getDepartment($defaultId); //echo $this->db->last_query(); @@ -125,15 +125,58 @@ class Welcome extends CI_Controller { } } } + function sessionGetDepartment() + { + $sessionId=$_POST['sessionId']; + $sessionNameYear=$_POST['sessionNameYear']; + //$hidd=$_POST['hidd']; + + $this->session->set_userdata('dateYear',$sessionNameYear); + $this->session->set_userdata('dataId',$sessionId); + + $getDepartment=$this->WelcomeModel->getDepartment($sessionId); + //echo $this->db->last_query(); + if(isset($getDepartment) && $getDepartment->num_rows()>0) + { + foreach($getDepartment->result() as $list) + { + $depId=$list->depId; + $depName=$list->depName; + $depCode=$list->depCode; + $depImage=$list->depImage; + ?> + +
+ + + + + +
+

+ +

+
+
+

+ +
+ session->set_userdata('dateYear',$data); - $this->session->set_userdata('dataId',$dataId); - - $getDepartment=$this->WelcomeModel->getDepartment($dataId); + $this->session->set_userdata('dateYear',$nameYear); + $this->session->set_userdata('dataId',$clickId); + + $getDepartment=$this->WelcomeModel->getDepartment($sessionId); //echo $this->db->last_query(); if(isset($getDepartment) && $getDepartment->num_rows()>0) { @@ -162,4 +205,12 @@ class Welcome extends CI_Controller { } } } + function setSession() + { + $clickId=$_POST['clickId']; + $nameYear=$_POST['nameYear']; + + $this->session->set_userdata('dateYear',$nameYear); + $this->session->set_userdata('dataId',$clickId); + } } diff --git a/application/views/include/header.php b/application/views/include/header.php index 91d17d7..453b391 100644 --- a/application/views/include/header.php +++ b/application/views/include/header.php @@ -37,14 +37,14 @@ $dataId=$this->session->userdata('dataId');
- +
-