<?php
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$zroot = $_SESSION["zdir"];
$zcomp = $_SESSION["comp_" . $dbname];
$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);

$vouch = $_GET['vouchno'];
$imglogo = $_GET["image"];

$cond = '';
$lcond = '';
$formname = "Invoice";
$tourname = $_SESSION['tourname'];
$tourcode = $_SESSION['tourcode'];
$tourcond = "AND tourno = '$tourcode'";
$tourtype = $_SESSION["tourtype"];
$crbrcpbpnp = $_SESSION["crbrcpbpnp"];

$maindb = 'bookform';

$getqry = mysqli_query($conn, "SELECT *, DATE_FORMAT(`vouchdt`, '%d-%m-%Y')as mydt, 
                                             DATE_FORMAT(`depdate`, '%d-%m-%Y')as depdate   FROM `$maindb`
                                             WHERE vouchno='$vouch' AND tourno='$tourcode' ORDER BY `vouchno`") or die(mysqli_error($conn));
$getdata = mysqli_fetch_array($getqry);

$getpass = mysqli_query($conn, "SELECT * FROM visaform WHERE vregnno = '$getdata[regnno]' and tour='$tourcode' and cancdate = '0000-00-00' ") or die(mysqli_error($conn));
//print table($getpass);
//die();

$getcomp2 = mysqli_query($conn, "SELECT * FROM $zroot.`company` WHERE code = '$zcomp' ") or die(mysqli_error($conn));
$comp2 = mysqli_fetch_array($getcomp2);

$compname = $comp2['compname'];
$headerimg = $comp2['reportheadimg'];
$footerimg = $comp2['footerimg'];

include("includes/linkshead.php");
?>

<!DOCTYPE HTML>
<html lang="en-US">
    <style>
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            /*background-color: #FAFAFA;*/
            font: 12pt "Arial";
        }

        @media print {
            .noprint {
                display: none;
            }
        }

        * {
            box-sizing: border-box;
            -moz-box-sizing: border-box;
        }

        .page {
            width: 210mm;
            min-height: 290mm;
            padding: 4mm;
            margin: 5mm auto;
            border: 1px #D3D3D3 solid;
            border-radius: 2px;
            /*background: white;*/

        }

        .subpage {
            padding: 0cm;
            /*        border: 1px solid;*/
            height: 280mm;
            outline: 2cm #ffffff solid;
        }

        @page {
            size: A4;
            margin: 0;
        }

        @media print {
            .noPrint {
                display: none;
            }

            html,
            body {
                width: 210mm;
                height: 290mm;
            }

            .page {
                margin: 0;
                border: initial;
                border-radius: initial;
                width: initial;
                min-height: initial;
                box-shadow: initial;
                background: initial;
                page-break-after: always;
            }
        }

        .numeric {
            text-align: right;
        }

        .rnone {
            border-right: none;
        }

        .lnone {
            border-left: none;
        }

        .outer {
            width: 100%;
            border-collapse: collapse;
            border: 1px solid black;
        }

        .center {
            text-align: center;
        }

        .B {
            padding-left: 15px;
        }


        .d {
            border-collapse: inherit;
        }


        .w {
            width: 40%;
        }

        hr.sk1 {
            border: 2px solid black;
        }

        .f12 {
            font-size: 12px;
        }
        .f13 {
            font-size: 13px;
        }

        .f14 {
            font-size: 14px;
        }

        .table>tbody>tr>td {
            padding: 2px;
            font-size: 13px;
            border-top: 0px;
        }

        .skdiv {
            width: 50%;
            margin: auto;
        }

        .fixed-height-table {
            height: 300px;
            /* Set the height you want */
            overflow: hidden;
            /* Hide overflow to maintain fixed height */
        }

        .fixed-height-table td,
        .fixed-height-table th {
            height: 50px;
            /* Set the height of the table cells */
        }

        .inner-table {
            height: 100%;
            /* Ensure the inner table takes full height */
        }

        .inner-table td,
        .inner-table th {
            height: 20px !important;
            /* Set the height of the inner table cells */
        }
    </style>
</head>


