<?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'";

$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));

$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'];
$splnote = $comp2['splnote'];

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;
    }

    .f13 {
        font-size: 13px;
    }

    .f14 {
        font-size: 14px;
    }

    .table>tbody>tr>td {
        padding: 2px;
        font-size: 12px;
        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: 25px;
        /* Set the height of the inner table cells */
    }

    .pgaftr {
        font-family: verdana;
        font-size: 18px;
        /*            background-color: #0b4c78;
                color:white !important;*/
    }
</style>
</head>


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

        <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 } ?>

                <center>
                    <h5 style="border-bottom: 1px solid black;width:220px">HAJ UMRAH VOUCHER</h5>
                </center>
                <table class="table table-borderless" style="width:100%;padding:4px">

                    <tbody>

                        <tr width="100%">
                            <td style="width:10%;text-align:left" class="f14">Voucher </td>
                            <td style="width:45%" class="f14"> : <b> <?php echo $getdata['regnno']; ?></b></td>
                            <td style="width:15%;text-align:left" class="f14">Date </td>
                            <td style="width:30%" class="f14"> : <b> <?php echo $getdata['mydt']; ?></b></td>
                        </tr>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Name </td>
                            <td style="width:60%;text-align:left" colspan="3" class="f14"> : <b><?php echo $getdata['haji'] . " " . $getdata["surname"] . " - " . $getdata["tel"] ; ?></b></td>
                        </tr>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Agent </td>
                            <td style="width:45%;text-align:left" class="f14"> : <b> <?php echo $getdata['agent']; ?></b></td>
                            <td style="width:15%" class="f14">Pax Group </td>
                            <td style="width:30%;text-align:left" class="f14"> : <b><?php echo $getdata['groupno']; ?></b></td>
                        </tr>
                        <tr width="100%">
                            <td style="width:10%" class="f14">Class</td>
                            <td style="width:45%;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:30%" 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:45%;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:30%" class="f14"></td>
                            </tr>
                        <?php } ?>
                    </tbody>
                </table>

                <br>


                <table class="fixed-height-table" style="width:100%">
                    <tr class="" style="">
                        <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:20px !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><?= $ctr; ?>) &nbsp;<?= $name  . " " .  $showchkwhlchair ?></td>
                                        </tr>
                                        <?php
                                    }
                                    $ln = 16;
                                    if ($getdata['fullamt_2'] > 0) {
                                        $ln++;
                                    }
                                    if ($getdata['fullamt_3'] > 0) {
                                        $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>
                                    <tr>
                                        <th style="color:black;text-align:center;font-size:15px;border-bottom: 1px solid black;"
                                            colspan="5"><b>Details</b></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr width="100%"
                                        style="background-color:lightgrey !important;height:20px !important">
                                        <td style="width:100%;text-align:center;color:black;background-color:lightgrey !important;"
                                            colspan="5">MAKKAH </td>
                                    </tr>


                                    <?php
                                    $gmkname = mysqli_query($conn, "SELECT `code`,`hotelnm` FROM `hotels` WHERE  code = '$getdata[makhotel]' ") or die(mysqli_error($conn));
                                    $fmkname = mysqli_fetch_array($gmkname);
                                    ?>

                                    <tr width="100%">
                                        <td style="width:100%;text-align:center" colspan="5">Hotel Name : &nbsp;
                                            <?= $fmkname["hotelnm"] ?>
                                        </td>
                                    </tr>

                                    <tr width="100%">
                                        <td style="width:100%;text-align:center" colspan="5">
                                            Check In : &nbsp; <?= format_date($getdata["makchkin"]) ?>
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            Check Out : &nbsp; <?= format_date($getdata["makchkout"]) ?>
                                        </td>
                                    </tr>

                                    <?php if ($getdata['mksingle'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Single </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp; <b>
                                                    <?= $getdata['mksingle'] ?> </b> </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <b> <?= $getdata['mk_singlepax'] ?> </b>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mkdouble'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Double </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp; <b>
                                                    <?= $getdata['mkdouble'] ?> </b> </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <b> <?= $getdata['mk_doublepax'] ?> </b>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mktriple'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Triple </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp; <b>
                                                    <?= $getdata['mktriple'] ?></b> </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <b> <?= $getdata['mk_triplepax'] ?> </b>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mkquad'] > 0) { ?>
                                        <tr width="100%">
                                            <?php
                                            if ($getdata['mk_quadpax'] < 4) {
                                                $rmty = "Quad Sharing";
                                            } else {
                                                $rmty = "Quad";
                                            }
                                            ?>

                                            <td style="width:16%;text-align:center" colspan="2"><?= $rmty ?></td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp; <b>
                                                    <?= $getdata['mkquad'] ?> </b>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mk_quadpax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mkquint'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Quint </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mkquint'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mk_quintpax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mksuite'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Suite </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mksuite'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mk_suitepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mknobed'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center">No Bed &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mknobed'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <tr width="100%"
                                        style="background-color:lightgrey !important;height:20px !important">
                                        <td style="width:100%;text-align:center;color:black;background-color:lightgrey !important;"
                                            colspan="5">MADINA </td>
                                    </tr>

                                    <?php
                                    $gmdname = mysqli_query($conn, "SELECT `code`,`hotelnm` FROM `hotels` WHERE  code = '$getdata[madhotel]' ") or die(mysqli_error($conn));
                                    $fmdname = mysqli_fetch_array($gmdname);
                                    ?>

                                    <tr width="100%">
                                        <td style="width:100%;text-align:center" colspan="5">Hotel Name : &nbsp;
                                            <?= $fmdname["hotelnm"] ?>
                                        </td>
                                    </tr>

                                    <tr width="100%">
                                        <td style="width:100%;text-align:center" colspan="5">
                                            Check In : &nbsp; <?= format_date($getdata["madchkin"]) ?>
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            Check Out : &nbsp; <?= format_date($getdata["madchkout"]) ?>
                                        </td>
                                    </tr>

                                    <?php if ($getdata['mdsingle'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Single </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mdsingle'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['md_singlepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mddouble'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Double </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mddouble'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['md_doublepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mdtriple'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Triple </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mdtriple'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['md_triplepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mdquad'] > 0) { ?>
                                        <tr width="100%">
                                            <?php
                                            if ($getdata['md_quadpax'] < 4) {
                                                $rmty = "Quad Sharing";
                                            } else {
                                                $rmty = "Quad";
                                            }
                                            ?>

                                            <td style="width:16%;text-align:center" colspan="2"><?= $rmty ?></td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mdquad'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['md_quadpax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mdquint'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Quint </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mdquint'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['md_quintpax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['mdsuite'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Suite </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mdsuite'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['md_suitepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>


                                    <?php if ($getdata['mdnobed'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center">No Bed &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['mdnobed'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>


                                    <tr width="100%"
                                        style="background-color:lightgrey !important;height:20px !important">
                                        <td style="width:100%;text-align:center;color:black;background-color:lightgrey !important;"
                                            colspan="5">SHIFTING HOTEL </td>
                                    </tr>

                                    <?php
                                    $gshiftname = mysqli_query($conn, "SELECT `code`,`hotelnm` FROM `hotels` WHERE  code = '$getdata[othhotel]' ") or die(mysqli_error($conn));
                                    $fshiftname = mysqli_fetch_array($gshiftname);
                                    ?>

                                    <tr width="100%">
                                        <td style="width:100%;text-align:center" colspan="5">Hotel Name : &nbsp;
                                            <?= $fshiftname["hotelnm"] ?>
                                        </td>
                                    </tr>

                                    <tr width="100%">
                                        <td style="width:100%;text-align:center" colspan="5">
                                            Check In : &nbsp; <?= format_date($getdata["othchkin"]) ?>
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            Check Out : &nbsp; <?= format_date($getdata["othchkout"]) ?>
                                        </td>
                                    </tr>

                                    <?php if ($getdata['othsingle'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Single </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othsingle'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['oth_singlepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['othdouble'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Double </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othdouble'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['oth_doublepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['othtriple'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Triple </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othtriple'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['oth_triplepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['othquad'] > 0) { ?>
                                        <tr width="100%">

                                            <?php
                                            if ($getdata['oth_quadpax'] < 4) {
                                                $rmty = "Quad Sharing";
                                            } else {
                                                $rmty = "Quad";
                                            }
                                            ?>

                                            <td style="width:16%;text-align:center" colspan="2"><?= $rmty ?></td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othquad'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['oth_quadpax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['othquint'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Quint </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othquint'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['oth_quintpax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['othsuite'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center" colspan="2">Suite </td>
                                            <td style="width:16%;text-align:center">Qty &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othsuite'] ?>
                                            </td>
                                            <td style="width:16%;text-align:center" colspan="2">Pax &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['oth_suitepax'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($getdata['othnobed'] > 0) { ?>
                                        <tr width="100%">
                                            <td style="width:16%;text-align:center">No Bed &nbsp;&nbsp;&nbsp;&nbsp;
                                                <?= $getdata['othnobed'] ?>
                                            </td>
                                        </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </table>

                <table class="table table-borderless" style="width:100%">

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

                    <tr style="width: 100%;">
                        <td style="width:16%" class="f14"></td>
                        <td style="width:84%;" class="f14"> &nbsp; <b> <?= $getdata["rem3"] ?></b></td>
                    </tr>
                    <?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 = date("d-m-Y", strtotime($getdata["halfpay"]));
                        $fullpay = date("d-m-Y", strtotime($getdata["fullpay"]));
                        $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>
        <?php if ($splnote != "") { ?>
            <div class="page pgaftr">



                <!--<img src="images/<?= $splnote ?>" style="width:100%">-->
                <?= $splnote ?>
            </div>
        <?php } ?>
    </div>
    <?php
    include("includes/linksfoot.php");
    ?>

</body>

</html>