Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit c9b91030 authored by ping's avatar ping
Browse files

new_dashbord

parent d6af7e21
No related branches found
No related tags found
No related merge requests found
...@@ -98,4 +98,14 @@ class Dashboard_controller extends CI_Controller ...@@ -98,4 +98,14 @@ class Dashboard_controller extends CI_Controller
$json['html'] = $this->load->view('Dashboard/dashboard', $data, TRUE); $json['html'] = $this->load->view('Dashboard/dashboard', $data, TRUE);
$this->output->set_content_type('application/json')->set_output(json_encode($json)); $this->output->set_content_type('application/json')->set_output(json_encode($json));
} }
public function get_person()
{
/*get data from ips_personnel */
$json['person'] = $this->IPS_model->sort_current_personnel()->result(); //getjoin
$this->output->set_content_type('apppication/json')->set_output(json_encode($json['person']));
}
} }
...@@ -92,4 +92,14 @@ class Ponnapus_controller extends CI_Controller { ...@@ -92,4 +92,14 @@ class Ponnapus_controller extends CI_Controller {
$this->output->set_content_type('application/json')->set_output(json_encode($json)); $this->output->set_content_type('application/json')->set_output(json_encode($json));
} }
public function get_person()
{
/*get data from ips_personnel */
$json['person'] = $this->IPS_model->sort_current_personnel()->result(); //getjoin
$this->output->set_content_type('apppication/json')->set_output(json_encode($json['person']));
}
} }
...@@ -214,9 +214,9 @@ class IPS_model extends CI_Model ...@@ -214,9 +214,9 @@ class IPS_model extends CI_Model
$date_end = "'" . $_SESSION['year'] . "-01-1'"; $date_end = "'" . $_SESSION['year'] . "-01-1'";
$date_start = "'" . $_SESSION['year'] . "-12-31'"; $date_start = "'" . $_SESSION['year'] . "-12-31'";
$sql = "SELECT p.p_id ,p.p_birth_date,p.p_modified_date, p.p_first_name , p.p_last_name , p.p_pf_id, p.p_starting_date ,p.p_end_date $sql = "SELECT p.p_id ,p.p_birth_date, p.p_teacher_id, p.p_nt_id, p.p_modified_date, p.p_first_name , p.p_last_name ,p.p_pf_id ,p.p_starting_date ,p.p_end_date ,p.p_status
FROM {$this->ips_db}.ips_personnel p FROM {$this->ips_db}.ips_personnel p
WHERE p.p_status = 1 WHERE p.p_status = 1 OR p.p_status = 2
HAVING (p.p_starting_date<=$date_start)AND((p.p_end_date>=$date_end)OR(p.p_end_date IS NULL))"; HAVING (p.p_starting_date<=$date_start)AND((p.p_end_date>=$date_end)OR(p.p_end_date IS NULL))";
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query; return $query;
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment