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

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
$formname = 'Envelope Print';
$qvouch = $_REQUEST["vouchno"];
$maindb = 'center';
//$para = $_GET["para"];


$mainqry = mysqli_query($conn, "SELECT * FROM `$maindb` WHERE `vouchno` = '$qvouch' ") or die(mysqli_error($conn));
$get = mysqli_fetch_object($mainqry);
?>
<html>
    <head>
        <title><?= $formanme ?></title>
        <style>
            body{
                font-size: 23px;
               
            }
        </style>
    </head>
    <body onload = "window.print();">
        <div style="width:30%;margin:auto;border:0px solid;padding-top:25px;">
            <table>
                <tr>
                    <label class="label-control marg" style="text-align:left; font-size:20" >To,</label><br>
                        <td style="text-align:left"><span style="padding-right:25px"></span>
                        <b><?= $get->code ?></b><br/><span style="padding-right:25px"></span>
                        <b><?= $get->name ?></b><br/><span style="padding-right:25px"></span>
                        <?= $get->add1 ?><br/><span style="padding-right:25px"></span>
                        <font style="font-size: 17px;"><?= $get->add2 ?><br/><span style="padding-right:25px"></span>
                        <?= $get->add3 ?><br/><span style="padding-right:25px"></span>
                        <?= $get->station ?><br/><span style="padding-right:25px"></span>
                        <?= $get->city ?> <?= $get->pin ?><br/><span style="padding-right:25px"></span>
                        <?php if (!empty($get->tel)) {
                            echo $get->tel . " / ";
                        } ?>  <?= $get->mobile ?>
                        </font>
                    </td>
                </tr>
            </table>
        </div>
    </body>
</html>
