<?php
$zroot = $_SESSION["zdir"];
$zcomp = $_SESSION["comp_" . $dbname];
$getcomp = mysqli_query($conn, "SELECT * FROM $zroot.`company`")or die(mysqli_error($conn));
$comp = mysqli_fetch_array($getcomp);
?>
<script>
    function myFunction() {
        window.print();
    }
</script>
<style>
    @media print {
        .noPrint {
            display:none;
        }
    }
</style>
<table class="" width="100%" id="head">
    <tr>
        <td style="font-size: 18px">
            <label style='font-size:20px;' ><? Echo $formname; ?></label>
        </td>
        <td style="text-align:right">
            <!--<button onclick="window.print();return false;" class="btn btn-primary noPrint">Print</button>-->
            <a onclick="window.location.href = '<?php echo $grid; ?>'" class="btn btn-primary noPrint">Go Back</a>
        </td>
    </tr>
<!--    <tr>
        <td style="font-size: 12px">
            <?php echo "<label style='font-size:15px;'>$comp[add1]$comp[add2]$comp[add3]</label>" ?>
        </td>
    </tr>-->
    
    <tr>
        <td style="font-size: 15px">
            <?php if ($mfdt != '') { ?>
                From Date -
                <?php echo $mfdt; ?>&nbsp;
            <?php } ?>
        </td>
    </tr>
    <tr>
        <td style="font-size: 15px">
            <?php if ($mtdt != '') { ?>
                To Date &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 
                <?php echo $mtdt; ?>
            <?php } ?>
        </td>
    </tr>

    <?php
    if ($dtype == 1) {
        $rtype = "Summary";
    } elseif ($dtype == 2) {
        $rtype = "Detail";
    } elseif ($dtype == '') {
        $rtype = '';
    }

    if ($rtype > 0) {
        ?>
        <tr>
            <td style="font-size: 15px">
                <?php Echo $rtype; ?>
            </td>
        </tr>
    <?php } ?>
</table>
