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

// config
include './config/config.php';
if ($ses_login === TRUE) {
    $tahun = $_SESSION['tahun'];
    if ($tahun != "") {
        $data_cetak = db_cek_bbm($tahun);
        unset($_SESSION['tahun']);
        $site_title = "Laporan BBM";
        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">
            <br/>
            <div class="col-lg-2"></div>
            <div class="col-lg-8">
                <table class="identitas">
                    <tr>