$cnip = $_POST['cnip'];
$thn_bbm = $_POST['txtthn_bbm'];
if ($id == "" && $bln != "" && $thn != "" && $thn_thn == "" && $cnip == "" && $thn_bbm == "") {
    $data_cek = db_cek_data($bln, $thn);
    $hsl = mysql_num_rows($data_cek);
    if ($hsl > 0) {
        $_SESSION['sasih'] = $bln;
        $_SESSION['tahun'] = $thn;
        $data['say'] = "ok";
    } else {
        $data['say'] = "NotOk";
    }
} elseif ($id != "" && $bln != "" && $thn != "" && $thn_thn == "" && $cnip == "" && $thn_bbm == "") {
    $pecah = explode("-", $id);
    $idna = $pecah[1];
    $data_cek = db_cek_data_pegawai($idna, $bln, $thn);
    $hsl = mysql_num_rows($data_cek);
    if ($hsl > 0) {
        $data_kendaraan = db_cek_kendaraan($idna);
        while ($data = mysql_fetch_array($data_kendaraan)) {
            $_SESSION['nopol'] = $data['nopol'];
            $_SESSION['nama_kendaraan'] = $data['nama'];
        }
        $nami = $pecah[0];
        $_SESSION['nami_karyawan'] = $nami;
        $_SESSION['sasih'] = $bln;
        $_SESSION['tahun'] = $thn;
        $_SESSION['id'] = $idna;
        $data['say'] = "ok";
    } else {
        $data['say'] = "NotOk";
<?php

// config
include './config/config.php';
if ($ses_login === TRUE) {
    $bulan = $_SESSION['sasih'];
    $tahun = $_SESSION['tahun'];
    $nip = $_SESSION['id'];
    if ($bulan != "" && $tahun != "" && $nip != "") {
        $data_cetak = db_cek_data_pegawai($nip, $bulan, $tahun);
        session_start();
        unset($_SESSION['sasih']);
        unset($_SESSION['tahun']);
        unset($_SESSION['id']);
        $site_title = "Laporan Perorangan";
        include './view/header_cetak.php';
        ?>
        <div class="row">
            <br/>
            <div class="col-lg-3"></div>
            <div class="col-lg-6" style="text-align: center">
                <b>
                    Rekapitulasi Pemeliharan Kendaraan Dinas Bermotor Roda Dua<br/>
                    BPS Kota Tasikmalaya Tahun Anggaran <?php 
        echo date("Y");
        ?>
                </b>
            </div>
            <div class="col-lg-3"></div>
        </div>
        <div class="row">