コード例 #1
0
ファイル: pkk.php プロジェクト: syafiqazwan/pharmaco
function generateReport($type, $id, $year)
{
    ?>
  <table class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
  <?php 
    if ($type == 1) {
        if ($id == 11) {
            reportHeader(1);
            ?>
      <tbody>
          <?php 
            $query = "SELECT rkatp_kod,rkatp_desc,rkatp_class FROM ref_kat_produk\n                       WHERE rkatp_lab_applicable=1 AND rkatp_sample_applicable!=1 AND rkatp_status = 1\n                       ORDER BY rkatp_desc ASC";
            $result = selQuery($query);
            while ($row = mysqli_fetch_assoc($result)) {
                ?>
          <tr align="center">
            <td align="left">
              <div class="text-muted"><?php 
                echo $row['rkatp_desc'] . " - " . $row['rkatp_class'];
                ?>
</div>
            </td>
            <?php 
                for ($i = 1; $i <= 13; $i++) {
                    if ($i != 13) {
                        echo "<td>" . reportScreen($row['rkatp_kod'], $i, $year) . "</td>";
                    } else {
                        echo "<td><b>" . reportScreen($row['rkatp_kod'], $i, $year) . "</b></td>";
                    }
                }
                ?>
          </tr>
          <?php 
            }
            ?>
          <tr align="center">
            <td align="left"><b>Jumlah</b></td>
            <?php 
            for ($i = 1; $i <= 13; $i++) {
                echo "<td><b>" . reportScreen($row['rkatp_kod'], $i, $year, "total") . "</b></td>";
            }
            ?>
          </tr>
        </tbody>
      <?php 
        } else {
            if ($id == 12) {
                reportHeader(1);
            } else {
                if ($id == 13) {
                    reportHeader(1);
                } else {
                    if ($id == 14) {
                        reportHeader(1);
                    } else {
                        if ($id == 15) {
                            reportHeader(2);
                            ?>
      <tbody>
        <?php 
                            $query = "SELECT ru_kod,ru_short_kod,ru_desc FROM ref_unit,ref_seksyen\n                    WHERE ru_rsek_kod=rsek_kod AND rsek_rp_kod='3' AND ru_kod !='93'";
                            $result = selQuery($query);
                            while ($row = mysqli_fetch_assoc($result)) {
                                ?>
        <tr align="center">
          <td align="left"><?php 
                                echo $row['ru_short_kod'] . " - " . $row['ru_desc'];
                                ?>
</td>
          <?php 
                                for ($i = 1; $i <= 13; $i++) {
                                    if ($i != 13) {
                                        echo "<td>" . reportUnit($row['ru_kod'], $i, $year) . "</td>";
                                    } else {
                                        echo "<td><b>" . reportUnit($row['ru_kod'], $i, $year) . "</b></td>";
                                    }
                                }
                                ?>
        </tr>
        <?php 
                            }
                            ?>
        <tr align="center">
          <td align="left"><b>Jumlah</b></td>
          <?php 
                            for ($i = 1; $i <= 13; $i++) {
                                echo "<td><b>" . reportUnit($row['ru_kod'], $i, $year, "total") . "</b></td>";
                            }
                            ?>
        </tr>
      </tbody>
      <?php 
                        } else {
                            if ($id == 16) {
                                reportHeader(3);
                                ?>
      <tbody>
          <?php 
                                $query = "SELECT us_id,ref_unit_ru_kod,us_name FROM login_quest,login_user,ref_ac_lvl\n                      WHERE ral_id=lu_ref_ac\n                      AND lu_loginID=login_user_lu_loginID\n                      AND pr_group_pr_id=7\n                      AND (ral_desc='Pharmacist' OR ral_desc='Unit Head')";
                                $result = selQuery($query);
                                while ($row = mysqli_fetch_assoc($result)) {
                                    ?>
          <tr align="center">
            <td align="left">
              <?php 
                                    echo $row['us_name'];
                                    ?>
              <div class="text-muted"><?php 
                                    echo retriveLab($row['ref_unit_ru_kod'], 2);
                                    ?>
</div>
            </td>
            <?php 
                                    for ($i = 1; $i <= 13; $i++) {
                                        if ($i != 13) {
                                            echo "<td>" . reportStaff($row['us_id'], $i, $year) . "</td>";
                                        } else {
                                            echo "<td><b>" . reportStaff($row['us_id'], $i, $year) . "</b></td>";
                                        }
                                    }
                                    ?>
          </tr>
          <?php 
                                }
                                ?>
          <tr align="center">
            <td align="left"><b>Jumlah</b></td>
            <?php 
                                for ($i = 1; $i <= 13; $i++) {
                                    echo "<td><b>" . reportStaff($row['us_id'], $i, $year, "total") . "</b></td>";
                                }
                                ?>
          </tr>
        </tbody>
      <?php 
                            } else {
                                if ($id == 17) {
                                    reportHeader(1);
                                }
                            }
                        }
                    }
                }
            }
        }
    } else {
        if ($id == 1) {
        } else {
            if ($id == 2) {
            } else {
                if ($id == 3) {
                } else {
                    if ($id == 4) {
                    } else {
                        if ($id == 5) {
                        } else {
                            if ($id == 6) {
                            } else {
                                if ($id == 7) {
                                } else {
                                    if ($id == 8) {
                                    } else {
                                        if ($id == 9) {
                                        } else {
                                            if ($id == 10) {
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    ?>
  </table>
  <?php 
}
コード例 #2
0
ファイル: pkk_bkp.php プロジェクト: syafiqazwan/pharmaco
function generateReport($type, $id, $year)
{
    if ($type == 1) {
        if ($id == 5 || $id == 6 || $id == 7 || $id == 8 || $id == 11) {
            ?>
        <table class="table table-striped table-hover" cellspacing="0" width="100%">
          <thead>
            <tr class="primary" align="center">
              <td width="35%">Product Category</td>
              <td>Jan</td>
              <td>Feb</td>
              <td>Mar</td>
              <td>Apr</td>
              <td>Mei</td>
              <td>Jun</td>
              <td>Jul</td>
              <td>Ogos</td>
              <td>Sep</td>
              <td>Okt</td>
              <td>Nov</td>
              <td>Dis</td>
              <td><strong>Jumlah</strong></td>
            </tr>
          </thead>
          <tbody>
            <?php 
            $query = "SELECT rkatp_kod,rkatp_desc,rkatp_class FROM ref_kat_produk\n                       WHERE rkatp_lab_applicable=1 AND rkatp_sample_applicable!=1 AND rkatp_status = 1\n                       ORDER BY rkatp_desc ASC";
            $result = selQuery($query);
            $totalAll = 0;
            while ($row = mysqli_fetch_assoc($result)) {
                $kod = $row['rkatp_kod'];
                ?>
                 <tr align="center">
                   <td align="left"><?php 
                echo $row['rkatp_desc'] . " - " . $row['rkatp_class'];
                ?>
</td>

             <?php 
                include "pkk_report_include.php";
                ?>

                 </tr>
                 <?php 
            }
            ?>
           <tr align="center">
             <td align="left"><strong>Jumlah</strong></td>
             <?php 
            for ($i = 1; $i <= 12; $i++) {
                if ($id == 5) {
                    $query3 = "SELECT pp_pkk_screen_tkh FROM p_product\n                   WHERE MONTH(pp_pkk_screen_tkh) = '{$i}'\n                   AND YEAR(pp_pkk_screen_tkh) = '{$year}'";
                } else {
                    if ($id == 6) {
                        $query3 = "SELECT pp_pkk_evaluation_tkh FROM p_product\n                 WHERE MONTH(pp_pkk_evaluation_tkh) = '{$x}'\n                 AND YEAR(pp_pkk_evaluation_tkh) = '{$year}'";
                    } else {
                        if ($id == 7) {
                            $query3 = "SELECT a.pp_pkk_evaluation_tkh, b.tbb_kod, c.tbp_tkh_upd, c.tbp_id_kod\n                 FROM p_product a,t_bayaran_baucar b,t_bayaran_produk c\n                 WHERE a.pp_kod = c.tbp_id_kod\n                 AND c.tbp_tbb_kod = b.tbb_kod\n                 AND b.tbb_indicator = 'P'\n                 AND MONTH(a.pp_pkk_evaluation_tkh) = '{$x}'\n                 AND YEAR(a.pp_pkk_evaluation_tkh) = '{$year}'\n                 AND DATEDIFF(a.pp_pkk_evaluation_tkh,c.tbp_tkh_upd) <= 60";
                        } else {
                            if ($id == 8) {
                                $query3 = "SELECT a.pp_pkk_evaluation_tkh, b.tbb_kod, c.tbp_tkh_upd, c.tbp_id_kod\n                 FROM p_product a,t_bayaran_baucar b,t_bayaran_produk c\n                 WHERE a.pp_kod = c.tbp_id_kod\n                 AND c.tbp_tbb_kod = b.tbb_kod\n                 AND b.tbb_indicator = 'P'\n                 AND MONTH(a.pp_pkk_evaluation_tkh) = '{$x}'\n                 AND YEAR(a.pp_pkk_evaluation_tkh) = '{$year}'\n                 AND DATEDIFF(a.pp_pkk_evaluation_tkh,c.tbp_tkh_upd) > 60";
                            } else {
                                $query3 = "SELECT pp_pkk,pp_pkk_tkh\n                 FROM p_product\n                 WHERE MONTH(pp_pkk_tkh) = '{$x}'\n                 AND YEAR(pp_pkk_tkh) = '{$year}'\n                 AND pp_pkk='P'";
                            }
                        }
                    }
                }
                $result3 = selQuery($query3);
                ?>
             <td><strong><?php 
                echo mysqli_num_rows($result3);
                ?>
</strong></td>
             <?php 
            }
            ?>
             <td align="center"><strong><?php 
            echo $totalAll;
            ?>
</strong></td>
           </tr>
          </tbody>
        </table>
      <?php 
        } elseif ($id == 9) {
            //report by unit
            ?>
        <table class="table table-striped table-hover" cellspacing="0" width="100%">
          <thead>
            <tr class="primary" align="center">
              <td width="30%">Unit</td>
              <td>Jan</td>
              <td>Feb</td>
              <td>Mar</td>
              <td>Apr</td>
              <td>Mei</td>
              <td>Jun</td>
              <td>Jul</td>
              <td>Ogos</td>
              <td>Sep</td>
              <td>Okt</td>
              <td>Nov</td>
              <td>Dis</td>
              <td>Jumlah</td>
            </tr>
          </thead>
          <tbody>
            <?php 
            $query = "SELECT ru_kod,ru_short_kod,ru_desc FROM ref_unit,ref_seksyen\n                        WHERE ru_rsek_kod=rsek_kod AND rsek_rp_kod='3' AND ru_kod !='93'";
            $result = selQuery($query);
            while ($row = mysqli_fetch_assoc($result)) {
                ?>
            <tr align="center">
              <td align="left"><?php 
                echo $row['ru_short_kod'] . " - " . $row['ru_desc'];
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 1, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 2, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 3, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 4, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 5, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 6, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 7, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 8, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 9, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 10, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 11, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], 12, $year);
                ?>
</td>
              <td><?php 
                echo reportUnit($row['ru_kod'], "All", $year);
                ?>
</td>
            </tr>
            <?php 
            }
            ?>
          </tbody>
        </table>
      <?php 
        } elseif ($id == 10) {
            //report by staff
            ?>
      <table class="table table-striped table-hover" cellspacing="0" width="100%">
        <thead>
          <tr class="primary" align="center">
            <td width="20%">Pegawai</td>
            <td width="20%">Unit</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
        </thead>
        <tbody>
          <?php 
            $query = "SELECT us_id,ref_unit_ru_kod,us_name FROM login_quest,login_user,ref_ac_lvl\n                      WHERE ral_id=lu_ref_ac\n                      AND lu_loginID=login_user_lu_loginID\n                      AND pr_group_pr_id=7\n                      AND (ral_desc='Pharmacist' OR ral_desc='Unit Head')";
            $result = selQuery($query);
            while ($row = mysqli_fetch_assoc($result)) {
                ?>
          <tr align="center">
            <td align="left"><?php 
                echo $row['us_name'];
                ?>
</td>
            <td align="left"><?php 
                echo retriveLab($row['ref_unit_ru_kod']);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 1, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 2, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 3, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 4, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 5, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 6, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 7, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 8, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 9, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 10, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 11, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], 12, $year);
                ?>
</td>
            <td><?php 
                echo reportStaff($row['us_id'], "All", $year);
                ?>
</td>
          </tr>
          <?php 
            }
            ?>
        </tbody>
      </table>
      <?php 
        }
    } elseif ($type == 2) {
        //sample report
        if ($id == 13 || $id == 14 || $id == 15) {
            ?>
      <table class="table table-striped table-hover" cellspacing="0" width="100%">
        <thead>
          <tr class="primary" align="center">
            <td>Unit/Seksyen</td>
            <td>Kategori</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
        </thead>
        <tbody>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left" rowspan="7">Unit/Seksyen</td>
            <td align="left">Pendaftaran</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">ADR</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Aduan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Pengawasan</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Rayuan DCA</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Lain-Lain</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
          <tr align="center">
            <td align="left">Jumlah</td>
            <td>Jan</td>
            <td>Feb</td>
            <td>Mar</td>
            <td>Apr</td>
            <td>Mei</td>
            <td>Jun</td>
            <td>Jul</td>
            <td>Ogos</td>
            <td>Sep</td>
            <td>Okt</td>
            <td>Nov</td>
            <td>Dis</td>
            <td>Jumlah</td>
          </tr>
        </tbody>
      </table>
      <?php 
        } elseif ($id == 16) {
            ?>
        <table class="table table-striped table-hover" cellspacing="0" width="100%">
          <thead>
            <tr class="primary" align="center">
              <td>&nbsp;</td>
              <td>Jan</td>
              <td>Feb</td>
              <td>Mar</td>
              <td>Apr</td>
              <td>Mei</td>
              <td>Jun</td>
              <td>Jul</td>
              <td>Ogos</td>
              <td>Sep</td>
              <td>Okt</td>
              <td>Nov</td>
              <td>Dis</td>
              <td>Jumlah</td>
            </tr>
          </thead>
          <tbody>
            <tr align="center">
              <td align="left">Bilangan</td>
              <td><?php 
            echo reportCOA(1, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(2, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(3, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(4, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(5, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(6, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(7, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(8, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(9, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(10, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(11, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA(12, $year);
            ?>
</td>
              <td><?php 
            echo reportCOA("All", $year);
            ?>
</td>
            </tr>
          </tbody>
        </table>
      <?php 
        }
    }
}