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

$formname = "Certificate Received";
$action = "certrecv.php";

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];

$zyear = right($zdb, 4);
$mfrdate = getzdates($zyear, 'S');
$mtodate = getzdates($zyear, 'E');

if (isset($_POST["view"])) {
$mvouch  = $_POST[vouchno];
$mname   = $_POST[name];
$mmobile = $_POST[mobile];

$vcond = '';
$ncond = '';
$mcond = '';
if($mvouch == ''){
    $vcond = "and `vouchno` = '$mvouch'";
}
if($mname == ''){
    $ncond = "and `name` = '$mname'";
}
if($mmobile == ''){
    $mcond = "and `mobile` = '$mmobile'";
}


$myyear = $_SESSION[$myyear];
mysqli_select_db($conn,$zdb);
$getvisa = mysqli_query($conn,"SELECT * FROM `visamain` where   `vouchno` = '$mvouch' ")or die(mysqli_error($conn));
$visa = mysqli_fetch_array($getvisa);

include("includes/linkshead.php");
?>
<style src="MyStyle/rep_format.css" type="text/css"></style>
<style>
    /*table, tr, td {border: 3px solid red; }*/
    tr.noBorder td {border: 0; }

    @page {
        size: 7in 9.25in;
        margin: 27mm 16mm 27mm 16mm;
    }
    .shahid{line-height:1.5em;}   

</style>
</head>
<body style="background-color:#ffffff;" >
    <form action='' method='POST'>
<!--        <table align="center" style="width: 75%;height: 100%;border-style: dashed;">
            <tr style="height:10%;">
                <td>
                    <h2 style="text-align: center;font-size: 36px;"><i><b><font face="Times New Roman">Certificate of Acknowledgement</font></b></i></h2>
                </td>
            </tr>
            <tr>
                <td>
                    <b>REF.No./2016/<?php echo $mvouch; ?></b>
                </td>
            </tr>
            
            <tr>
                <td>
                    <b>To,</b>
                </td>
            </tr>
            <tr>
                <td>
                    <b>The Manager,</b>
                </td>
            </tr>
            
            <tr>
                <td>
                    <b>Subject:  Acknowledgement Letter for Receiving Passport</b>
                </td>
            </tr>
            
            <tr>
                <td>
                    <b>Dear Sir,</b>
                </td>
            </tr>
            <tr>
                <td>
                    <b>It is to inform you that I acknowledge the receiving of passport by your company.</b>
                </td>
            </tr>
            <tr>
                <td>
                    <b>The passport has been checked and are in good shape and  no defect have been found.</b>
                </td>
            </tr>
            <tr>
                <td>
                    <b>The number of passport/s  is proper ( <?php echo $visa['nopass']; ?> ) and without any doubt. </b>
                </td>
            </tr>
            <tr>
                <td>
                    <b>Under signatory is grateful for your punctuality.</b>
                </td>
            </tr>
            
            <tr>
                <td>
                    <b>Name:<b><?php echo strtoupper($visa['name']); ?></b>
                </td>
            </tr>
            
            <tr>
                <td>
                    <b>Signature : - __________________</b>
                </td>
            </tr>
            
            <tr>
                <td>
                    <b>Date :- _________________</b>
                </td>
            </tr>
        </table>
        -->
        <div  style="border-style: dashed;width:700px;height:800px;padding:10px;float:none;margin:0 auto;">
            <!--<img  src="images/logo.jpg">-->
            <p class="shahid" style="font-size: 40px;text-align: center;"><i><b><font face="Times New Roman">Certificate of Acknowledgement</font></b></i></p>
            <p class="shahid"><b>REF. No. /2016/<?php echo $mvouch; ?></b></p>
            <p class="shahid"><b>To,</b></p>
            <p class="shahid"><b>The Manager,</b></p>
            <p class="shahid"><b>Seventh Sky International</b></p>
            <br>
            <p class="shahid"><b>Subject:</b>  Acknowledgement Letter for Receiving Passport</p>
            <br>
            <p class="shahid"><b>Dear Sir,</b></p>
            <p class="shahid">It is to inform you that I acknowledge the receiving of passport by your company.</p>
            <p class="shahid">The passport has been checked and are in good shape and  no defect have been found.</p>
            <p class="shahid">The number of passport/s ( <?php echo $visa['nopass']; ?> ) is proper  and without any doubt. </p>
            <p class="shahid">Under signatory is grateful for your punctuality.</p>
            <p class="shahid">Name:<b>  <?php echo strtoupper($visa['name'] . ' ' . $visa['lastname']); ?></b></p>
            <p class="shahid"><b>Signature:  ____________________________</b></p>
            <p class="shahid"><b>Date:   ________________________</b></p>
        </div>
    </form>

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