<body id="main_container">
    <div class="book tablerep" style="padding: 5px;">

        <button onclick="window.print();return false;" class="btn btn-primary noPrint"
                style="width: 150px;height:35px;background-color: #A0B1BA;color:white;">Print</button>
        &nbsp;&nbsp;&nbsp;
        <button class="btn btn-primary goBack noPrint" onclick="window.close()"
                style="width: 150px;height:35px;background-color: white;color:#A0B1BA;padding-left: 1%">Go Back</button>
        <div class="page">
            <div class="">

                <?php if ($imglogo == "Yes") { ?>
                    <div class="skdiv">
                        <img style="height:100%;width:100%;" src="<?php echo $headerimg; ?>">
                    </div>
                <?php } else { ?>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <!-- <br>
                    <br>
                    <br>
                    <br> -->
                <?php
                }
                if ($crbrcpbpnp == 1) {
                    $bkvch = $getdata['voucher'];
                } else {
                    $bkvch = $getdata['regnno'];
                }
                ?>

                <h5 style="border-bottom: 1px solid black;width:98px">Booking Copy </h5>
                <table class="table table-borderless" style="width:100%;padding:2px;">
                    <tbody>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Booking Id </td>
                            <td style="width:60%;text-align:left" class="f14"> : <b>
                                    <?php echo $bkvch; ?></b></td>
                            <td style="width:15%;text-align:left" class="f14">Booking Date </td>
                            <td style="width:15%" class="f14"> : <b> <?php echo $getdata['mydt']; ?></b></td>
                        </tr>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Name </td>
                            <td style="width:90%;text-align:left" colspan="3" class="f12"> : <b>
                                    <?php echo $getdata['haji'] . " " . $getdata["surname"] . " - " . $getdata["tel"]; ?></b></td>
                        </tr>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Pax Group </td>
                            <td style="width:60%;text-align:left" colspan="3" class="f14"> : <b><?php echo $getdata['groupno']; ?></b></td>
                        </tr>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Class</td>
                            <td style="width:60%;text-align:left" class="f14"> : <b>
                                    <?php echo $getdata['batchno']; ?></b></td>
                            <td style="width:15%;text-align:left" class="f14">Dep. Date </td>
                            <td style="width:15%" class="f14"> : <b> <?php echo $getdata['depdate']; ?></b></td>
                        </tr>
                        <?php if ($getdata['gstno'] != "") { ?>
                            <tr width="100%">
                                <td style="width:10%" class="f14">GST No.</td>
                                <td style="width:60%;text-align:left" class="f14"> : <b>
                                        <?php echo $getdata['gstno']; ?></b></td>
                                <td style="width:15%;text-align:right" class="f14"></td>
                                <td style="width:15%" class="f14"></td>
                            </tr>
                        <?php } ?>
                    </tbody>
                </table>
                <br>
                <table class="fixed-height-table" style="width:100%">
                    <tr class="">
                        <td style="width:50%;">
                            <table style="width:100%;border: 1px solid black;height:400px" class="table inner-table ">
                                <thead>
                                <th
                                    style="color:black;text-align:center;font-size:15px;border-bottom: 1px solid black;">
                                    <b>Passengers Details</b></th>
                                </thead>
                                <tbody>
                                    <tr width="100%" style="height:15px !important">
                                        <td style="color: white;"> &nbsp; </td>
                                    </tr>
                                    <?php
                                    while ($row = mysqli_fetch_array($getpass)) {

                                        if ($row['chkwhlchair'] == 1) {
                                            $showchkwhlchair = '- <span style="font-size:18px;">♿</span>';
                                        } else {
                                            $showchkwhlchair = "";
                                        }

                                        $ctr++;
                                        $name = $row['surname'] . ' ' . $row['lastname'] . ' ' . $row['midname'] . ' ' . $row['suffix'];
                                        ?>
                                        <tr width="100%" >
                                            <td class="f12"><?= $ctr; ?>) &nbsp;<?= $name . " " . $showchkwhlchair ?></td>
                                        </tr>
                                        <?php
                                    }

                                    $ln = 16;
                                    if ($getdata['fullamt_2'] > 0) {
                                        $ln++;
                                    }
                                    if ($getdata['fullamt_3'] > 0) {
                                        $ln++;
                                    }

                                    if ($tourtype != "Haj") {
                                        $ln++;
                                    }

                                    if ($ctr <= $ln) {
                                        for ($i = $ctr; $i < $ln; $i++) {
                                            ?>
                                            <tr width="100%">
                                                <td>&nbsp;</td>
                                            </tr>
                                            <?php
                                        }
                                    }
                                    ?>
                                </tbody>
                            </table>
                        </td>

                        <td style="width:50%">
                            <table style="width:100;border: 1px solid black;" class="table inner-table">
                                <thead>
                                <th style="color:black;text-align:center;font-size:15px;border-bottom: 1px solid black;"
                                    colspan="5"><b>Details</b></th>
                                </thead>
                                <tbody>
                                    <tr width="100%"
                                        style="background-color:lightgrey !important;height:20px !important">
                                        <td style="width:20%;"> </td>
                                        <td style="width:20%;text-align:right;color:black"> Ticket </td>
                                        <td style="width:22%;text-align:right;color:black"> Tour</td>
                                        <td style="width:13%;text-align:center;color:black">No. </td>
                                        <td style="width:25%;text-align:right;color:black">Amount </td>
                                    </tr>

                                    <tr width="100%">
                                        <td style="width:30%;">1<?php echo ")" ?> Adult </td>
                                        <td style="width:16%;text-align:right"> <?= $getdata['full'] ?> </td>
                                        <td style="width:16%;text-align:right"> <?= $getdata['full2'] ?></td>
                                        <td style="width:13%;">&nbsp;&nbsp; x <?= $getdata['fullno'] ?>&nbsp;&nbsp;=
                                        </td>
                                        <td style="width:25%;text-align:right"> <?= $getdata['fullamt'] ?> </td>
                                    </tr>
                                    <?php
                                    $srno = 1;
                                    if ($getdata['fullamt_2'] != 0) {
                                        $srno++;
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%;"><?= $srno . ')' ?> Adult 2 </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['full_2'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['full2_2'] ?></td>
                                            <td style="width:13%;">&nbsp;&nbsp; x <?= $getdata['fullno_2'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['fullamt_2'] ?> </td>
                                        </tr>

                                        <?php
                                    }
                                    if ($getdata['fullamt_3'] != 0) {
                                        $srno++;
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%;"><?= $srno . ')' ?> Adult 3 </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['full_3'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['full2_3'] ?></td>
                                            <td style="width:13%;">&nbsp;&nbsp; x <?= $getdata['fullno_3'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['fullamt_3'] ?> </td>
                                        </tr>

                                        <?php
                                    }

                                    $srno++;

                                    if ($getdata["halfamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ')' ?> Chd w bd</td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['half'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['half2'] ?></td>
                                            <td style="width:13%;">&nbsp;&nbsp; x <?= $getdata['halfno'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['halfamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;" colspan="5"><?= $srno . ')' ?> Child with bed</td>
                                        </tr>
                                        <?php
                                    }

                                    $srno++;

                                    if ($getdata["childwobamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ')' ?> Chd wo bd</td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['childwob'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['childwob2'] ?></td>
                                            <td style="width:13%">&nbsp;&nbsp; x <?= $getdata['childwobno'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['childwobamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;" colspan="5"><?= $srno . ')' ?> Child w/o bed </td>

                                        </tr>
                                        <?php
                                    }

                                    $srno++;

                                    if ($getdata["infamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ')' ?> Infant </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['inf'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['inf2'] ?></td>
                                            <td style="width:13%">&nbsp;&nbsp; x <?= $getdata['infno'] ?>&nbsp;&nbsp;=</td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['infamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;" colspan="5"><?= $srno . ')' ?> Infant </td>
                                        </tr>
                                        <?php
                                    }

                                    $srno++;

                                    if ($getdata["visachgamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ')' ?> Visa Chgs.</td>
                                            <td style="width:16%;text-align:right"></td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['visachg'] ?> </td>
                                            <td style="width:20%">&nbsp;&nbsp; x <?= $getdata['visachgno'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:20%;text-align:right"> <?= $getdata['visachgamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;"><?= $srno . ')' ?> Visa Chgs.</td>
                                            <td style="width:15%"> &nbsp; </td>
                                            <td style="width:15%"> &nbsp; </td>
                                            <td style="width:20%"> &nbsp; </td>
                                            <td style="width:25%;text-align:right"> &nbsp; </td>
                                        </tr>
                                        <?php
                                    }
                                    $srno++;

                                    if ($getdata["airtaxamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ') ' .  $getdata['lblmisc']?>.</td>
                                            <td style="width:16%;text-align:right"></td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['airtax'] ?> </td>
                                            <td style="width:20%">&nbsp;&nbsp; x <?= $getdata['airtaxno'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:20%;text-align:right"> <?= $getdata['airtaxamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;"><?= $srno . ') ' . $getdata['lblmisc']?>.</td>
                                            <td style="width:15%"> &nbsp; </td>
                                            <td style="width:15%"> &nbsp; </td>
                                            <td style="width:20%"> &nbsp; </td>
                                            <td style="width:25%;text-align:right"> &nbsp; </td>
                                        </tr>
                                        <?php
                                    }
                                    $srno++;

                                    if ($getdata["farediffamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ')' ?> Fares Diff. </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['farediff'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['farediff2'] ?></td>
                                            <td style="width:15%">&nbsp;&nbsp; x <?= $getdata['farediffno'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['farediffamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;" colspan="5"><?= $srno . ')' ?> Fares Diff. </td>
                                        </tr>
                                        <?php
                                    }
                                    $srno++;

                                    if ($getdata["cancelchgamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%;"><?= $srno . ')' ?> Cancel Chgs.</td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['cancelchg'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['cancelchg2'] ?></td>
                                            <td style="width:13%">&nbsp;&nbsp; x <?= $getdata['cancelchgno'] ?>&nbsp;&nbsp;=
                                            </td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['cancelchgamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>
                                        <tr width="100%">
                                            <td style="width:30%;" colspan="5"><?= $srno . ')' ?> Cancel Charges</td>
                                        </tr>
                                        <?php
                                    }

                                    $srno++;
                                    if ($getdata["discamt"] != 0) {
                                        ?>
                                        <tr width="100%">
                                            <td style="width:30%"><?= $srno . ')' ?> Discount </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['disc'] ?> </td>
                                            <td style="width:16%;text-align:right"> <?= $getdata['disc2'] ?></td>
                                            <td style="width:13%">&nbsp;&nbsp; x <?= $getdata['discno'] ?>&nbsp;&nbsp;=</td>
                                            <td style="width:25%;text-align:right"> <?= $getdata['discamt'] ?> </td>
                                        </tr>
                                    <?php } else { ?>

                                        <?php if ($tourtype != "Haj") { ?>
                                            <tr width="100%">
                                                <td style="width:30%;" colspan="5"><?= $srno . ')' ?> Discount </td>
                                            </tr>
                                        <?php } ?>

                                    <?php } ?>

                                    <tr width="100%">
                                        <td style="width:30%"> Total Amount </td>
                                        <td style="width:15%"></td>
                                        <td style="width:15%"></td>
                                        <td style="width:15%"></td>
                                        <td style="width:25%;text-align:right"><?= $getdata['nettot'] ?></td>
                                    </tr>
                                    <tr width="100%">
                                        <td style="width:30%">CGST </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> <?= $getdata['cgstno'] ?> &nbsp;&nbsp; % </td>
                                        <td style="width:25%;text-align:right"> <?= $getdata['cgstamt'] ?> </td>
                                    </tr>
                                    <tr width="100%">
                                        <td style="width:30%">SGST </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> <?= $getdata['sgstno'] ?> &nbsp;&nbsp; % </td>
                                        <td style="width:25%;text-align:right"> <?= $getdata['sgstamt'] ?> </td>
                                    </tr>
                                    <tr width="100%">
                                        <td style="width:30%">IGST </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> <?= $getdata['igstno'] ?> &nbsp;&nbsp; % </td>
                                        <td style="width:25%;text-align:right"> <?= $getdata['igstamt'] ?> </td>
                                    </tr>
                                    <tr width="100%">
                                        <td style="width:30%">TCS </td>
                                        <td style="width:15%"> </td>
                                        <td style="width:15%"> </td>
                                        <?php if ($getdata['tcs'] > 0) { ?>
                                            <td style="width:15%"> <?= $getdata['tcs'] ?> &nbsp;&nbsp; % </td>
                                        <?php } else { ?>
                                            <td style="width:15%"> &nbsp;&nbsp; </td>
                                        <?php } ?>
                                        <td style="width:25%;text-align:right"> <?= $getdata['tcsamt'] ?> </td>
                                    </tr>
                                    <tr width="100%">
                                        <td style="width:30%"> <b> Bill Amount </b></td>
                                        <td style="width:15%"></td>
                                        <td style="width:15%"></td>
                                        <td style="width:15%"></td>
                                        <td style="width:25%;border-top: 1px solid black;text-align:right">
                                            <b><?= $getdata['netamt'] ?> </b></td>
                                    </tr>

                                </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
                <table class="table table-borderless" style="width:100%">

                    <tr style="width: 100%;">
                        <?php $words = rsword($getdata['netamt']); ?>

                        <td style="width:20%" class="f14">Amount (In Words) </td>
                        <td style="width:80%;" class="f14"> : <b> <?= $words; ?></b></td>
                    </tr>

                    <tr style="width: 100%;">
                        <td style="width:20%" class="f14">Agent</td>
                        <td style="width:80%;" class="f14"> : <b> <?= $getdata["agent"] ?></b></td>
                    </tr>

                    <tr style="width: 100%;">
                        <td style="width:20%" class="f14">Remarks</td>
                        <td style="width:80%;" class="f14"> : <b> <?= $getdata["rem1"] . " " . $getdata["rem2"] ?></b>
                        </td>
                    </tr>

                    <tr style="width: 100%;">
                        <td style="width:20%" class="f14"></td>
                        <td style="width:80%;" class="f14"> &nbsp; <b> <?= $getdata["rem3"] ?></b></td>
                    </tr>
                    <br>
                    <?php if ($imglogo == "Yes") { ?>
                        <tr style="width: 100%;">
                            <td class="f14"></td>
                            <td class="f14">
                                <div style="margin-right:20px; text-align:right; font-size: 14px; ">For
                                    &nbsp;<b><? echo "$compname"; ?></b></div>
                            </td>
                        </tr>
                    <?php } ?>
                </table>
                <br>
                <br>
                <br>

                <table class="table " style="width:100%">
                    <tr style="width:100%">
                        <td class="f11"><b> Note :</b>Confirmation is subject to passport and payment to be deposited on
                            or before time limit. </td>
                        <td class="f11"><b> Authorised Signatory </td>
                    </tr>
                    <tr style="width:100%">
                        <td class="f14"><b> <i> Payment & Passport Time Limit </i> </b> </td>
                    </tr>
                </table>

                <table class="table " style="width:100%">
                    <tr style="width:100%">
                        <?php
                        $halfpay = $fullpay = $passlimit = "";
                        if ($getdata["halfpay"] != "0000-00-00") {
                            $halfpay = date("d-m-Y", strtotime($getdata["halfpay"]));
                        }
                        if ($getdata["fullpay"] != "0000-00-00") {
                            $fullpay = date("d-m-Y", strtotime($getdata["fullpay"]));
                        }
                        if ($getdata["passlimit"] != "0000-00-00") {
                            $passlimit = date("d-m-Y", strtotime($getdata["passlimit"]));
                        }
                        ?>
                        <td class="f14" style="width:20%"><b> Half Payment Before : </b> <?= $halfpay; ?> </td>
                        <td class="f14" style="width:20%"><b> Full Payment Before : </b> <?= $fullpay; ?> </td>
                        <td class="f14" style="width:20%"><b> Passport Before : </b> <?= $passlimit; ?> </td>
                    </tr>
                </table>

                <br>

                <?php if ($imglogo == "Yes") { ?>
                    <div class="row" style="text-align:center;background-color:lightgrey !important;">
                        <?php
                        $ztel = $comp2['htel'];
                        $zadd = $comp2["hoadd1"] . " " . $comp2["hoadd2"] . " " . $comp2["hoadd3"] . " " . $comp2["hocity"] . " " . $comp2["hopin"];
                        ?>
                        <b style="margin-top:2px"> Regd. Office: </b><span
                            style="font-family: verdana;font-size: 14px;margin-top:2px"><?= $zadd ?></span>
                        <br>
                        <b>Tel.:<?= $ztel ?></b>
                    </div>
                    <?php if ($comp2['gstno'] != "") { ?>
                        <div class="row" style="text-align:center;background-color:lightgrey !important; ">
                            <b> <span style="font-family: verdana;font-size: 14px"> GST No.<?= $comp2["gstno"]; ?></span></b>
                        </div>
                    <?php } ?>

                    <div class="row" style="background-color:<?= $vheadcolor; ?>  !important;height:35px">
                        <table class="border" style="height:35px;width:100%">
                            <tr>
                                <td width="35%" class="padd">&nbsp;&nbsp;<b
                                        style="font-size: 14px;color:white !important"><?php echo $comp2['compname']; ?></b>
                                </td>
                                <td width="30%" class="padd" style="text-align: center;"><b
                                        style="font-size: 12px;color:white !important">Email :
                                        <?php echo $comp2['email']; ?></b></td>
                                <td width="35%" class="right padd" style="text-align: center;"><b
                                        style="font-size: 12px;color:white !important">Website
                                        :&nbsp;<?php echo $comp2['website']; ?></b></td>
                            </tr>
                        </table>
                    </div>

                <?php } ?>
            </div>
        </div>
    </div>
    <?php
    include("includes/linksfoot.php");
    ?>

</body>

</html>