update : penambahan dan perbaikan modul report saturssa
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
|
||||
class Lp_gomed_report extends CI_Controller {
|
||||
|
||||
//-----------start variables for check action access----------//
|
||||
public $vartambah = null;
|
||||
public $varedit = null;
|
||||
public $vardelete = null;
|
||||
public $varview = null;
|
||||
|
||||
public $parent = 'GOMED';
|
||||
public $title = 'REPORT';
|
||||
public $link = 'Lp_gomed_report';
|
||||
public $index = 'index.php/Lp_gomed_report';
|
||||
public $maincontent = 'gomed/report/';
|
||||
public $idmenu = '50';
|
||||
|
||||
//-----------start variables for check action access----------//
|
||||
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
$this->check_isvalidated();
|
||||
$this->load->helper(array('form', 'date'));
|
||||
}
|
||||
private function check_isvalidated(){
|
||||
if(! $this->session->userdata('validated')){
|
||||
redirect('index.php/ps_login');
|
||||
}
|
||||
//--------------start check access this form page-------------//
|
||||
$this->db->where('am_fk_rolegroup_id', $this->session->userdata('s_IDRoleGroup'));
|
||||
$this->db->where('am_fk_menu_id', $this->idmenu);
|
||||
$this->db->where('am_access', 1);
|
||||
$cekMenu = $this->db->get('access_menu');
|
||||
$rowcount = $cekMenu->num_rows();
|
||||
if($rowcount==0){
|
||||
redirect('index.php');
|
||||
}else{
|
||||
foreach ($cekMenu->result() as $cm)
|
||||
{
|
||||
$this->vartambah= $cm->am_create;
|
||||
$this->varedit = $cm->am_edit;
|
||||
$this->vardelete= $cm->am_delete;
|
||||
$this->varview = $cm->am_view;
|
||||
}
|
||||
}
|
||||
//--------------end check access this form page-------------//
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------PLEBITIS
|
||||
public function antreanmjknonsite(){
|
||||
$data['title'] = "GOMED - REPORT M-JKN / ONSITE";
|
||||
$data['parent'] = $this->parent;
|
||||
$data['link'] = $this->link;
|
||||
$data['main_content'] = $this->maincontent."/mjkn/v_mjkn";
|
||||
if(isset($_POST['tanggal'])) {
|
||||
$dateall = $this->input->post('tanggal');
|
||||
$pisah = explode ("-", $dateall);
|
||||
$awal = date("Y-m-d", strtotime($pisah[0]));
|
||||
$akhir = date("Y-m-d", strtotime($pisah[1]));
|
||||
}else{
|
||||
$awal = date("Y-m-d");
|
||||
$akhir = date("Y-m-d");
|
||||
}
|
||||
$data['awal'] = $awal;
|
||||
$data['akhir'] = $akhir;
|
||||
|
||||
$this->load->model('m_gomed_report_lp');
|
||||
$mjknall = $this->m_gomed_report_lp->mjkn();
|
||||
$this->load->vars('mjknall', $mjknall);
|
||||
|
||||
$this->load->model('m_gomed_report_lp');
|
||||
$onsiteall = $this->m_gomed_report_lp->onsite();
|
||||
$this->load->vars('onsiteall', $onsiteall);
|
||||
|
||||
$this->load->view('includes/template', $data);
|
||||
}
|
||||
|
||||
public function antreanmjkndetail(){
|
||||
$data['title'] = "GOMED - REPORT M-JKN DETAIL";
|
||||
$data['parent'] = $this->parent;
|
||||
$data['link'] = $this->link;
|
||||
$data['main_content'] = $this->maincontent."/detail/v_mjkn_detail";
|
||||
if(isset($_POST['tanggal'])) {
|
||||
$dateall = $this->input->post('tanggal');
|
||||
$pisah = explode ("-", $dateall);
|
||||
$awal = date("Y-m-d", strtotime($pisah[0]));
|
||||
$akhir = date("Y-m-d", strtotime($pisah[1]));
|
||||
}else{
|
||||
$awal = date("Y-m-d");
|
||||
$akhir = date("Y-m-d");
|
||||
}
|
||||
$data['awal'] = $awal;
|
||||
$data['akhir'] = $akhir;
|
||||
|
||||
$this->load->model('m_gomed_report_lp');
|
||||
$mjkndetail = $this->m_gomed_report_lp->mjkn_detail();
|
||||
$this->load->vars('mjkndetail', $mjkndetail);
|
||||
|
||||
$this->load->view('includes/template', $data);
|
||||
}
|
||||
|
||||
public function antreanmonsitedetail(){
|
||||
$data['title'] = "GOMED - REPORT ONSITE DETAIL";
|
||||
$data['parent'] = $this->parent;
|
||||
$data['link'] = $this->link;
|
||||
$data['main_content'] = $this->maincontent."/detail/v_onsite_detail";
|
||||
if(isset($_POST['tanggal'])) {
|
||||
$dateall = $this->input->post('tanggal');
|
||||
$pisah = explode ("-", $dateall);
|
||||
$awal = date("Y-m-d", strtotime($pisah[0]));
|
||||
$akhir = date("Y-m-d", strtotime($pisah[1]));
|
||||
}else{
|
||||
$awal = date("Y-m-d");
|
||||
$akhir = date("Y-m-d");
|
||||
}
|
||||
$data['awal'] = $awal;
|
||||
$data['akhir'] = $akhir;
|
||||
|
||||
$this->load->model('m_gomed_report_lp');
|
||||
$onsitedetail = $this->m_gomed_report_lp->onsite_detail();
|
||||
$this->load->vars('onsitedetail', $onsitedetail);
|
||||
|
||||
$this->load->view('includes/template', $data);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user