<?php

date_default_timezone_set('Asia/Jakarta');
$tanggal = mktime(date("m"), date("d"), date("Y"));
$tglsekarang = date("d-m-Y", $tanggal);
$tahunnow = date("Y", $tanggal);

if (isset($_POST['tahun'])) {
    $tahun = $_POST['tahun'];
} else {
    $tahun = $tahunnow;
};

?>
<style>
    .fontInput {
        font-size: 11px;
        font-family: arial;
    }

    .fontJudul {
        font-size: 12px;
        font-family: arial;
        color: dodgerblue;
        background: #000;

    }
</style>
<script>
    function formatNumber(num) {
        return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.')
    }
</script>

<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">

    <?php require('./layout/headerpage.php'); ?>

    <div class="container col-12 mb-4 pb-5">
        <div class="row mt-3">
            <div class="col-12">
                <div class="col-12">
                    <div class="card  mx-3">
                        <div class="timeline-header bg-primary py-2 pl-2">
                            <b class="text-light judul"><span class="bi bi-printer"></span> Cetak Rekapitulasi </h4>
                        </div>
                        <div class="card-body mb-1">
                            <div class="row mx-3 mt-0">
                                <div class="col-md-12">
                                    <div class="col-12 d-inline pl-2">
                                        <button onclick="frames['cetak'].print()" name="submit" class="btn btn-primary btn-xs mb-2 btn-rounded small px-2"> <i class="bi bi-printer"></i> CETAK</button>
                                        <a <?php echo $link->page('laporan/rekapitulasi/laporan_rekapitulasi_1'); ?> class="btn btn-primary btn-xs mb-2 btn-rounded small px-2"> <i class="bi bi-arrow-left-square"></i> KEMBALI</a>
                                        <?php //echo $link->exportXlsxLapRekap1('laporan/rekapitulasi/print_excel_1', $tahun); 
                                        ?>
                                    </div>
                                    <div class='col-md-12 pl-3 ml-2' style='background:#c3c3c3;  padding-top:50px; padding-bottom:50px'>
                                        <div class="mb-2" style='background:#fff; width:80%; margin:0 auto; padding:5px; height:1200px;'>
                                            <div class=''>
                                                <div style='background:#fff; width:100%;  border:0; height:900px;'>
                                                    <iframe name='cetak' src='view/laporan/rekapitulasi/print_1.php?tahun=<?php echo $tahun; ?>' style='border:0; padding:50px; width:100%; height:1200px;'></iframe>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>