50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class LaporanDarah extends CI_Controller{
|
|
|
|
public $data_user = array();
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->load->model("ModelDarah");
|
|
}
|
|
|
|
function index()
|
|
{
|
|
$darah = $this->ModelDarah->get_data();
|
|
$data = array(
|
|
'body' => 'Laporan/darah',
|
|
'darah' => $darah
|
|
);
|
|
$this->load->view("index",$data);
|
|
}
|
|
function searchLaporanDarah()
|
|
{
|
|
$bulan = $this->input->post("bulan");
|
|
$tahun = $this->input->post("tahun");
|
|
// $bulan = "10";
|
|
// $tahun = "2021";
|
|
$blnthn = date("Y-m", strtotime($tahun."-".$bulan."-01"));
|
|
$darah = $this->ModelDarah->get_data_darah2($bulan,$tahun);
|
|
$data = array(
|
|
'darah' => $darah,
|
|
);
|
|
$this->load->view('Laporan/darah_detail', $data);
|
|
}
|
|
public function cetak(){
|
|
$bulan = $this->input->post("bulan");
|
|
$tahun = $this->input->post("tahun");
|
|
$data = array(
|
|
'bulan' => $bulan,
|
|
'tahun' => $tahun,
|
|
'data' => $this->ModelDarah->get_data_darah2($bulan,$tahun)
|
|
|
|
);
|
|
$this->load->view("Laporan/cetak_darah",$data);
|
|
|
|
}
|
|
|
|
}
|